How to publish jar package to maven private server

1. Format

 mvn deploy:deploy-file -DgroupId=com.qiyi -DartifactId=sphinx -Dversion=1.0 -Dpackaging=jar -Dfile=D:\sphinxapi.jar -Durl=[url] -DrepositoryId=[id

2. Examples

D:\develop\apache-maven-3.0.4\bin>mvn deploy:deploy-file -DgroupId=org.sphx -DartifactId=sphinxapi -Dversion=1.0 -Dpackaging=jar -Dfile=D:\sphinxapi.jar

-Durl=http://10.10.10.10:8800/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty

 

DgroupId and DartifactId constitute the coordinates of the jar package in pom.xml, and the project relies on these two attributes to locate. You can also name yourself.

Dfile represents the absolute path of the jar package to be uploaded.

The location of the warehouse on the Durl private server, open the nexus->repositories menu, you can see the path.

The DrepositoryId server's presentation id, which can be seen in the nexus configuration.

 

After the upload is successful, click on the 3rd party warehouse on the nexus interface to see the package.

3. Configure permissions

$MAVEN/conf/settings.xml

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326436395&siteId=291194637
Recommended