You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ionut Scutaru <io...@gmail.com> on 2007/10/30 14:33:03 UTC

usage of maven release plugin (releasing a branch)

Hi guys,
We have a multi-module project; we are using 1.0.0-SNAPSHOT as version for
every module. We are trying to have a release at the end of  every week, so
our releases get the following form: 1.0.0-Wxx. In time we realized we need
to branch the project before releasing it so we have some time to fix the
critical issues that don't pass sanity testing.

What we want to do is to create a branch on the release day and not the
release itself (this one will be released 2-3 days after the branch is
done). The version of the trunk needs to remain the same (e.g.
1.0.0-SNAPSHOT) while the version of the branch needs to be changed to the
final version of the release (e.g. 1.0.0-Wxx). We tried to use mvn
release:branch to release a branch, but we are seeing an odd behavior: the
trunk's pom.xml files are modified as well - their version is changed to the
same one as the branch. This is hapening although we specify
-DupdateWorkingCopyVersions=false when we run the mvn release:branch
process.

Here's the entire command line we are using:
mvn release:branch -DupdateBranchVersions=true
-DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true
-DbranchName="Maven_Example_1.0.0"

Is this a desired behavior or maybe we are using it incorrectly ? Can
anybody recommend a "best practice" for branching (in conjunction with
maven, of course)

Thank you in advance.

Re: usage of maven release plugin (releasing a branch)

Posted by Ionut Scutaru <io...@gmail.com>.
This is the error I'm getting when doing a mvn release:rollback (after a mvn
release:branch).
Did anybody encountered this specific error before ?

..........................
[INFO]
----------------------------------------------------------------------------
[INFO] Building Maven 2 Example
[INFO]    task-segment: [release:rollback] (aggregator-style)
[INFO]
----------------------------------------------------------------------------
[INFO] [release:rollback]
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The scm url cannot be null.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException: The scm url cannot be null.
        at org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository
(AbstractScmManager.java:176)
        at
org.apache.maven.shared.release.scm.DefaultScmRepositoryConfigurator.getConfiguredRepository
(DefaultScmRepositoryConfigurator.java:62)
        at
org.apache.maven.shared.release.phase.RestoreBackupPomsPhase.restorePomBackup
(RestoreBackupPomsPhase.java:100)
        at
org.apache.maven.shared.release.phase.RestoreBackupPomsPhase.execute(
RestoreBackupPomsPhase.java:69)
        at org.apache.maven.shared.release.DefaultReleaseManager.rollback(
DefaultReleaseManager.java:248)
        at org.apache.maven.shared.release.DefaultReleaseManager.rollback(
DefaultReleaseManager.java:225)
        at org.apache.maven.plugins.release.RollbackReleaseMojo.execute(
RollbackReleaseMojo.java:49)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
DefaultLifecycleExecutor.java:493)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:463)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:224)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)







On 10/30/07, Ionut Scutaru <io...@gmail.com> wrote:
>
> Actually it's working fine... I was able to do the branch, after many
> hours of pain...
>
> The problem that I noticed is that , if there is even a small problem
> during the release:branch, I'm being left with all the changes commited in
> Subversion. Of course, mvn release:rollback doesn't work so I'm forced to
> make a manual rollback on subversion before going any further. (actually
> this is why it took me so much time)
>
> Does anybody if mvn release:rollback should work for the branch goal ?
>
> I faced so many problems during release:branch in a small, testing
> environment that makes me afraid of applying this procedure for our entire
> project. Guys, you really need to improve its reliability ...
>
>
>
> On 10/30/07, Ionut Scutaru <io...@gmail.com> wrote:
> >
> > Hi guys,
> > We have a multi-module project; we are using 1.0.0-SNAPSHOT as version
> > for every module. We are trying to have a release at the end of  every week,
> > so our releases get the following form: 1.0.0-Wxx. In time we realized
> > we need to branch the project before releasing it so we have some time to
> > fix the critical issues that don't pass sanity testing.
> >
> > What we want to do is to create a branch on the release day and not the
> > release itself (this one will be released 2-3 days after the branch is
> > done). The version of the trunk needs to remain the same (e.g.
> > 1.0.0-SNAPSHOT) while the version of the branch needs to be changed to
> > the final version of the release (e.g. 1.0.0-Wxx). We tried to use mvn
> > release:branch to release a branch, but we are seeing an odd behavior:
> > the trunk's pom.xml files are modified as well - their version is
> > changed to the same one as the branch. This is hapening although we specify
> > -DupdateWorkingCopyVersions=false when we run the mvn release:branch
> > process.
> >
> > Here's the entire command line we are using:
> > mvn release:branch -DupdateBranchVersions=true
> > -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true
> > -DbranchName="Maven_Example_1.0.0"
> >
> > Is this a desired behavior or maybe we are using it incorrectly ? Can
> > anybody recommend a "best practice" for branching (in conjunction with
> > maven, of course)
> >
> > Thank you in advance.
>
>
>

Re: usage of maven release plugin (releasing a branch)

Posted by Ionut Scutaru <io...@gmail.com>.
Actually it's working fine... I was able to do the branch, after many hours
of pain...

The problem that I noticed is that , if there is even a small problem during
the release:branch, I'm being left with all the changes commited in
Subversion. Of course, mvn release:rollback doesn't work so I'm forced to
make a manual rollback on subversion before going any further. (actually
this is why it took me so much time)

Does anybody if mvn release:rollback should work for the branch goal ?

I faced so many problems during release:branch in a small, testing
environment that makes me afraid of applying this procedure for our entire
project. Guys, you really need to improve its reliability ...



