You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by milewc <cl...@bmw.de> on 2011/01/21 14:44:59 UTC

maven-release-plugin

I have the following problem releasing a project with the
maven-release-plugin (version 2.1). I’m using the maven release plugin in
batch-mode. When using the release plugin in interactive mode, the plugin
prompts for the new versions of snapshot dependencies. How can I populate
the versions (development + release) of snapshot dependencies running the
mvn release:prepare command in batch-mode?
I 've tried something like this:

call mvn -B release:prepare -Dtag=0.4.0 \
    -DdevelopmentVersion=0.5.0-SNAPSHOT -DreleaseVersion=0.4.0 \
    -Ddependency.org.sonatype.mavenbook:project-a.release=0.4.0 \
    -Ddependency.org.sonatype.mavenbook:project-a.development=0.5.0-SNAPSHOT

and the pom content of project-b is as follows:

http://maven.40175.n5.nabble.com/file/n3351425/pom.xml pom.xml 
-- 
View this message in context: http://maven.40175.n5.nabble.com/maven-release-plugin-tp3351425p3351425.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-release-plugin

Posted by milewc <cl...@bmw.de>.
Thanks for your helpful answer!

The solution works fine:


REM Dependency-Snapshot-Versions are replaced by the corresponding release
version (e.g. 0.4.0-SNAPSHOT --> 0.4.0)
call mvn versions:use-releases
call svn commit

REM Release Prepare and install to local repository
call mvn -B release:prepare -Dtag=0.4.0 -DdevelopmentVersion=0.5.0-SNAPSHOT
-DreleaseVersion=0.4.0 -DpreparationGoals=clean install

REM Dependency-Release-Versions are replaced by the newest Snapshot-Version
call mvn versions:use-latest-snapshots
call svn commit

-- 
View this message in context: http://maven.40175.n5.nabble.com/maven-release-plugin-update-dependency-snapshots-to-versions-in-batch-mode-tp3351425p3359398.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-release-plugin

Posted by Wayne Fay <wa...@gmail.com>.
> are not any submodules, the problem is, that the dependency to project-a has
> a snaphot version at release time and needs to be updated to a release
> version.

versions-maven-plugin (codehaus) may be worth taking a look at to help
with versioning issues.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-release-plugin

Posted by milewc <cl...@bmw.de>.
No, it's a very simple project structure without any submodules. The problem
are not any submodules, the problem is, that the dependency to project-a has
a snaphot version at release time and needs to be updated to a release
version.
-- 
View this message in context: http://maven.40175.n5.nabble.com/maven-release-plugin-update-dependency-snapshots-to-versions-in-batch-mode-tp3351425p3351456.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-release-plugin

Posted by Anders Hammar <an...@hammar.net>.
I think what you want is something like:

mvn -B release:prepare -Dtag=0.4.0 -DdevelopmentVersion=0.5.0-SNAPSHOT
-DreleaseVersion=0.4.0 -DautoVersionSubmodules=true

autoVersionSubmodules could be configured in your pom (in the
pluginManagement section), so that you don't have to specify it each time
(if you always want all modules to have the same version).

/Anders

On Fri, Jan 21, 2011 at 14:44, milewc <cl...@bmw.de> wrote:

>
> I have the following problem releasing a project with the
> maven-release-plugin (version 2.1). I’m using the maven release plugin in
> batch-mode. When using the release plugin in interactive mode, the plugin
> prompts for the new versions of snapshot dependencies. How can I populate
> the versions (development + release) of snapshot dependencies running the
> mvn release:prepare command in batch-mode?
> I 've tried something like this:
>
> call mvn -B release:prepare -Dtag=0.4.0 \
>    -DdevelopmentVersion=0.5.0-SNAPSHOT -DreleaseVersion=0.4.0 \
>    -Ddependency.org.sonatype.mavenbook:project-a.release=0.4.0 \
>    -Ddependency.org.sonatype.mavenbook:project-a.development=0.5.0-SNAPSHOT
>
> and the pom content of project-b is as follows:
>
> http://maven.40175.n5.nabble.com/file/n3351425/pom.xml pom.xml
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/maven-release-plugin-tp3351425p3351425.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>