deploy on nexus artifacts with Snapshot policy but without SNAPSHOT string in version

William Ghelfi picture William Ghelfi · Nov 27, 2012 · Viewed 8.4k times · Source

apparently my Nexus is rejecting every deploy I throw at him if the artifact has not -SNAPSHOT in the version.

Data:

  • name of the failing artifact: entando-core-engine-experiment-bundles_with_bootstrap.jar where experiment-bundles_with_bootstrap is the version as in the version element of the pom.xml
  • hosted repository policy on my Nexus: Snapshot, allow redeploy and so on (classic conf for snapshots)
  • deployer: Jenkins 1.481
  • same Jenkins job, but entando-core-engine-SNAPSHOT.jar ---> SUCCESS

I need this naming convention because I'm building one of the several experiments we run internally, as opposite to the canonical develop branch which produces a proper entando-core-engine-SNAPSHOT.jar

Any advice? I'm totally lost.

Answer

khmarbaise picture khmarbaise · Nov 27, 2012

The thing is that usually your Nexus is configured not to allow a redeployment of a release. A release from Maven point of view is an artifact where it's version it NOT -SNAPSHOT. In contradiction a SNAPSHOT is intended to be deployed several times into nexus.
This sounds like you don't using the release plugin of Maven nor the Release PLugin of Jenkins.