You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Lewis, Eric" <Er...@ipi.ch> on 2009/09/10 11:30:26 UTC

How to update parent during release:prepare

Hi

I'm trying to use release:prepare for a project with several modules.
The project has a parent which is a SNAPSHOT. Now my question is: How can I tell release:prepare to update the project's parent version to the parent's released version?

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


Re: How to update parent during release:prepare

Posted by Kalle Korhonen <ka...@gmail.com>.
But the release cycles of the company pom and your project shouldn't
be connected. I'd argue that you should only be using the same
released version of the company pom until it doesn't work for that
project anymore, and only then change to a new released version.
Furthermore, I think you should never use a snapshot version of a
parent unless it's part of the same multi-module build (i.e. shares
the same release cycle).

Kalle

On Fri, Sep 11, 2009 at 7:03 AM, Lewis, Eric <Er...@ipi.ch> wrote:
> Yes, that would be the ideal solution.
> In the meantime, I'm avoiding manual and error-prone work by putting the process into a shell script.
>
> Best regards,
> Eric
>
>> -----Ursprüngliche Nachricht-----
>> Von: Stephen Duncan Jr [mailto:stephen.duncan@gmail.com]
>> Gesendet: Freitag, 11. September 2009 15:57
>> An: Maven Users List
>> Betreff: Re: How to update parent during release:prepare
>>
>> I certainly have the exact same problem.  And using the
>> versions plugin only
>> helps somewhat in partially automating what I currently do
>> manually.  Last
>> time I made the mistake of not manually changing the parent
>> version, the
>> release plugin, I believe, offered to update to a released
>> version, but
>> didn't actually change it, resulting in what was essentially a broken
>> release (since it had a SNAPSHOT parent).  Similarly I face
>> problems with
>> the release plugin not handling SNAPSHOT versions of
>> "dependencies" declared
>> outside the dependencies section (typically using the maven-dependency
>> plugin instead).  I would like to see the release plugin
>> updated to handle
>> these rather than work around them with the versions plugin.
>>
>> -Stephen
>>
>> On Fri, Sep 11, 2009 at 9:51 AM, Lewis, Eric
>> <Er...@ipi.ch> wrote:
>>
>> > Thanks, that works well!
>> >
>> > However, I'm still wondering whether I'm the only one
>> releasing that way.
>> > It seems to me that the release plugin can only be used
>> together with the
>> > versions plugin.
>> > I think that most developers have some sort of company-wide
>> parent POM
>> > which they refer to, and when releasing, they probably all
>> have the same
>> > problem as I do.
>> >
>> > Best regards,
>> > Eric
>> >
>> >
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


AW: How to update parent during release:prepare

Posted by "Lewis, Eric" <Er...@ipi.ch>.
Yes, that would be the ideal solution.
In the meantime, I'm avoiding manual and error-prone work by putting the process into a shell script.

Best regards,
Eric 

> -----Ursprüngliche Nachricht-----
> Von: Stephen Duncan Jr [mailto:stephen.duncan@gmail.com] 
> Gesendet: Freitag, 11. September 2009 15:57
> An: Maven Users List
> Betreff: Re: How to update parent during release:prepare
> 
> I certainly have the exact same problem.  And using the 
> versions plugin only
> helps somewhat in partially automating what I currently do 
> manually.  Last
> time I made the mistake of not manually changing the parent 
> version, the
> release plugin, I believe, offered to update to a released 
> version, but
> didn't actually change it, resulting in what was essentially a broken
> release (since it had a SNAPSHOT parent).  Similarly I face 
> problems with
> the release plugin not handling SNAPSHOT versions of 
> "dependencies" declared
> outside the dependencies section (typically using the maven-dependency
> plugin instead).  I would like to see the release plugin 
> updated to handle
> these rather than work around them with the versions plugin.
> 
> -Stephen
> 
> On Fri, Sep 11, 2009 at 9:51 AM, Lewis, Eric 
> <Er...@ipi.ch> wrote:
> 
> > Thanks, that works well!
> >
> > However, I'm still wondering whether I'm the only one 
> releasing that way.
> > It seems to me that the release plugin can only be used 
> together with the
> > versions plugin.
> > I think that most developers have some sort of company-wide 
> parent POM
> > which they refer to, and when releasing, they probably all 
> have the same
> > problem as I do.
> >
> > Best regards,
> > Eric
> >
> >
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to update parent during release:prepare

