Publish jar Package (deploy) to the MAVEN warehouse

Source: Internet
Author: User

Publish jar Package (deploy) to the MAVEN warehouse


1. Configuring warehouses in the settings.xml of Maven
Increase in <services>.....</services>
<server>
<id>{Warehouse Name}</id>
<username>{User name}</username>
<password>{Password}</password>
</server>

2. Maven Upload command
MVN deploy:deploy-file-dgroupid=com.xx.xx-dartifactid=xx-dversion=1.0.0-dpackaging=jar-dclassifier=sources- Dfile=xx-sources.jar-durl= Warehouse Address-drepositoryid= warehouse Name

3. Example
Upload:
MVN Deploy:deploy-file-dgroupid=org.ansj-dartifactid=ansj_seg-dversion=2.0.8-dclassifier=min-dpackaging=jar- Dfile=./ansj_seg-2.0.8-min.jar-durl=http://{host}:{port}/nexus/content/repositories/thirdparty-drepositoryid= ThirdParty
Refer to In Pom.xml:
<dependency>
<groupId>org.ansj</groupId>
<artifactId>ansj_seg</artifactId>
<version>2.0.8</version>
<classifier>min</classifier>
</dependency>

Upload:
MVN deploy:deploy-file-dgroupid=org.nlpcn-dartifactid=nlp-lang-dversion=0.3-dpackaging=jar-dfile=./ Nlp-lang-0.3.jar-durl=http://{host}:{port}/nexus/content/repositories/thirdparty-drepositoryid=thirdparty
Refer to In Pom.xml:
<dependency>
<groupId>org.nlpcn</groupId>
<artifactId>nlp-lang</artifactId>
<version>0.3</version>
</dependency>


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.