-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
n/a
Staging support in Sonatype Nexus today is preferably handled via the nexus-staging-maven-plugin, which replace the default maven-deploy-plugin.
It would be good with some support in m2release plugin for this by, for example, storing info on the created staging repo id. The nexus-staging-maven-plugin creates a properties file during execution (in the workspace) where this info is recorded:
#Generated by org.sonatype.plugins:nexus-staging-maven-plugin:1.6.6
#Mon Oct 05 13:35:43 CEST 2015
stagingRepository.managed=true
stagingRepository.profileId=ab12345cd67ef
stagingRepository.id=test_staging-1001
stagingRepository.url=http\://nexus.acme.org\:80/content/repositories/test_staging-1054
What I'm thinking is that this info could then later on be used to promote/release or drop the staging repo programatically. The properties file is typically removed during the next Maven build (mvn clean install).
We could also maybe depreacte the current Nexus Pro support in the plugin for automatically closing a staging repo as that is supported by the nexus-staing-maven-plugin out-of-the-box. Or that could be kept for those needing it and adding additional Nexus Pro/nexus-staging-maven-plugin support.
I actually think supporting nexus pro using the nexus maven plugin woukd be a backward step.
Why?
1 you need to run maven to do anything for the stage (means the promotion could not be lightweight)
2 you need to parse and recreate the files etc for this.
The stage is already known about by the jenkins plugin, it was always my intention to expose this and then add an extra action to promote or drop the stage interacting directly with nexus.