Use the command maven jar package to publish PW nexus
setting.xml configuration
This configuration means that your account information PW, and set a id, the id to distinguish multiple PW
<server>
<id>nexus-snapshots</id>
<username>maven</username>
<password>sr@12345</password>
</server>
Full command
mvn deploy:deploy-file -DgroupId=com.xiaomi -DartifactId=mipush-sdk -Dversion=2.2.19 -Dpackaging=jar -Dfile=MiPush_SDK_Server_2_2_19.jar -Durl=http://192.168.10.131:8081/repository/maven-releases/ -DrepositoryId=nexus-snapshots
- Durl, the address can be found in the repository nexus, and copy and paste, if you do not see, probably not enough rights
- DrepositoryId, arranged inside the front server id
Common Mistakes:
Return code is: 400, ReasonPhrase: Repository does not allow updating assets: maven-releases.
Express what you want to change the version number, the version already exists, can not be updated
Return code is: 401
means that your service account password wrong
Code IS the Return: 405, reasonPhrase: PUT
-Durl address a problem, and put no relationship