[Fun With Ubuntu] 03. Configure the maven environment on Ubuntu

Source: Internet
Author: User

1. Download Maven
Maven:Http://maven.apache.org/download.cgi
I downloaded: apache-maven-3.1.0-bin.tar.gz

2. Move your own storage directory

Bixiaopeng @ bixiaopeng-to-be-filled-by-O-E-M :~ /Download $ MV apache-maven-3.1.0-bin.tar.gz/home/bixiaopeng/soft/jarsbixiaopeng @ bixiaopeng-to-be-filled-by-O-E-M :~ /Download $ CD/home/bixiaopeng/soft/jars


3. Extract

Bixiaopeng @ bixiaopeng-to-be-filled-by-O-E-M :~ /Soft/jars $ tar-zxvf apache-maven-3.1.0-bin.tar.gz # view the extracted results of bixiaopeng @ bixiaopeng-to-be-filled-by-O-E-M :~ /Soft/jars $ LS-Al apache-maven-3.1.0/total usage 44drwxrwxr-x 6 bixiaopeng 4096 August 21 14:29. drwxrwxr-x 3 bixiaopeng 4096 August 21 14:29 .. alibaba-x 2 bixiaopeng 4096 August 21 14:29 Alibaba-x 2 bixiaopeng release 4096 August 21 14:29 bootdrwxr-XR-x 3 bixiaopeng release 4096 June 28 10:12 Alibaba-XR-x 3 bixiaopeng 4096 June 28 10:12 lib-RW-r -- 1 bixiaopeng 11358 10:12 license.txt-RW-r -- 1 bixiaopeng 1112 10:12 notice.txt-RW-r -- 1 bixiaopeng 2513 june 28 10:12 readme.txt

4. Configure Maven Environment Variables

Vim ~ /. Bashrc

# Add at the bottom of the file
Export maven_home =/home/bixiaopeng/soft/jars/apache-maven-3.1.0export path =$ {maven_home}/bin: $ path

5. Make the repair take effect immediately after the repair is completed

bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/soft/jars$ source ~/.bashrc

6. Check the version.

bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/soft/jars$ cd ~bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~$ mvn -vApache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 10:15:32+0800)Maven home: /home/bixiaopeng/soft/jars/apache-maven-3.1.0Java version: 1.6.0_45, vendor: Sun Microsystems Inc.Java home: /home/bixiaopeng/soft/jvm/jdk/jreDefault locale: zh_CN, platform encoding: UTF-8OS name: "linux", version: "3.8.0-27-generic", arch: "amd64", family: "unix" 

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.