Currently, Ubuntu13.04 is installed with OpenJDK7 by default, and Maven3.04 is installed by default. As a result, compilation of the previously written JavaMaven project fails. Finally, we decided to upgrade maven to see if it could be solved. First uninstall tune the original mavenapt-getautoremovemaven3 and then go to the official website to download maven3.10, unzip and put it in the/usr directory, and finally modify ~ /. Bashrc, add two rows: exportMA
Because OpenJDK7 is installed by default in Ubuntu 13.04 and Maven3.04 is installed by default. As a result, compilation of the previously written Java Maven project fails.
Finally, we decided to upgrade maven to see if it could be solved.
First, uninstall and call the original maven
Apt-get autoremove maven3
Download maven3.10 from the official website, decompress the package, and put it in the/usr directory,
Last Modified ~ /. Bashrc, add two rows:
Export MAVEN_HOME =/usr/apache-maven-3.1.0
Export PATH = $ MAVEN_HOME/bin: $ PATH
Run source ~ /. Bashrc, maven upgrade successful.
Mvn-v
Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 10:15:32 + 0800)
Maven home:/usr/apache-maven-3.1.0
Java version: 1.7.0 _ 25, vendor: Oracle Corporation
Java home:/usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.8.0-28-generic", arch: "amd64", family: "unix"
Then I tried to compile my Java project and passed.
Related reading:
Maven 3.1.0 release, http://www.linuxidc.com/Linux/2013-07/87403.htm of Project Build tools
Install Maven http://www.linuxidc.com/Linux/2013-05/84489.htm in Linux
Maven3.0 configuration and simple use http://www.linuxidc.com/Linux/2013-04/82939.htm
Build sun-jdk and Maven2 http://www.linuxidc.com/Linux/2012-12/76531.htm in Ubuntu
Maven getting started http://www.linuxidc.com/Linux/2012-11/74354.htm
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2