A record of maven deploy private server

foreword

In a workflow project, we used Activiti 5.16.2 as the workflow engine, but NPE would appear erratically under concurrent conditions. After viewing and data collection, it was found that there was a bug in the Activiti version, for stability , intend to use the modified code to redeploy an acticiti package and upload it to the nexus private server to solve the problem.

specific records

1. Modify the configuration file

Since the private server needs to be uploaded, the authentication information of the private server needs to be added to the maven configuration, otherwise the upload will report a 401 UnAuthorized error

The added message is as follows

<server>
    <id>releases</id> //id of the repo to upload
    <username>admin</username> //用户名
    <password>xinhongyang@2016</password> //password
</server>

2. Package Activiti

You can download the source code on github and deploy it yourself. There is no problem here, so I won't go into details.

3. Upload the deployed package to the nexus private server

1. Upload the jar package

Note: Uploading the jar package alone cannot upload the related dependencies of the jar package, so if the jar package has internal dependencies, do not use this method

mvn deploy:deploy-file -Dmaven.test.skip=true -Dfile=/Users/xin/Downloads/activiti-engine-5.16.2.jar -DgroupId=org.activiti -DartifactId=activiti-engine -Dversion=5.16.2.xin -Dpackaging=jar -DrepositoryId=releases -Durl=http://nexus.xinhongyang.me/repository/releases/
2. Upload the jar package and pom file

I use this method to upload this time, and the messages of the jar package such as group-id verison will be parsed from the pom file

mvn org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file -Dmaven.test.skip=true -Dfile=/Users/xin/activiti-bpmn-model-5.16.2-wbg.jar -DpomFile=/Users/xin/activiti-bpmn-model-5.16.2-xin.pom -DrepositoryId=releases -Durl=http://nexus.xinhongyang.me/repository/releases/
3. Upload the pom file

If you want to upload a pom file separately, such as uploading a top-level pom, you can use this method, that is, write both -Dfile and -Dpomfile as the address of the pom file

mvn org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file -Dmaven.test.skip=true -Dfile=/Users/xin/activiti-root-5.16.2-xin.pom -DpomFile=/Users/xin/activiti-root-5.16.2-xin.pom -DrepositoryId=releases -Durl=http://nexus.xinhongyang.me/repository/releases/

 
 

Guess you like

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