The Maven plugin in Eclipse uploads the project jar package to the

Source: Internet
Author: User

<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

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.