Maven release plugin with classifer snapshot dependencies from command line

I'm attempting to run the maven release plugin from the command line in batch mode for a multi-module project that has dependences that are deployed to the maven repository with a classifier.

The release:prepare works correctly when it's not in batch-mode and prompts for all the unresolved snapshot dependences including the ones with a classifier and the release completes successfully.

When I look at the release.properties file I see ...

Regular dependencies identified like

project.rel.groupIdXYZ:artifactIdXYZ=2.0.3.4
project.dev.groupIdXYZ:artifactIdXYZ=2.0.3.4-SNAPSHOT

Classifier dependencies identified like

dependency.groupIdABC:artifactIdABC.release=2.0.3.4
dependency.groupIdABC:artifactIdABC.development=2.0.3.4-SNAPSHOT

with no actual classifier id.

Now I try it through the command line with a command line like ...

mvn --batch-mode -P release,nexus -Dtag=rm2.0.3.4 -Dproject.rel.groupIdXYZ:artifactIdXYZ=2.0.3.4 -Dproject.dev.groupIdXYZ:artifactIdXYZ=2.0.3.4-SNAPSHOT -Ddependency.groupIdABC:artifactIdABC.development=2.0.3.4-SNAPSHOT -Ddependency.groupIdABC:artifactIdABC.release=2.0.3.4 -DreleaseVersion=2.0.3.4 -DdevelopmentVersion=2.0.3.4-SNAPSHOT -DdryRun=true release:prepare

and get

Can't release project due to non released dependencies :
groupIdABC:artifactIdABC:jar:classifierIdABC:2.0.3.3-SNAPSHOT:compile

I've verified that the classifier artifacts are in my local maven repo our corporate central maven repo. I've tried specifing the classifier artifacts as

-Dproject.rel.groupIdABC:artifactIdABC:jar:classifierIdABC=2.0.3.4

and still the same error.

Any pointers to being able to run this from the command line would be appreciated.

Answers


What if you set allowTimestampedSnapshots property to true? Does it still throw the error?


maven-release-plugin requires all dependency versions to be non-SNAPSHOT ... for obvious reasons. Must be final release.

If you know your dependencies do have non-SNAPSHOT versions available, (you previously released them), then you could use versions-maven-plugin to automatically update the pom.xml

mvn versions:use-latest-versions -DallowSnapshots=false -Dincludes=com.my.*

And to prevent release-plugin from complaining about the uncommitted change to the pom.xml...

 mvn release:prepare ... -DcheckModificationExcludeList=pom.xml

Need Your Help

Read array of images from external directory into MAT objects in android

android opencv computer-vision mat

How do i read array of images stored in SDcard to a array of MAT object ? i want to do similar imread like in this post, but for array of images

doctrine: is there a way to use associated entity in findBy

doctrine-orm doctrine associations entity findby

I have an entity 'employee' which is associated to one or more 'manager' entities.