eclipce local maven build

1. Download the new version of Maven http://maven.apache.org/download.cgi :
Here Insert Picture Description
2. Unzip the file to H: \ Program Files \ Maven
3. New environment variables MAVEN_HOME, variable values: H: \ Program Files \ maven \ apache 3.6.1--maven
Here Insert Picture Description
4. editing environment variable PATH, additional MAVEN_HOME%% \ bin;
Here Insert Picture Description
6. the verify installed a win + R, cmd, enter mvn -v View installed version information maven
Here Insert Picture Description
7. H: \ Program files \ maven \ New under apache-maven-3.6.1, maven- repository folder, as the local repository maven
8. Maven local repository configuration: open H: \ Program files \ maven \ apache-maven-3.6.1 \ conf in the document setting.xml
Here Insert Picture Description
9. localRepository tag found, copied to the position, / path in the tag and / to / local / repo, into H: \ Program files \ maven \ apache-maven-3.6.1 \ maven -repository
Here Insert Picture Description
under normal circumstances, can be executed directly 10. step 11, but if you want to use maven remote central warehouse Ali, you can make the following changes in the setting.xml, use Ali cloud faster.
Find profiles label, add in it:

<profile>
<id>dev</id> 
<!-- repositories and pluginRepositories here--> 
<repositories>
<repository>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
在<profiles></profiles>下方 有被注释掉的activeProfiles标签,在其内添加(如图所示):
<activeProfiles>
<activeProfile>dev</activeProfile>
</activeProfiles>

Here Insert Picture Description
At this point, save and close setting.xml completes the configuration of the local maven repository
11. Test the local maven repository, dos system enter: mvn help: system, maven will download, and will finish the next two prompt Figure
Here Insert Picture Description
Finish prompt appears on the map
12. Finally, maven carried eclipce configuration window - Preferences -maven-installations-add, select maven extracted directory, click Finish to return to the previous page, the library has just added a new check.
Here Insert Picture Description
13. Window - Preferences -maven-user settings setting.xml select just the modified files, select the directory just built a local maven repository maven-repository below, click on the button update setting, Save and Close.
Here Insert Picture Description
14. At this point maven to download, install and configure the library, completed, if the step 10, then you will download from the cloud Ali, after modifying or updating pom.xml, will appear from the bottom right corner eclipce http: // maven.aliyun.com/... word download

Guess you like

Origin blog.csdn.net/qq_35168817/article/details/91381118