Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 717
William Ghelfi Avatar asked Nov 27 '12 17:11

William Ghelfi


People also ask

Is it possible to host third party artifacts in Nexus?

However, as a project grows, Nexus quickly becomes the only real and mature option for hosting third party artifacts, as well as for reusing internal artifacts across development streams. This article will show how to deploy the artifacts of a project to Nexus Repository OSS, with Maven.

How to deploy artifacts to Sonatype Nexus using Maven deploy plugin?

Today I’ll talk about how to deploy artifacts to Sonatype Nexus repository using Maven deploy plugin. Prepare Nexus server in local: Create a Maven project for demo propose: Declare Maven deploy plugin in the parent POM. It’s the same no matter your project is a single module project or a multi-modules project.

How do I host a snapshot repository on Nexus?

A hosted, public Snapshots repository comes out of the box on Nexus, so there’s no need to create or configure anything further. Nexus makes it easy to determine the URLs of its hosted repositories – each repository displays the exact entry to be added in the <distributionManagement> of the project pom, under the Summary tab.

How to prepare Nexus Server for demo proposal?

Prepare Nexus server in local: Create a Maven project for demo propose: Declare Maven deploy plugin in the parent POM. It’s the same no matter your project is a single module project or a multi-modules project. The parent pom.xml file is located in project’s root directory. Define the version of Maven deploy plugin:


1 Answers

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.

like image 130
khmarbaise Avatar answered Sep 22 '22 04:09

khmarbaise