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
Classifier dependencies identified like
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=rm184.108.40.206 -Dproject.rel.groupIdXYZ:artifactIdXYZ=220.127.116.11 -Dproject.dev.groupIdXYZ:artifactIdXYZ=18.104.22.168-SNAPSHOT -Ddependency.groupIdABC:artifactIdABC.development=22.214.171.124-SNAPSHOT -Ddependency.groupIdABC:artifactIdABC.release=126.96.36.199 -DreleaseVersion=188.8.131.52 -DdevelopmentVersion=184.108.40.206-SNAPSHOT -DdryRun=true release:prepare
Can't release project due to non released dependencies : groupIdABC:artifactIdABC:jar:classifierIdABC:220.127.116.11-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
and still the same error.
Any pointers to being able to run this from the command line would be appreciated.
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