Re: Re: Right behaviour of versions:update-properties?

2012-07-13 Thread Stephen Connolly
On 13 July 2012 10:01,  wrote:

> On Friday, 13 July 2012, wrote:
>
> > Hi all,
> >
> > I made some tests with the Versions Maven Plugin and the behaviour of
> the
> > goal versions:update-properties is different from my expectation.
> >
> > I have two artifacts in my repository:
> >
> > 1. pom-projet-a with the version 1.4.0 and 1.5.0-SNAPSHOT
> > 2. jar-project-b with the version 1.11.0 and 1.12.0-SNAPSHOT
> >
> > In a third project I have following pom definition:
> >
> > 
> > mycompany
> > pom-project-a
> > 1.5.0-SNAPSHOT
> > 
> >
> > pom
> >
> > release-test
> > 1.0.0-SNAPSHOT
> >
> > 
> > 1.12.0-SNAPSHOT
> > 
> >
> > Release Test
> >
> >
> > 
> > 
> > mycompany
> > jar-project-b
> > ${jar.version}
> > 
> > 
> >
> > When I call the goal versions:update-parent, the Versions Maven Plugin
> > changes the version number to the last release version (here 1.4.0).
> This
> > is what I expect.
>
>
> If 1.5.0-SNAPSHOT is in the reactor/local/remote repo it should leave as
> is. If this is not the case then you have a bug
>
> It is.
>
> When I call the goal versions:update-properties, the
> > version in the property "jar.version" isn't changed. I would expect,
> that
> > the plugin would change the version number to the last release version
> > (here 1.11.0) , too.
>
>
> Should never downgrade to older versions, so FAD
>
> Usually I agree with you, but both projects (pom-project-a and
> jar-project-b) are under my control. The use case I tried is I don't make
> change in pom-project-a and jar-project-b but in release-test. So I want
> to release release-test. Because of no change in pom-project-a and
> jar-project-b I can "downgrade to older versions". Perhaps Versions Maven
> Plugin is not the right tool for my use case.
>
>
> >
> > I made another test. I put the artifact jar-project-b with the version
> > 1.12.0 in my repository, so I have the version 1.11.0, 1.12.0,
> > 1.12.0-SNAPSHOT in my repository. When I call now the goal
> > versions:update-properties, the version in the property  "jar.version"
> is
> > changed to 1.12.0. (the last release version).
>
>
> FAD
>
>
> >
> > Now my question is:
> > Is this a bug in the plugin or is my expectation wrong?
>
>
> Update-* should only move forward
>
> Maybe I missunderstand the documentation of the goal because of the flag
> -DallowsSnapshot.
>

That just says that it can upgrade to a newer -SNAPSHOT

but keep in mind that 1.1-SNAPSHOT is earlier than 1.1


>
> Update-parent has a special case where it will try to fix child projects
> so
> they can be built, a side-effect is that it might downgrade to a real
> version... Perhaps that "feature" could be moved to a fix-parent goal
>
> >
> > Kind regards
> >
> > Sandra
> >
> >
> > IT Solutions / Software Development
> > Rhenus Freight Logistics GmbH & Co.KG, Rhenus-Platz 1, 59439
> Holzwickede,
> > Deutschland
> > www.rhenus.com;
> >
> > Sitz: Unna, AG Hamm, HRA 2089; phG: Rhenus Freight Logistics Verwaltungs
> > GmbH, Unna, AG Hamm HRB 3422; Geschäftsführer: Petra Finke, Herbert
> > Joeres, Dr.Martin Neese, Lutz Welter
>
>


Antwort: Re: Right behaviour of versions:update-properties?

2012-07-13 Thread Sandra . Kosmalla
On Friday, 13 July 2012, wrote:

> Hi all,
>
> I made some tests with the Versions Maven Plugin and the behaviour of 
the
> goal versions:update-properties is different from my expectation.
>
> I have two artifacts in my repository:
>
> 1. pom-projet-a with the version 1.4.0 and 1.5.0-SNAPSHOT
> 2. jar-project-b with the version 1.11.0 and 1.12.0-SNAPSHOT
>
> In a third project I have following pom definition:
>
> 
> mycompany
> pom-project-a
> 1.5.0-SNAPSHOT
> 
>
> pom
>
> release-test
> 1.0.0-SNAPSHOT
>
> 
> 1.12.0-SNAPSHOT
> 
>
> Release Test
>
>
> 
> 
> mycompany
> jar-project-b
> ${jar.version}
> 
> 
>
> When I call the goal versions:update-parent, the Versions Maven Plugin
> changes the version number to the last release version (here 1.4.0). 
This
> is what I expect.


