WIN7 MAVEN3 Environment Construction and use instructions

Source: Internet
Author: User

--Dependency Relationship:

JDK, assuming JDK1.7 and installed under directory D:\Java\jdk1.7.0_75, and the java_home:d:\java\jdk1.7.0_75 value is configured in the environment variable; path+=%java_home%\bin value


--Installation:

1. Download Maven3 bin file: Http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0-bin.zip

2, after pressure placed in the specified directory (can be defined by the user), assuming that C:\Program Files (Green) \apache-maven-3.2.5 under

3. Configure Environment variables:

M2_home=c:\program Files (Green) \apache-maven-3.2.5

M2=%m2_home%\bin

path+=%m2%

4. After restarting the computer, execute the mvn in cmd;

5, if can carry out the installation success;


--Configuration:

1. Using local repository

Default local repository in C:\Users\username\.m2\repository, you can modify C:\Program Files (Green) \apache-maven-3.2.5\conf\ The localrepository parameter in the settings.xml file, such as <localRepository>d:\</localRepository>.

2. Using Remote repository

When using remote repository as follows, edit the Localrepository parameter in the C:\Program files (Green) \apache-maven-3.2.5\conf\settings.xml file,

<localRepository>\\192.168.1.111\Users\username\.m2\repository</localRepository>


--run:

Go to the command line and execute the following command on the path where the project Pom.xml

1. Using the locally configured repository

MVN clean Install

2, the use of temporary repository

mvn Clean install-dmaven.repo.local=\\192.168.1.111\users\username\.m2\repositorymvn Clean Install-dmaven.repo.local=d:\.m2\repository


WIN7 MAVEN3 Environment Construction and use instructions

Related Article

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.