Posted by Stephen Duncan Jr <st...@gmail.com>.
I certainly have the exact same problem.  And using the versions plugin only
helps somewhat in partially automating what I currently do manually.  Last
time I made the mistake of not manually changing the parent version, the
release plugin, I believe, offered to update to a released version, but
didn't actually change it, resulting in what was essentially a broken
release (since it had a SNAPSHOT parent).  Similarly I face problems with
the release plugin not handling SNAPSHOT versions of "dependencies" declared
outside the dependencies section (typically using the maven-dependency
plugin instead).  I would like to see the release plugin updated to handle
these rather than work around them with the versions plugin.

-Stephen

On Fri, Sep 11, 2009 at 9:51 AM, Lewis, Eric <Er...@ipi.ch> wrote:

> Thanks, that works well!
>
> However, I'm still wondering whether I'm the only one releasing that way.
> It seems to me that the release plugin can only be used together with the
> versions plugin.
> I think that most developers have some sort of company-wide parent POM
> which they refer to, and when releasing, they probably all have the same
> problem as I do.
>
> Best regards,
> Eric
>
>

Re: How to update parent during release:prepare

Posted by Stephen Connolly <st...@gmail.com>.
versions:commit does not actually commit to your scm... it just removes the
versionsBackup files (poor man's SCM)

there is nothing stopping your from running versions:update-parent from a
root aggregator pom and updating everything... then 1 big scm commit of the
pom changes

2009/9/11 Stephen Duncan Jr <st...@gmail.com>

> I think that's what he's referring to; it is in my case.  First I release
> the company-wide parent POM, then I begin releasing the rest of the
> projects, each of which need to have their parent declaration updated from
> the SNAPSHOT version to the just-released version.  Currently I do this
> manually to all projects I'm releasing (with the advantage of only adding
> one extra commit, whereas the versions-approach would be one extra commit
> PER project).
>
> -Stephen
>
> On Fri, Sep 11, 2009 at 9:57 AM, David Hoffer <dh...@gmail.com> wrote:
>
> > Woudn't it better to first release your company-wide parent poms
> > first?  Then release projects that refer to released poms?  Otherwise
> > it seems you would now have to chase down all the old references to
> > the prior snapshot parent and manually update.
> >
> > -Dave
> >
> > On Fri, Sep 11, 2009 at 7:51 AM, Lewis, Eric <Er...@ipi.ch> wrote:
> > > Thanks, that works well!
> > >
> > > However, I'm still wondering whether I'm the only one releasing that
> way.
> > > It seems to me that the release plugin can only be used together with
> the
> > versions plugin.
> > > I think that most developers have some sort of company-wide parent POM
> > which they refer to, and when releasing, they probably all have the same
> > problem as I do.
> > >
> > > Best regards,
> > > Eric
> > >
> > >> -----Ursprüngliche Nachricht-----
> > >> Von: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> > >> Gesendet: Freitag, 11. September 2009 15:41
> > >> An: Maven Users List
> > >> Betreff: Re: How to update parent during release:prepare
> > >>
> > >> before you run a release just run
> > >>
> > >> mvn versions:update-parent
> > >> mvn versions:commit
> > >> mvn release:prepare release:perform
> > >>
> > >> 2009/9/11 Lewis, Eric <Er...@ipi.ch>
> > >>
> > >> > Hi Dave
> > >> >
> > >> > Thanks for the answer, but it's not quite what I meant  :-)
> > >> >
> > >> > I don't mean the parent version within the modules, but the
> > >> parent version
> > >> > within the project (i.e. the module's parent).
> > >> >
> > >> > Let's say I have a company wide POM in the repo
> > >> >
> > >> > company-pom:1.2.0-SNAPSHOT
> > >> >
> > >> > which has been released to
> > >> >
> > >> > company-pom:1.2.0
> > >> >
> > >> >
> > >> > All my projects depend on this (showing hierarchies by
> > >> indenting and the
> > >> > specified parent in the POM with an arrow):
> > >> >
> > >> > my-project:3.0.0-SNAPSHOT -> company-pom:1.2.0-SNAPSHOT
> > >> >  my-module-1:2.1.0-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
> > >> >  my-module-2:5.3.7-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
> > >> >
> > >> > Now I need to release my-project, so the result should be
> > >> >
> > >> > my-project:3.0.0 -> company-pom:1.2.0
> > >> >  my-module-1:2.1.0 -> my-project:3.0.0
> > >> >  my-module-2:5.3.7 -> my-project:3.0.0
> > >> >
> > >> > As you say, changing the modules from  my-project:3.0.0-SNAPSHOT to
> > >> > my-project:3.0.0 is done with -DautoVersionSubmodules=true,
> > >> but how do I
> > >> > update company-pom:1.2.0-SNAPSHOT to company-pom:1.2.0
> > >> within my-project?
> > >> >
> > >> > Best regards,
> > >> > Eric
> > >> >
> > >> > > -----Ursprüngliche Nachricht-----
> > >> > > Von: David C. Hicks [mailto:dhicks@i-hicks.org]
> > >> > > Gesendet: Donnerstag, 10. September 2009 19:03
> > >> > > An: Maven Users List
> > >> > > Betreff: Re: How to update parent during release:prepare
> > >> > >
> > >> > > The autoVersionSubmodules property can be used to tell the release
> > >> > > plugin to use the Parent's version for all of the child
> > >> modules. Are
> > >> > > your modules all the same version as your parent? If so, then
> > >> > > it should
> > >> > > work as-is. I normally use the command:
> > >> > >
> > >> > > mvn -DautoVersionSubmodules=true release:prepare
> > >> > >
> > >> > > to start the process on a project with about 8 modules. It'll
> > >> > > ask me for
> > >> > > the release version of the parent and then the next
> > >> > > development version.
> > >> > > Beyond that, it's all automatic.
> > >> > >
> > >> > > Dave
> > >> > >
> > >> > >
> > >> > > On 09/10/2009 05:30 AM, Lewis, Eric wrote:
> > >> > > > Hi
> > >> > > >
> > >> > > > I'm trying to use release:prepare for a project with
> > >> > > several modules.
> > >> > > > The project has a parent which is a SNAPSHOT. Now my
> > >> > > question is: How can I tell release:prepare to update the
> > >> > > project's parent version to the parent's released version?
> > >> > > >
> > >> > > > Best regards,
> > >> > > > Eric
> > >> > > >
> > >> > >
> > >> ---------------------------------------------------------------------
> > >> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> > > > For additional commands, e-mail: users-help@maven.apache.org
> > >> > > >
> > >> > > >
> > >> > >
> > >> > >
> > >> ---------------------------------------------------------------------
> > >> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> > > For additional commands, e-mail: users-help@maven.apache.org
> > >> > >
> > >> > >
> > >> >
> > >> ---------------------------------------------------------------------
> > >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> > For additional commands, e-mail: users-help@maven.apache.org
> > >> >
> > >> >
> > >>
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Stephen Duncan Jr
> www.stephenduncanjr.com
>

Re: How to update parent during release:prepare

Posted by Stephen Duncan Jr <st...@gmail.com>.
I think that's what he's referring to; it is in my case.  First I release
the company-wide parent POM, then I begin releasing the rest of the
projects, each of which need to have their parent declaration updated from
the SNAPSHOT version to the just-released version.  Currently I do this
manually to all projects I'm releasing (with the advantage of only adding
one extra commit, whereas the versions-approach would be one extra commit
PER project).