On 10/30/07, Ionut Scutaru <io...@gmail.com> wrote:
>
> Hi guys,
> We have a multi-module project; we are using 1.0.0-SNAPSHOT as version for
> every module. We are trying to have a release at the end of  every week, so
> our releases get the following form: 1.0.0-Wxx. In time we realized we
> need to branch the project before releasing it so we have some time to fix
> the critical issues that don't pass sanity testing.
>
> What we want to do is to create a branch on the release day and not the
> release itself (this one will be released 2-3 days after the branch is
> done). The version of the trunk needs to remain the same (e.g.
> 1.0.0-SNAPSHOT) while the version of the branch needs to be changed to the
> final version of the release (e.g. 1.0.0-Wxx). We tried to use mvn
> release:branch to release a branch, but we are seeing an odd behavior: the
> trunk's pom.xml files are modified as well - their version is changed to
> the same one as the branch. This is hapening although we specify
> -DupdateWorkingCopyVersions=false when we run the mvn release:branch
> process.
>
> Here's the entire command line we are using:
> mvn release:branch -DupdateBranchVersions=true
> -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true
> -DbranchName="Maven_Example_1.0.0"
>
> Is this a desired behavior or maybe we are using it incorrectly ? Can
> anybody recommend a "best practice" for branching (in conjunction with
> maven, of course)
>
> Thank you in advance.

Re: usage of maven release plugin (releasing a branch)

Posted by Ionut Scutaru <io...@gmail.com>.
Actually it was a typo in my mail.. our releases have the form of 1.0.0.Wxx
(as in 1.0.0.W44)

Would this be ok ?


Michael McCallum-3 wrote:
> 
> I would highly recommend that you tag your projects X.Y and when you build 
> branches introduce the .Z
> 
> maven treats the -SSS specially and makes it less e.g.
> 
> X.Y.Z-A < X.Y.Z 
> 
> which obviously causes odd behaviour..
> 
> I use versions like 1.0, 1.1, 1.2
> 
> and patches being builds off branches being 1.0.1, 1.0.2, 1.1.2 etc etc
> 
> On Wednesday 31 October 2007 02:33, Ionut Scutaru wrote:
>> Hi guys,
>> We have a multi-module project; we are using 1.0.0-SNAPSHOT as version
>> for
>> every module. We are trying to have a release at the end of  every week,
>> so
>> our releases get the following form: 1.0.0-Wxx. In time we realized we
>> need
>> to branch the project before releasing it so we have some time to fix the
>> critical issues that don't pass sanity testing.
>>
>> What we want to do is to create a branch on the release day and not the
>> release itself (this one will be released 2-3 days after the branch is
>> done). The version of the trunk needs to remain the same (e.g.
>> 1.0.0-SNAPSHOT) while the version of the branch needs to be changed to
>> the
>> final version of the release (e.g. 1.0.0-Wxx). We tried to use mvn
>> release:branch to release a branch, but we are seeing an odd behavior:
>> the
>> trunk's pom.xml files are modified as well - their version is changed to
>> the same one as the branch. This is hapening although we specify
>> -DupdateWorkingCopyVersions=false when we run the mvn release:branch
>> process.
>>
>> Here's the entire command line we are using:
>> mvn release:branch -DupdateBranchVersions=true
>> -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true
>> -DbranchName="Maven_Example_1.0.0"
>>
>> Is this a desired behavior or maybe we are using it incorrectly ? Can
>> anybody recommend a "best practice" for branching (in conjunction with
>> maven, of course)
>>
>> Thank you in advance.
> 
> -- 
> Michael McCallum
> Enterprise Engineer
> mailto:gholam@apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/usage-of-maven-release-plugin-%28releasing-a-branch%29-tf4718508s177.html#a13506204
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: usage of maven release plugin (releasing a branch)

Posted by Michael McCallum <gh...@apache.org>.
I would highly recommend that you tag your projects X.Y and when you build 
branches introduce the .Z

maven treats the -SSS specially and makes it less e.g.

X.Y.Z-A < X.Y.Z 

which obviously causes odd behaviour..

I use versions like 1.0, 1.1, 1.2

and patches being builds off branches being 1.0.1, 1.0.2, 1.1.2 etc etc

On Wednesday 31 October 2007 02:33, Ionut Scutaru wrote:
> Hi guys,
> We have a multi-module project; we are using 1.0.0-SNAPSHOT as version for
> every module. We are trying to have a release at the end of  every week, so
> our releases get the following form: 1.0.0-Wxx. In time we realized we need
> to branch the project before releasing it so we have some time to fix the
> critical issues that don't pass sanity testing.
>
> What we want to do is to create a branch on the release day and not the
> release itself (this one will be released 2-3 days after the branch is
> done). The version of the trunk needs to remain the same (e.g.
> 1.0.0-SNAPSHOT) while the version of the branch needs to be changed to the
> final version of the release (e.g. 1.0.0-Wxx). We tried to use mvn
> release:branch to release a branch, but we are seeing an odd behavior: the
> trunk's pom.xml files are modified as well - their version is changed to
> the same one as the branch. This is hapening although we specify
> -DupdateWorkingCopyVersions=false when we run the mvn release:branch
> process.
>
> Here's the entire command line we are using:
> mvn release:branch -DupdateBranchVersions=true
> -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true
> -DbranchName="Maven_Example_1.0.0"
>
> Is this a desired behavior or maybe we are using it incorrectly ? Can
> anybody recommend a "best practice" for branching (in conjunction with
> maven, of course)
>
> Thank you in advance.

-- 
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org

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