JENKINS how to deploy artifacts to maven repo JENKINS how to deploy artifacts to maven repo jenkins jenkins

JENKINS how to deploy artifacts to maven repo


Take a look at This answer.

You can add a "Post-build Actions" to "Deploy artifacts to Maven Repository" (the Maven Project Plugin will need to be installed). Then click "Advanced" and set your Repository URL to something appropriate (http://yourserver:8082/nexus/content/repositories/releases/) and set Repository ID to the server in your settings.xml that contains the authentication necessary, such as my-releases or whatever.


Isn't running the deploy phase of your project what you are looking for?


I was able to perform this activity using "Jenkins promoted builds plugin". Useful when I want to deploy the artifacts after regression tests are successful. The build is promoted when the regression tests are completed, and then we can add an action to deploy the artifacts to the Maven repo.

Note: To use this feature you shouldn't deactivate the automatic artifact archiving.