6
votes

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.

2
What are you using to build these artifacts. The naming convention seems to omit the version string. In addition redeployments of artifacts into a release are not allowed by default (but can be enabled even if that is a bad idea. - Manfred Moser
as I stated, the policy for the hosted repository is Snapshots (not release). I'm editing the question with further details about the naming convetions. - William Ghelfi
Can you try a manual artifact upload and see if that works? And also.. what tool are you using for the deployment? Maven? Something else? - Manfred Moser
I just wanted to thank you for posting this question beyond up-voting it because it saved me in the 11th hour. I was getting errors about SNAPSHOT not allowing my version but NOTHING that pointed me to the fact I needed SNAPSHOT at the end. I changed my snapshots to release and now I can give them the version I want without the obvious appendage of SNAPSHOT at the end. Really if I have a version like 1.34.2cod9rf (last git commit hash) does it need to really be stated that it's a SNAPSHOT? :-D - Justin

2 Answers

2
votes

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.

0
votes

Nexus is a repository manager that uses different repository formats, with the main format being the Maven repository format. Changing the names of artifacts on the server is not possible since it violates the format. They have to be located in the directory structure established by groupId, artifactId and version and use the artifactId-version-classifier.packaging for the file names.

If you need a different file name on the server you have to look at a different repository format (bad idea). If you need the filename on the client just download from the correct name and rename..