-Stephen

On Fri, Sep 11, 2009 at 9:57 AM, David Hoffer <dh...@gmail.com> wrote:

> Woudn't it better to first release your company-wide parent poms
> first?  Then release projects that refer to released poms?  Otherwise
> it seems you would now have to chase down all the old references to
> the prior snapshot parent and manually update.
>
> -Dave
>
> On Fri, Sep 11, 2009 at 7:51 AM, Lewis, Eric <Er...@ipi.ch> wrote:
> > Thanks, that works well!
> >
> > However, I'm still wondering whether I'm the only one releasing that way.
> > It seems to me that the release plugin can only be used together with the
> versions plugin.
> > I think that most developers have some sort of company-wide parent POM
> which they refer to, and when releasing, they probably all have the same
> problem as I do.
> >
> > Best regards,
> > Eric
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> >> Gesendet: Freitag, 11. September 2009 15:41
> >> An: Maven Users List
> >> Betreff: Re: How to update parent during release:prepare
> >>
> >> before you run a release just run
> >>
> >> mvn versions:update-parent
> >> mvn versions:commit
> >> mvn release:prepare release:perform
> >>
> >> 2009/9/11 Lewis, Eric <Er...@ipi.ch>
> >>
> >> > Hi Dave
> >> >
> >> > Thanks for the answer, but it's not quite what I meant  :-)
> >> >
> >> > I don't mean the parent version within the modules, but the
> >> parent version
> >> > within the project (i.e. the module's parent).
> >> >
> >> > Let's say I have a company wide POM in the repo
> >> >
> >> > company-pom:1.2.0-SNAPSHOT
> >> >
> >> > which has been released to
> >> >
> >> > company-pom:1.2.0
> >> >
> >> >
> >> > All my projects depend on this (showing hierarchies by
> >> indenting and the
> >> > specified parent in the POM with an arrow):
> >> >
> >> > my-project:3.0.0-SNAPSHOT -> company-pom:1.2.0-SNAPSHOT
> >> >  my-module-1:2.1.0-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
> >> >  my-module-2:5.3.7-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
> >> >
> >> > Now I need to release my-project, so the result should be
> >> >
> >> > my-project:3.0.0 -> company-pom:1.2.0
> >> >  my-module-1:2.1.0 -> my-project:3.0.0
> >> >  my-module-2:5.3.7 -> my-project:3.0.0
> >> >
> >> > As you say, changing the modules from  my-project:3.0.0-SNAPSHOT to
> >> > my-project:3.0.0 is done with -DautoVersionSubmodules=true,
> >> but how do I
> >> > update company-pom:1.2.0-SNAPSHOT to company-pom:1.2.0
> >> within my-project?
> >> >
> >> > Best regards,
> >> > Eric
> >> >
> >> > > -----Ursprüngliche Nachricht-----
> >> > > Von: David C. Hicks [mailto:dhicks@i-hicks.org]
> >> > > Gesendet: Donnerstag, 10. September 2009 19:03
> >> > > An: Maven Users List
> >> > > Betreff: Re: How to update parent during release:prepare
> >> > >
> >> > > The autoVersionSubmodules property can be used to tell the release
> >> > > plugin to use the Parent's version for all of the child
> >> modules. Are
> >> > > your modules all the same version as your parent? If so, then
> >> > > it should
> >> > > work as-is. I normally use the command:
> >> > >
> >> > > mvn -DautoVersionSubmodules=true release:prepare
> >> > >
> >> > > to start the process on a project with about 8 modules. It'll
> >> > > ask me for
> >> > > the release version of the parent and then the next
> >> > > development version.
> >> > > Beyond that, it's all automatic.
> >> > >
> >> > > Dave
> >> > >
> >> > >
> >> > > On 09/10/2009 05:30 AM, Lewis, Eric wrote:
> >> > > > Hi
> >> > > >
> >> > > > I'm trying to use release:prepare for a project with
> >> > > several modules.
> >> > > > The project has a parent which is a SNAPSHOT. Now my
> >> > > question is: How can I tell release:prepare to update the
> >> > > project's parent version to the parent's released version?
> >> > > >
> >> > > > Best regards,
> >> > > > Eric
> >> > > >
> >> > >
> >> ---------------------------------------------------------------------
> >> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > > > For additional commands, e-mail: users-help@maven.apache.org
> >> > > >
> >> > > >
> >> > >
> >> > >
> >> ---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > > For additional commands, e-mail: users-help@maven.apache.org
> >> > >
> >> > >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > For additional commands, e-mail: users-help@maven.apache.org
> >> >
> >> >
> >>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Stephen Duncan Jr
www.stephenduncanjr.com

AW: How to update parent during release:prepare

Posted by "Lewis, Eric" <Er...@ipi.ch>.
Yes, this is exactly what I'm doing. Still, I want to change the parent to the released version *and* release the project in one go.
And it seems like this is only possible by combining the versions and the release plugins.

Best regards,
Eric

> -----Ursprüngliche Nachricht-----
> Von: David Hoffer [mailto:dhoffer6@gmail.com] 
> Gesendet: Freitag, 11. September 2009 15:57
> An: Maven Users List
> Betreff: Re: How to update parent during release:prepare
> 
> Woudn't it better to first release your company-wide parent poms
> first?  Then release projects that refer to released poms?  Otherwise
> it seems you would now have to chase down all the old references to
> the prior snapshot parent and manually update.
> 
> -Dave
> 
> On Fri, Sep 11, 2009 at 7:51 AM, Lewis, Eric 
> <Er...@ipi.ch> wrote:
> > Thanks, that works well!
> >
> > However, I'm still wondering whether I'm the only one 
> releasing that way.
> > It seems to me that the release plugin can only be used 
> together with the versions plugin.
> > I think that most developers have some sort of company-wide 
> parent POM which they refer to, and when releasing, they 
> probably all have the same problem as I do.
> >
> > Best regards,
> > Eric
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> >> Gesendet: Freitag, 11. September 2009 15:41
> >> An: Maven Users List
> >> Betreff: Re: How to update parent during release:prepare
> >>
> >> before you run a release just run
> >>
> >> mvn versions:update-parent
> >> mvn versions:commit
> >> mvn release:prepare release:perform
> >>
> >> 2009/9/11 Lewis, Eric <Er...@ipi.ch>
> >>
> >> > Hi Dave
> >> >
> >> > Thanks for the answer, but it's not quite what I meant  :-)
> >> >
> >> > I don't mean the parent version within the modules, but the
> >> parent version
> >> > within the project (i.e. the module's parent).
> >> >
> >> > Let's say I have a company wide POM in the repo
> >> >
> >> > company-pom:1.2.0-SNAPSHOT
> >> >
> >> > which has been released to
> >> >
> >> > company-pom:1.2.0
> >> >
> >> >
> >> > All my projects depend on this (showing hierarchies by
> >> indenting and the
> >> > specified parent in the POM with an arrow):
> >> >
> >> > my-project:3.0.0-SNAPSHOT -> company-pom:1.2.0-SNAPSHOT
> >> >  my-module-1:2.1.0-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
> >> >  my-module-2:5.3.7-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
> >> >
> >> > Now I need to release my-project, so the result should be
> >> >
> >> > my-project:3.0.0 -> company-pom:1.2.0
> >> >  my-module-1:2.1.0 -> my-project:3.0.0
> >> >  my-module-2:5.3.7 -> my-project:3.0.0
> >> >
> >> > As you say, changing the modules from  
> my-project:3.0.0-SNAPSHOT to
> >> > my-project:3.0.0 is done with -DautoVersionSubmodules=true,
> >> but how do I
> >> > update company-pom:1.2.0-SNAPSHOT to company-pom:1.2.0
> >> within my-project?
> >> >
> >> > Best regards,
> >> > Eric
> >> >
> >> > > -----Ursprüngliche Nachricht-----
> >> > > Von: David C. Hicks [mailto:dhicks@i-hicks.org]
> >> > > Gesendet: Donnerstag, 10. September 2009 19:03
> >> > > An: Maven Users List
> >> > > Betreff: Re: How to update parent during release:prepare
> >> > >
> >> > > The autoVersionSubmodules property can be used to tell 
> the release
> >> > > plugin to use the Parent's version for all of the child
> >> modules. Are
> >> > > your modules all the same version as your parent? If so, then
> >> > > it should
> >> > > work as-is. I normally use the command:
> >> > >
> >> > > mvn -DautoVersionSubmodules=true release:prepare
> >> > >
> >> > > to start the process on a project with about 8 modules. It'll
> >> > > ask me for
> >> > > the release version of the parent and then the next
> >> > > development version.
> >> > > Beyond that, it's all automatic.
> >> > >
> >> > > Dave
> >> > >
> >> > >
> >> > > On 09/10/2009 05:30 AM, Lewis, Eric wrote:
> >> > > > Hi
> >> > > >
> >> > > > I'm trying to use release:prepare for a project with
> >> > > several modules.
> >> > > > The project has a parent which is a SNAPSHOT. Now my
> >> > > question is: How can I tell release:prepare to update the
> >> > > project's parent version to the parent's released version?
> >> > > >
> >> > > > Best regards,
> >> > > > Eric
> >> > > >
> >> > >
> >> 
> ---------------------------------------------------------------------
> >> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > > > For additional commands, e-mail: users-help@maven.apache.org
> >> > > >
> >> > > >
> >> > >
> >> > >
> >> 
> ---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > > For additional commands, e-mail: users-help@maven.apache.org
> >> > >
> >> > >
> >> >
> >> 
> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > For additional commands, e-mail: users-help@maven.apache.org
> >> >
> >> >
> >>
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to update parent during release:prepare

Posted by David Hoffer <dh...@gmail.com>.
Woudn't it better to first release your company-wide parent poms
first?  Then release projects that refer to released poms?  Otherwise
it seems you would now have to chase down all the old references to
the prior snapshot parent and manually update.

-Dave

On Fri, Sep 11, 2009 at 7:51 AM, Lewis, Eric <Er...@ipi.ch> wrote:
> Thanks, that works well!
>
> However, I'm still wondering whether I'm the only one releasing that way.
> It seems to me that the release plugin can only be used together with the versions plugin.
> I think that most developers have some sort of company-wide parent POM which they refer to, and when releasing, they probably all have the same problem as I do.
>
> Best regards,
> Eric
>
>> -----Ursprüngliche Nachricht-----
>> Von: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
>> Gesendet: Freitag, 11. September 2009 15:41
>> An: Maven Users List
>> Betreff: Re: How to update parent during release:prepare
>>
>> before you run a release just run
>>
>> mvn versions:update-parent
>> mvn versions:commit
>> mvn release:prepare release:perform
>>
>> 2009/9/11 Lewis, Eric <Er...@ipi.ch>
>>
>> > Hi Dave
>> >
>> > Thanks for the answer, but it's not quite what I meant  :-)
>> >
>> > I don't mean the parent version within the modules, but the
>> parent version
>> > within the project (i.e. the module's parent).
>> >
>> > Let's say I have a company wide POM in the repo
>> >
>> > company-pom:1.2.0-SNAPSHOT
>> >
>> > which has been released to
>> >
>> > company-pom:1.2.0
>> >
>> >
>> > All my projects depend on this (showing hierarchies by
>> indenting and the
>> > specified parent in the POM with an arrow):
>> >
>> > my-project:3.0.0-SNAPSHOT -> company-pom:1.2.0-SNAPSHOT
>> >  my-module-1:2.1.0-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
>> >  my-module-2:5.3.7-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
>> >
>> > Now I need to release my-project, so the result should be
>> >
>> > my-project:3.0.0 -> company-pom:1.2.0
>> >  my-module-1:2.1.0 -> my-project:3.0.0
>> >  my-module-2:5.3.7 -> my-project:3.0.0
>> >
>> > As you say, changing the modules from  my-project:3.0.0-SNAPSHOT to
>> > my-project:3.0.0 is done with -DautoVersionSubmodules=true,
>> but how do I
>> > update company-pom:1.2.0-SNAPSHOT to company-pom:1.2.0
>> within my-project?
>> >
>> > Best regards,
>> > Eric
>> >
>> > > -----Ursprüngliche Nachricht-----
>> > > Von: David C. Hicks [mailto:dhicks@i-hicks.org]
>> > > Gesendet: Donnerstag, 10. September 2009 19:03
>> > > An: Maven Users List
>> > > Betreff: Re: How to update parent during release:prepare
>> > >
>> > > The autoVersionSubmodules property can be used to tell the release
>> > > plugin to use the Parent's version for all of the child
>> modules. Are
>> > > your modules all the same version as your parent? If so, then
>> > > it should
>> > > work as-is. I normally use the command:
>> > >
>> > > mvn -DautoVersionSubmodules=true release:prepare
>> > >
>> > > to start the process on a project with about 8 modules. It'll
>> > > ask me for
>> > > the release version of the parent and then the next
>> > > development version.
>> > > Beyond that, it's all automatic.
>> > >
>> > > Dave
>> > >
>> > >
>> > > On 09/10/2009 05:30 AM, Lewis, Eric wrote:
>> > > > Hi
>> > > >
>> > > > I'm trying to use release:prepare for a project with
>> > > several modules.
>> > > > The project has a parent which is a SNAPSHOT. Now my
>> > > question is: How can I tell release:prepare to update the
>> > > project's parent version to the parent's released version?
>> > > >
>> > > > Best regards,
>> > > > Eric
>> > > >
>> > >
>> ---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > > For additional commands, e-mail: users-help@maven.apache.org
>> > > >
>> > > >
>> > >
>> > >
>> ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > For additional commands, e-mail: users-help@maven.apache.org
>> > >
>> > >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


AW: How to update parent during release:prepare

Posted by "Lewis, Eric" <Er...@ipi.ch>.
Thanks, that works well!

However, I'm still wondering whether I'm the only one releasing that way.
It seems to me that the release plugin can only be used together with the versions plugin.
I think that most developers have some sort of company-wide parent POM which they refer to, and when releasing, they probably all have the same problem as I do.

Best regards,
Eric 

> -----Ursprüngliche Nachricht-----
> Von: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com] 
> Gesendet: Freitag, 11. September 2009 15:41
> An: Maven Users List
> Betreff: Re: How to update parent during release:prepare
> 
> before you run a release just run
> 
> mvn versions:update-parent
> mvn versions:commit
> mvn release:prepare release:perform
> 
> 2009/9/11 Lewis, Eric <Er...@ipi.ch>
> 
> > Hi Dave
> >
> > Thanks for the answer, but it's not quite what I meant  :-)
> >
> > I don't mean the parent version within the modules, but the 
> parent version
> > within the project (i.e. the module's parent).
> >
> > Let's say I have a company wide POM in the repo
> >
> > company-pom:1.2.0-SNAPSHOT
> >
> > which has been released to
> >
> > company-pom:1.2.0
> >
> >
> > All my projects depend on this (showing hierarchies by 
> indenting and the
> > specified parent in the POM with an arrow):
> >
> > my-project:3.0.0-SNAPSHOT -> company-pom:1.2.0-SNAPSHOT
> >  my-module-1:2.1.0-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
> >  my-module-2:5.3.7-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
> >
> > Now I need to release my-project, so the result should be
> >
> > my-project:3.0.0 -> company-pom:1.2.0
> >  my-module-1:2.1.0 -> my-project:3.0.0
> >  my-module-2:5.3.7 -> my-project:3.0.0
> >
> > As you say, changing the modules from  my-project:3.0.0-SNAPSHOT to
> > my-project:3.0.0 is done with -DautoVersionSubmodules=true, 
> but how do I
> > update company-pom:1.2.0-SNAPSHOT to company-pom:1.2.0 
> within my-project?
> >
> > Best regards,
> > Eric
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: David C. Hicks [mailto:dhicks@i-hicks.org]
> > > Gesendet: Donnerstag, 10. September 2009 19:03
> > > An: Maven Users List
> > > Betreff: Re: How to update parent during release:prepare
> > >
> > > The autoVersionSubmodules property can be used to tell the release
> > > plugin to use the Parent's version for all of the child 
> modules. Are
> > > your modules all the same version as your parent? If so, then
> > > it should
> > > work as-is. I normally use the command:
> > >
> > > mvn -DautoVersionSubmodules=true release:prepare
> > >
> > > to start the process on a project with about 8 modules. It'll
> > > ask me for
> > > the release version of the parent and then the next
> > > development version.
> > > Beyond that, it's all automatic.
> > >
> > > Dave
> > >
> > >
> > > On 09/10/2009 05:30 AM, Lewis, Eric wrote:
> > > > Hi
> > > >
> > > > I'm trying to use release:prepare for a project with
> > > several modules.
> > > > The project has a parent which is a SNAPSHOT. Now my
> > > question is: How can I tell release:prepare to update the
> > > project's parent version to the parent's released version?
> > > >
> > > > Best regards,
> > > > Eric
> > > >
> > > 
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to update parent during release:prepare

Posted by Stephen Connolly <st...@gmail.com>.
before you run a release just run

mvn versions:update-parent
mvn versions:commit
mvn release:prepare release:perform

2009/9/11 Lewis, Eric <Er...@ipi.ch>

> Hi Dave
>
> Thanks for the answer, but it's not quite what I meant  :-)
>
> I don't mean the parent version within the modules, but the parent version
> within the project (i.e. the module's parent).
>
> Let's say I have a company wide POM in the repo
>
> company-pom:1.2.0-SNAPSHOT
>
> which has been released to
>
> company-pom:1.2.0
>
>
> All my projects depend on this (showing hierarchies by indenting and the
> specified parent in the POM with an arrow):
>
> my-project:3.0.0-SNAPSHOT -> company-pom:1.2.0-SNAPSHOT
>  my-module-1:2.1.0-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
>  my-module-2:5.3.7-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
>
> Now I need to release my-project, so the result should be
>
> my-project:3.0.0 -> company-pom:1.2.0
>  my-module-1:2.1.0 -> my-project:3.0.0
>  my-module-2:5.3.7 -> my-project:3.0.0
>
> As you say, changing the modules from  my-project:3.0.0-SNAPSHOT to
> my-project:3.0.0 is done with -DautoVersionSubmodules=true, but how do I
> update company-pom:1.2.0-SNAPSHOT to company-pom:1.2.0 within my-project?
>
> Best regards,
> Eric
>
> > -----Ursprüngliche Nachricht-----
> > Von: David C. Hicks [mailto:dhicks@i-hicks.org]
> > Gesendet: Donnerstag, 10. September 2009 19:03
> > An: Maven Users List
> > Betreff: Re: How to update parent during release:prepare
> >
> > The autoVersionSubmodules property can be used to tell the release
> > plugin to use the Parent's version for all of the child modules. Are
> > your modules all the same version as your parent? If so, then
> > it should
> > work as-is. I normally use the command:
> >
> > mvn -DautoVersionSubmodules=true release:prepare
> >
> > to start the process on a project with about 8 modules. It'll
> > ask me for
> > the release version of the parent and then the next
> > development version.
> > Beyond that, it's all automatic.
> >
> > Dave
> >
> >
> > On 09/10/2009 05:30 AM, Lewis, Eric wrote:
> > > Hi
> > >
> > > I'm trying to use release:prepare for a project with
> > several modules.
> > > The project has a parent which is a SNAPSHOT. Now my
> > question is: How can I tell release:prepare to update the
> > project's parent version to the parent's released version?
> > >
> > > Best regards,
> > > Eric
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

AW: How to update parent during release:prepare

Posted by "Lewis, Eric" <Er...@ipi.ch>.
Hi Dave

Thanks for the answer, but it's not quite what I meant  :-)

I don't mean the parent version within the modules, but the parent version within the project (i.e. the module's parent).

Let's say I have a company wide POM in the repo

company-pom:1.2.0-SNAPSHOT

which has been released to

company-pom:1.2.0


All my projects depend on this (showing hierarchies by indenting and the specified parent in the POM with an arrow):

my-project:3.0.0-SNAPSHOT -> company-pom:1.2.0-SNAPSHOT
  my-module-1:2.1.0-SNAPSHOT -> my-project:3.0.0-SNAPSHOT
  my-module-2:5.3.7-SNAPSHOT -> my-project:3.0.0-SNAPSHOT

Now I need to release my-project, so the result should be

my-project:3.0.0 -> company-pom:1.2.0
  my-module-1:2.1.0 -> my-project:3.0.0
  my-module-2:5.3.7 -> my-project:3.0.0

As you say, changing the modules from  my-project:3.0.0-SNAPSHOT to my-project:3.0.0 is done with -DautoVersionSubmodules=true, but how do I update company-pom:1.2.0-SNAPSHOT to company-pom:1.2.0 within my-project?

Best regards,
Eric

> -----Ursprüngliche Nachricht-----
> Von: David C. Hicks [mailto:dhicks@i-hicks.org] 
> Gesendet: Donnerstag, 10. September 2009 19:03
> An: Maven Users List
> Betreff: Re: How to update parent during release:prepare
> 
> The autoVersionSubmodules property can be used to tell the release 
> plugin to use the Parent's version for all of the child modules. Are 
> your modules all the same version as your parent? If so, then 
> it should 
> work as-is. I normally use the command:
> 
> mvn -DautoVersionSubmodules=true release:prepare
> 
> to start the process on a project with about 8 modules. It'll 
> ask me for 
> the release version of the parent and then the next 
> development version. 
> Beyond that, it's all automatic.
> 
> Dave
> 
> 
> On 09/10/2009 05:30 AM, Lewis, Eric wrote:
> > Hi
> >
> > I'm trying to use release:prepare for a project with 
> several modules.
> > The project has a parent which is a SNAPSHOT. Now my 
> question is: How can I tell release:prepare to update the 
> project's parent version to the parent's released version?
> >
> > Best regards,
> > Eric
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >    
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to update parent during release:prepare

Posted by "David C. Hicks" <dh...@i-hicks.org>.
The autoVersionSubmodules property can be used to tell the release 
plugin to use the Parent's version for all of the child modules. Are 
your modules all the same version as your parent? If so, then it should 
work as-is. I normally use the command:

mvn -DautoVersionSubmodules=true release:prepare

to start the process on a project with about 8 modules. It'll ask me for 
the release version of the parent and then the next development version. 
Beyond that, it's all automatic.

Dave


On 09/10/2009 05:30 AM, Lewis, Eric wrote:
> Hi
>
> I'm trying to use release:prepare for a project with several modules.
> The project has a parent which is a SNAPSHOT. Now my question is: How can I tell release:prepare to update the project's parent version to the parent's released version?
>
> Best regards,
> Eric
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>    

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