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>