- Go to the maven official website to download the latest maven installation package apache-maven-3.0.4-bin.tar.gz, and extract it to the /usr/local/ directory, or optionally modify the maven user: sudo chown -R user:group apache-maven-3.0.4
- Add M2_HOME environment variable: add in /etc/profile or ~/.bashrc file
- export M2_HOME=/usr/local/apache-maven-3.0.4
- export PATH=$PATH:$M2_HOME/bin
- #optional
- export MAVEN_OPTS="-Xms256m -Xmx512m"
- Make sure JAVA_HOME is configured and $JAVA_HOME/bin is in the PATH environment variable
- source / etc/profile makes environment variables take effect immediately
- Run mvn --version to verify that maven was installed successfully.
Ubuntu install Maven
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326445406&siteId=291194637
Recommended
Ranking