Upgrade Ubuntu13.04 to Maven3.10 to support OpenJDK7

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.