Deploy on the nexus artifacts using the snapshot policy, but without the SNAPSHOT line in version

Apparently, my Nexus rejects every deployment that I throw at it if the artifact does not have -SNAPSHOT in the version.

Data:

  • failed artifact name: entando-core-engine-experiment-bundles_with_bootstrap.jar, where experimental-bundles_with_bootstrap is the version, as in the version element pom.xml
  • hosted repository policy on my Nexus: snapshot, allow redeployment, etc. (classic config for snapshots)
  • deployer: Jenkins 1.481
  • Jenkins same job, but entando-core-engine- SNAPSHOT .jar ---> SUCCESS

I need this naming convention because I'm building one of several experiments that we run domestically, as opposed to the canonical development branch, which creates the correct entando-core-engine-SNAPSHOT.jar

Any tips? I am completely lost.

+4
source share
2 answers

The fact is that usually your Nexus is configured to prevent redistribution of release. A release from Maven's point of view is an artifact where it doesn't matter -SNAPSHOT . In contradiction, SNAPSHOT is intended to be deployed several times in nexus.
It sounds like you are not using the Jenkins Maven or Release PLugin plugin.

+2
source

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 because it violates the format. They should be located in the directory structure created by groupId, artifactId and version, and use the artifactId-version-classifier.packaging file for file names.

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

0
source

All Articles