If 1.5.0-SNAPSHOT is in the reactor/local/remote repo it should leave as
is. If this is not the case then you have a bug

It is. 

When I call the goal versions:update-properties, the
> version in the property "jar.version" isn't changed. I would expect, 
that
> the plugin would change the version number to the last release version
> (here 1.11.0) , too.


Should never downgrade to older versions, so FAD

Usually I agree with you, but both projects (pom-project-a and 
jar-project-b) are under my control. The use case I tried is I don't make 
change in pom-project-a and jar-project-b but in release-test. So I want 
to release release-test. Because of no change in pom-project-a and 
jar-project-b I can "downgrade to older versions". Perhaps Versions Maven 
Plugin is not the right tool for my use case.


>
> I made another test. I put the artifact jar-project-b with the version
> 1.12.0 in my repository, so I have the version 1.11.0, 1.12.0,
> 1.12.0-SNAPSHOT in my repository. When I call now the goal
> versions:update-properties, the version in the property  "jar.version" 
is
> changed to 1.12.0. (the last release version).


FAD


>
> Now my question is:
> Is this a bug in the plugin or is my expectation wrong?


Update-* should only move forward 

Maybe I missunderstand the documentation of the goal because of the flag 
-DallowsSnapshot.

Update-parent has a special case where it will try to fix child projects 
so
they can be built, a side-effect is that it might downgrade to a real
version... Perhaps that "feature" could be moved to a fix-parent goal

>
> Kind regards
>
> Sandra
>
>
> IT Solutions / Software Development
> Rhenus Freight Logistics GmbH & Co.KG, Rhenus-Platz 1, 59439 
Holzwickede,
> Deutschland
> www.rhenus.com;
>
> Sitz: Unna, AG Hamm, HRA 2089; phG: Rhenus Freight Logistics Verwaltungs
> GmbH, Unna, AG Hamm HRB 3422; Geschäftsführer: Petra Finke, Herbert
> Joeres, Dr.Martin Neese, Lutz Welter



Re: Right behaviour of versions:update-properties?

2012-07-13 Thread Stephen Connolly
On Friday, 13 July 2012, wrote:

> Hi all,
>
> I made some tests with the Versions Maven Plugin and the behaviour of the
> goal versions:update-properties is different from my expectation.
>
> I have two artifacts in my repository:
>
> 1. pom-projet-a with the version 1.4.0 and 1.5.0-SNAPSHOT
> 2. jar-project-b with the version 1.11.0 and 1.12.0-SNAPSHOT
>
> In a third project I have following pom definition:
>
> 
> mycompany
> pom-project-a
> 1.5.0-SNAPSHOT
> 
>
> pom
>
> release-test
> 1.0.0-SNAPSHOT
>
> 
> 1.12.0-SNAPSHOT
> 
>
> Release Test
>
>
> 
> 
> mycompany
> jar-project-b
> ${jar.version}
> 
> 
>
> When I call the goal versions:update-parent, the Versions Maven Plugin
> changes the version number to the last release version (here 1.4.0). This
> is what I expect.


If 1.5.0-SNAPSHOT is in the reactor/local/remote repo it should leave as
is. If this is not the case then you have a bug

When I call the goal versions:update-properties, the
> version in the property "jar.version" isn't changed. I would expect, that
> the plugin would change the version number to the last release version
> (here 1.11.0) , too.


Should never downgrade to older versions, so FAD


>
> I made another test. I put the artifact jar-project-b with the version
> 1.12.0 in my repository, so I have the version 1.11.0, 1.12.0,
> 1.12.0-SNAPSHOT in my repository. When I call now the goal
> versions:update-properties, the version in the property  "jar.version" is
> changed to 1.12.0. (the last release version).


FAD


>
> Now my question is:
> Is this a bug in the plugin or is my expectation wrong?


Update-* should only move forward

Update-parent has a special case where it will try to fix child projects so
they can be built, a side-effect is that it might downgrade to a real
version... Perhaps that "feature" could be moved to a fix-parent goal

>
> Kind regards
>
> Sandra
>
>
> IT Solutions / Software Development
> Rhenus Freight Logistics GmbH & Co.KG, Rhenus-Platz 1, 59439 Holzwickede,
> Deutschland
> www.rhenus.com;
>
> Sitz: Unna, AG Hamm, HRA 2089; phG: Rhenus Freight Logistics Verwaltungs
> GmbH, Unna, AG Hamm HRB 3422; Geschäftsführer: Petra Finke, Herbert
> Joeres, Dr.Martin Neese, Lutz Welter