Linux Maven installation and configuration

1. Download Maven (you can download to the specified directory. What I download here is my new folder / home / chuichuige / workspace / Development)

WGet http://mirrors.hust.edu.cn/apache/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5- ? ?bin. tar. gz

?

2. Unzip the specified directory (here I unzip it in the directory of / home / chuichuige / workspace / Development)

tar -zxvf{apache-maven-3.2.5-bin tar. GZ

3. Configure domestic sources (switch to the conf directory of Maven and modify the settings.xml file)

add the following contents to mirrors

& lt; mirror>& lt; id> nexus-osc id>& lt; mirrorOf>*& lt;/ mirrorOf>& lt; name> Nexus osc name>& lt; url> http://maven.aliyun.com/nexus/content/groups/public/&lt ;/ url>& lt;/ mirror>

note:

modifying files may appear

“E45: ‘readonly’ option is set (add! To override)”

solutions can refer to: http://chuichuige.iteye.com/blog/2407204

4. Configure the environment variable “etc / profile”. Finally, add the following two lines

notes: maven_ The path behind home is the path of Maven after decompression

export Maven_ Home = / home / chuichuige / workspace / developep / apache-maven-3.2.5export path = ${path}: ${maven_home} / bin

5. Test (restart server test)

Input: MVN – V

test results are as follows

6. Location of local warehouse

default location: ${user. Home} / m2/repository

?windows:C:Documents and SettingsAdministrator. m2

?Linux:/root/. M2

reference: http://blog.csdn.net/javaee_ssh/article/details/43774583

size: 20.3 KB size: 39.3 KB view picture attachment

Related Posts