<span style= "font-family:arial, Helvetica, Sans-serif; Background-color:rgb (255, 255, 255); " > We know that each company will have its own toolkit or public package that can be uploaded to the company's Maven, without everyone synchronizing the development package. So, how do you package your local projects and publish them to a few? Follow the steps below to get it done easily. </span>
1. Add the following in the Setting.xml file:
<servers> <server> <!--release location is configured in Pom, associated with ID, there is a lot of common information that needs to be configured in the Pom file, the best practice is to define a company-level root pom-- > <id>nexus</id> <username>admin</username> <password>admin123 </password> </server> <server> <id>nexus-snapshots</id> < username>admin</username> <password>admin123</password> </server>< server> <id>thirdparty</id> <username>admin</username> <password >admin123</password> </server> </servers>
2. Add the following in the project's Pom.xml file
<distributionManagement><repository> <id>nexus</id> <name>local Private Nexus</name> <url>http://192.168.xx.xx:8081/nexus/content/groups/public</url></ repository><snapshotrepository> <id>nexus-snapshots</id> <name>local Private Nexus snapshots</name> <url>http://192.168.xx.xx:8081/nexus/content/groups/public-snapshots< /url></snapshotrepository> </distributionManagement>
<span style= "font-family:arial, Helvetica, Sans-serif; Background-color:rgb (255, 255, 255); " > </span>
3. In the project's Maven Bulider, goals enter the following:
Deploy:deploy-file-dgroupid=com.ivifi.tools-dartifactid=ivifi.tools-dversion=1.0-snapshot-dpackaging=jar-dfile =d:\git\tools\visn.tools\target\ivifi.tools-1.0-snapshot.jar-durl=http://192.168.xx.xx:8081/nexus/content/ repositories/thirdparty/-drepositoryid=thirdparty
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The Maven plugin in Eclipse uploads the project jar package to the