[JAVA] Install Apache Maven (from source)

Note because I needed it I'm doing it on CentOS 7.5 with Java 1.7 or higher installed

procedure

  1. Download the Maven binary file

    # cd /opt/
    # curl -LkvOf http://ftp.jaist.ac.jp/pub/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
    
  2. Extract the file

    # tar xzvf apache-maven-3.6.0-bin.tar.gz
    
  3. Pass through

    # vi /etc/profile
    
    
    

(abridgement)

export PATH=/opt/apache-maven-3.6.0/bin:$PATH
```
  1. Execute the source command

    # source /etc/profile
    

Verification

Execute the following command, and if the version is displayed, it's OK

# mvn -v

Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T03:41:47+09:00)
Maven home: /opt/apache-maven-3.6.0
Java version: 1.8.0_202, vendor: Oracle Corporation, runtime: /usr/java/jdk1.8.0_202-amd64/jre
Default locale: ja_JP, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-957.1.3.el7.x86_64", arch: "amd64", family: "unix"

reference

Recommended Posts

Install Apache Maven (from source)
Install Apache 2.4.41 from source
Install python from source
Install ansible from source code
Install Python from source with Ansible
Compile and install Git from source.
Install from conda-forge
Install Apache Zookeeper
Install Apache Zeppelin
Install Apache ActiveMQ
Install PostgreSQL from source code on CentOS
Install the latest version of Apache httpd 2.4 from source on Cent OS 8
Install vim7.3 (+ python2.4) from source (compatible with Gundo.vim)
Install pyenv from Homebrew, install Python from pyenv
pip install prevents proxy from installing
How to install Maven on CentOS