UbuntuMaven installation and configuration

Source: Internet
Author: User
ApacheMaven is a software (especially Java software) project management and automatic building tool provided by the Apache Software Foundation. Based on the concept of the project Object Model (POM), Maven uses a central information segment to manage steps such as building, reporting, and documentation of a project. I used to be a subproject of the Jakarta project and is now an independent Apache project. For more information, see ApacheMaven2 introduction http://www.linuxidc.com/Linux/201.

Apache Maven is a software (especially Java software) project management and automatic building tool provided by the Apache Software Foundation. Based on the concept of the project Object Model (POM), Maven uses a central information segment to manage steps such as building, reporting, and documentation of a project. I used to be a subproject of the Jakarta project and is now an independent Apache project.

For details, see Apache Maven 2 Introduction http://www.linuxidc.com/Linux/2011-07/38965.htm.

1) download the Maven installation package for Linux from the website;

==========================================================

Apache-maven-3.0.3-bin.tar.gzDownload

Free in http://linux.linuxidc.com/

The username and password are both www.linuxidc.com

The specific download directory is in/pub/2011/07/21/Maven/

==========================================================

2) decompress apache-maven-3.0.3-bin.tar.gz for installation;

Tar-xzvf apache-maven-3.0.3-bin.tar.gz

3) set maven environment variables;

Vim/etc/profile or vim/etc/environment

# Jesse add maven envirment

Export M2_HOME =/opt/apache-maven

Export M2 = $ M2_HOME/bin

Export MAVEN_OPTS = "-Xms256m-Xmx512m"

Export PATH = $ M2: $ PATH

4) Verify that maven is successfully installed.

Mvn-version

Root@www.linuxidc.com:/# mvn-version

Apache Maven 3.0.3 (r00005438; 17:31:09 + 0000)

Maven home:/opt/apache-maven

Java version: 1.6.0 _ 22, vendor: Sun Microsystems Inc.

Java home:/usr/lib/jvm/java-6-openjdk/jre

Default locale: zh_CN, platform encoding: GB2312

OS name: "linux", version: "2.6.38-8-server", arch: "amd64", family: "unix"

Root@www.linuxidc.com :/#

Echo $ M2

Root@www.linuxidc.com:/# echo $ M2

/Opt/apache-maven/bin

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.