maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Santiago Gala <sg...@apache.org>
Subject Problems with dependencyManagement in maven-release-plugin
Date Fri, 28 Feb 2014 14:25:09 GMT
Hi, we are in the following (simplified and inherited) situation:

* we use git (wth gerrit) as SCM and review system
* we have a parent project, (let's call it com.example:P) with dependency
management and all our internal and external dependencies there (except for
the partent itself)
* let's say we have a 'son' project com.example.test:A without other
dependencies

P version 1.0.0-SNAPSHOT POM specifies A version as ${project.version}, so
it moves in synchronicity with P

we want to use maven release plugin to prepare two local changes for its
release. I use shell to illustrate, but the process can equally be done by
hand

export VERSION=1.0.0
export NEW_VERSION=1.0.1-SNAPSHOT

# Release the parent with 1.0
mvn -B -Dmaven.repo.local=${LOCAL_REPO} release:clean release:prepare
-DreleaseVersion=${VERSION} -Dtag=P-${VERSION}
-DdevelopmentVersion=${NEW_VERSION} -DpushChanges=false
#... it works

Now, after I approve the changes in P, I got for A
# clone and cd to A working copy
mvn -B release:clean release:prepare -DreleaseVersion=${VERSION}
-Dtag=${project}-${VERSION} -DdevelopmentVersion=${NEW_VERSION}
-DpushChanges=false -Dproject.rel.com.example.test.P=${VERSION}
-Dproject.dev.com.example.test.P=${NEW_VERSION}
# it does not work

It refuses to release or to take those values from the parametes. I must do
the release without the -B, using "yes\n\n", "1.0.0", "1.0.1-SNAPSHOT",
"A-1.0.0\n"

In case there are other dependencies (say, B that depends on P and A), the
plugin will ask for the versions of A, and the will not use them. It looks
like a separate issue, which could be summarized as
* maven-release-plugin does not recompute effective POM after new parent
version is give.

The first one could be summarized ad:
* maven-release-plugin does not allow to script versions for the parent
element in the POM.

All tests done with maven 3.0.4 and maven release plugin 2.4.1 and 2.4.2,
just in case.

Any clue?

Regards
Santiago

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message