You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien HENRY <he...@yahoo.fr> on 2009/10/22 13:22:43 UTC

Re : Updating properties defined in pom from command line

Hi Stephen,

Have you already tested the solution you propose? I tried and it is not working so I was wondering if there is something wrong in my use or if it is a plugin bug.

My test case:
I have a property in my pom:
<test.prop.version>1.3</test.prop.version>
running mvn versions:update-properties the value is changed to
<test.prop.version>1.4</test.prop.version>

but when I put this configuration in the pom:
          <properties>
            ...
            <property>
              <name>test.prop.version</name>
              ...
              <version>[1.4]</version><!--Testing with a fixed value-->
              ...
            </property>
            ...
          </properties>
reverting to
<test.prop.version>1.3</test.prop.version>
and running mvn versions:update-properties the value is not changed. There is no error but only:
Property ${test.prop.version}: Leaving unchanged as 1.3

Of course using a property instead of a fixed value in property configuration doesn't work better.

Any idea?

Thanks

Julien





________________________________
De : Stephen Connolly <st...@gmail.com>
À : Maven Users List <us...@maven.apache.org>
Envoyé le : Jeu 22 Octobre 2009, 12 h 15 min 57 s
Objet : Re: Updating properties defined in pom from command line

you should be able to define a range to restrict updates to within a
range...

e.g. add a config section with a version restriction specified and have that
defined by a property

<project>
  ...
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          ...
          <properties>
            ...
            <property>
              <name>manchu.version</name>
              ...
              <version>[${magic}]</version>
              ...
            </property>
            ...
          </properties>
          ...
        </configuration>
      </plugin>
      ...
    </plugins>
    ...
  </build>
  ...
</project>


then

mvn versions:updateProperties -Dmagic=newAVersion


2009/10/22 Julien HENRY <he...@yahoo.fr>

> Hi,
>
> I'm working on a script that will automatically release many artifacts. For
> example I have 2 Maven projects (say A and B). B have a dependency on A. The
> dependency version is expressed using a property (say ${A.version}).
> In the SVN trunk, in B.pom, A.version=1-SNAPSHOT.
> A and B are independent Maven modules (not multi-module).
>
> Basically, the script is aware of the release order and will:
>  - svn checkout A
>  - mvn release:prepare release:perform -B -DreleaseVersion=1-RC1 (batch
> mode so release version was a parameter of the script)
>  - svn checkout B
>  - update A dependency in B.pom to 1-RC1
>  - mvn release:prepare release:perform -B -DreleaseVersion=4-RC1
>
>
> My question is: how can I update A dependency in B.pom? I tried to use
> versions-maven-plugin but the plugin is too smart for my usage as it always
> try to update to the latest released version. What I want is to be able to
> say: "update property named A.version to value 1-RC1" even if A was already
> released in version 2.
>
> Do you know a way to do this?
>
> Thanks,
>
> Julien
>
>
>
>



      

Re: maven 2.2.1: is there an inherent pom?

Posted by Nick Stolwijk <ni...@gmail.com>.
Yes, there is a superpom in Maven, which only changes between Maven
versions. In there are all the plugins Maven binds by default to its various
lifecycles and packagings.

If you want to make sure you can control your build, create a company pom
and use the enforcer to ensure the maven version and plugin versions.

[1] http://www.sonatype.com/people/2008/04/maven-209-released/
[2] http://maven.apache.org/plugins/maven-enforcer-plugin/

Hth,
Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl


On Thu, Oct 22, 2009 at 1:42 PM, Rebholz Paul <Pa...@six-group.com>wrote:

> hello maven users
>
> these days I was trying to figure out if maven 2.2.1 comes with a
> version-fixed set of plugins, i.e. if there is an inherent pom which
> fixes this.
>
> We are building our SW with maven and want to make sure that using maven
> 2.2.1 yields the same results right now as it would in the future, in
> other words, is there a guarantee that - out of the box - no newer
> plugin versions are used in the future?
>
> Is there someone out there who can confirm this?
>
> Regards, Paul
>
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. If you receive
> this message in error, please notify the sender urgently and then
> immediately delete the message and any copies of it from your system. Please
> also immediately destroy any hardcopies of the message.
> The sender's company reserves the right to monitor all e-mail
> communications through their networks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven 2.2.1: is there an inherent pom?

Posted by Anders Hammar <an...@hammar.net>.
Since Maven 2.0.9 (I believe) Maven comes with fixed version for some
plugins. This is done through a pluginManagement section in the super POM.
Thus, you can change these values by overriding them in your pom. However,
this is by no means a complete set and only includes the common ones. You
can have a look yourself if you check out the file pom-4.0.0.xml which can
be found in Maven's über jar (maven-2.2.1-uber.jar for Maven 2.2.1) in teh
Maven distro.
Best practise is still to do this in pluginManagement in your project (in
some parent pom)! One reasons is that the set in the super pom is not
complete. Another is that changing Maven version will otherwise also change
some plugin versions.

/Anders

On Thu, Oct 22, 2009 at 13:42, Rebholz Paul <Pa...@six-group.com>wrote:

> hello maven users
>
> these days I was trying to figure out if maven 2.2.1 comes with a
> version-fixed set of plugins, i.e. if there is an inherent pom which
> fixes this.
>
> We are building our SW with maven and want to make sure that using maven
> 2.2.1 yields the same results right now as it would in the future, in
> other words, is there a guarantee that - out of the box - no newer
> plugin versions are used in the future?
>
> Is there someone out there who can confirm this?
>
> Regards, Paul
>
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. If you receive
> this message in error, please notify the sender urgently and then
> immediately delete the message and any copies of it from your system. Please
> also immediately destroy any hardcopies of the message.
> The sender's company reserves the right to monitor all e-mail
> communications through their networks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: maven 2.2.1: is there an inherent pom?

Posted by Rebholz Paul <Pa...@six-group.com>.
thanks a lot for your help, Nick, Martin and Anders.

I'll check this out in detail and come back should I be stuck again.

Cheers, Paul 

-----Original Message-----
From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com] 
Sent: Donnerstag, 22. Oktober 2009 15:34
To: Maven Users List
Subject: Re: maven 2.2.1: is there an inherent pom?

> <version>2.2.1</version>

Using this config you ensure that your maven version is at least 2.2.1,
so
newer versions with newer plugin versions will still be allowed. If you
really want to build only with 2.2.1 you are looking for [2.2.1].

Hth,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl


On Thu, Oct 22, 2009 at 3:31 PM, Martin Gainty <mg...@hotmail.com>
wrote:

> <version>2.2.1</version>
> 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. 
The sender's company reserves the right to monitor all e-mail communications through their networks.

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


Re: maven 2.2.1: is there an inherent pom?

Posted by Nick Stolwijk <ni...@gmail.com>.
> <version>2.2.1</version>

Using this config you ensure that your maven version is at least 2.2.1, so
newer versions with newer plugin versions will still be allowed. If you
really want to build only with 2.2.1 you are looking for [2.2.1].

Hth,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl


On Thu, Oct 22, 2009 at 3:31 PM, Martin Gainty <mg...@hotmail.com> wrote:

> <version>2.2.1</version>
>

maven 2.2.1: is there an inherent pom?

Posted by Rebholz Paul <Pa...@six-group.com>.
hello maven users

these days I was trying to figure out if maven 2.2.1 comes with a
version-fixed set of plugins, i.e. if there is an inherent pom which
fixes this.

We are building our SW with maven and want to make sure that using maven
2.2.1 yields the same results right now as it would in the future, in
other words, is there a guarantee that - out of the box - no newer
plugin versions are used in the future?

Is there someone out there who can confirm this?

Regards, Paul 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. 
The sender's company reserves the right to monitor all e-mail communications through their networks.

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


Re: Re : Re : Updating properties defined in pom from command line

Posted by Stephen Connolly <st...@gmail.com>.
If it isn't easy to fix we can always add an update-property mojo that takes
a -DnewValue=___ property

2009/10/22 Stephen Connolly <st...@gmail.com>

> I haven't looked at the test cases yet...
>
> in theory yes
>
> ;-)
>
> -Stephen
>
> 2009/10/22 Julien HENRY <he...@yahoo.fr>
>
> Bug submitted with 2 IT test cases (1st with value fixed in the pom and 2nd
>> with a property specified on the command line).
>>
>> MVERSIONS-80
>>
>> I didn't have looked at the plugin code yet and I would like to know if
>> this is something that will be easily fixed. What is your opinion?
>>
>> Thanks,
>>
>> Julien
>>
>>
>> ----- Message d'origine ----
>> > De : Stephen Connolly <st...@gmail.com>
>> > À : Maven Users List <us...@maven.apache.org>
>> > Envoyé le : Jeu 22 Octobre 2009, 13 h 36 min 30 s
>> > Objet : Re: Re : Updating properties defined in pom from command line
>> >
>> > sounds like a bug... if you can produce an integration test and file a
>> JIRA
>> > that would be great... I cannot look into this at the moment [swamped at
>> > work]
>> >
>> > 2009/10/22 Julien HENRY
>> >
>> > > Hi Stephen,
>> > >
>> > > Have you already tested the solution you propose? I tried and it is
>> not
>> > > working so I was wondering if there is something wrong in my use or if
>> it is
>> > > a plugin bug.
>> > >
>> > > My test case:
>> > > I have a property in my pom:
>> > > 1.3
>> > > running mvn versions:update-properties the value is changed to
>> > > 1.4
>> > >
>> > > but when I put this configuration in the pom:
>> > >
>> > >            ...
>> > >
>> > >              test.prop.version
>> > >              ...
>> > >              [1.4]
>> > >              ...
>> > >
>> > >            ...
>> > >
>> > > reverting to
>> > > 1.3
>> > > and running mvn versions:update-properties the value is not changed.
>> There
>> > > is no error but only:
>> > > Property ${test.prop.version}: Leaving unchanged as 1.3
>> > >
>> > > Of course using a property instead of a fixed value in property
>> > > configuration doesn't work better.
>> > >
>> > > Any idea?
>> > >
>> > > Thanks
>> > >
>> > > Julien
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > ________________________________
>> > > De : Stephen Connolly
>> > > À : Maven Users List
>> > > Envoyé le : Jeu 22 Octobre 2009, 12 h 15 min 57 s
>> > > Objet : Re: Updating properties defined in pom from command line
>> > >
>> > > you should be able to define a range to restrict updates to within a
>> > > range...
>> > >
>> > > e.g. add a config section with a version restriction specified and
>> have
>> > > that
>> > > defined by a property
>> > >
>> > >
>> > >  ...
>> > >
>> > >    ...
>> > >
>> > >      ...
>> > >
>> > >        org.codehaus.mojo
>> > >        versions-maven-plugin
>> > >        1.0
>> > >
>> > >          ...
>> > >
>> > >            ...
>> > >
>> > >              manchu.version
>> > >              ...
>> > >              [${magic}]
>> > >              ...
>> > >
>> > >            ...
>> > >
>> > >          ...
>> > >
>> > >
>> > >      ...
>> > >
>> > >    ...
>> > >
>> > >  ...
>> > >
>> > >
>> > >
>> > > then
>> > >
>> > > mvn versions:updateProperties -Dmagic=newAVersion
>> > >
>> > >
>> > > 2009/10/22 Julien HENRY
>> > >
>> > > > Hi,
>> > > >
>> > > > I'm working on a script that will automatically release many
>> artifacts.
>> > > For
>> > > > example I have 2 Maven projects (say A and B). B have a dependency
>> on A.
>> > > The
>> > > > dependency version is expressed using a property (say ${A.version}).
>> > > > In the SVN trunk, in B.pom, A.version=1-SNAPSHOT.
>> > > > A and B are independent Maven modules (not multi-module).
>> > > >
>> > > > Basically, the script is aware of the release order and will:
>> > > >  - svn checkout A
>> > > >  - mvn release:prepare release:perform -B -DreleaseVersion=1-RC1
>> (batch
>> > > > mode so release version was a parameter of the script)
>> > > >  - svn checkout B
>> > > >  - update A dependency in B.pom to 1-RC1
>> > > >  - mvn release:prepare release:perform -B -DreleaseVersion=4-RC1
>> > > >
>> > > >
>> > > > My question is: how can I update A dependency in B.pom? I tried to
>> use
>> > > > versions-maven-plugin but the plugin is too smart for my usage as it
>> > > always
>> > > > try to update to the latest released version. What I want is to be
>> able
>> > > to
>> > > > say: "update property named A.version to value 1-RC1" even if A was
>> > > already
>> > > > released in version 2.
>> > > >
>> > > > Do you know a way to do this?
>> > > >
>> > > > Thanks,
>> > > >
>> > > > Julien
>> > > >
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > >
>> > >
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

Re: Re : Re : Updating properties defined in pom from command line

Posted by Stephen Connolly <st...@gmail.com>.
I haven't looked at the test cases yet...

in theory yes

;-)

-Stephen

2009/10/22 Julien HENRY <he...@yahoo.fr>

> Bug submitted with 2 IT test cases (1st with value fixed in the pom and 2nd
> with a property specified on the command line).
>
> MVERSIONS-80
>
> I didn't have looked at the plugin code yet and I would like to know if
> this is something that will be easily fixed. What is your opinion?
>
> Thanks,
>
> Julien
>
>
> ----- Message d'origine ----
> > De : Stephen Connolly <st...@gmail.com>
> > À : Maven Users List <us...@maven.apache.org>
> > Envoyé le : Jeu 22 Octobre 2009, 13 h 36 min 30 s
> > Objet : Re: Re : Updating properties defined in pom from command line
> >
> > sounds like a bug... if you can produce an integration test and file a
> JIRA
> > that would be great... I cannot look into this at the moment [swamped at
> > work]
> >
> > 2009/10/22 Julien HENRY
> >
> > > Hi Stephen,
> > >
> > > Have you already tested the solution you propose? I tried and it is not
> > > working so I was wondering if there is something wrong in my use or if
> it is
> > > a plugin bug.
> > >
> > > My test case:
> > > I have a property in my pom:
> > > 1.3
> > > running mvn versions:update-properties the value is changed to
> > > 1.4
> > >
> > > but when I put this configuration in the pom:
> > >
> > >            ...
> > >
> > >              test.prop.version
> > >              ...
> > >              [1.4]
> > >              ...
> > >
> > >            ...
> > >
> > > reverting to
> > > 1.3
> > > and running mvn versions:update-properties the value is not changed.
> There
> > > is no error but only:
> > > Property ${test.prop.version}: Leaving unchanged as 1.3
> > >
> > > Of course using a property instead of a fixed value in property
> > > configuration doesn't work better.
> > >
> > > Any idea?
> > >
> > > Thanks
> > >
> > > Julien
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > De : Stephen Connolly
> > > À : Maven Users List
> > > Envoyé le : Jeu 22 Octobre 2009, 12 h 15 min 57 s
> > > Objet : Re: Updating properties defined in pom from command line
> > >
> > > you should be able to define a range to restrict updates to within a
> > > range...
> > >
> > > e.g. add a config section with a version restriction specified and have
> > > that
> > > defined by a property
> > >
> > >
> > >  ...
> > >
> > >    ...
> > >
> > >      ...
> > >
> > >        org.codehaus.mojo
> > >        versions-maven-plugin
> > >        1.0
> > >
> > >          ...
> > >
> > >            ...
> > >
> > >              manchu.version
> > >              ...
> > >              [${magic}]
> > >              ...
> > >
> > >            ...
> > >
> > >          ...
> > >
> > >
> > >      ...
> > >
> > >    ...
> > >
> > >  ...
> > >
> > >
> > >
> > > then
> > >
> > > mvn versions:updateProperties -Dmagic=newAVersion
> > >
> > >
> > > 2009/10/22 Julien HENRY
> > >
> > > > Hi,
> > > >
> > > > I'm working on a script that will automatically release many
> artifacts.
> > > For
> > > > example I have 2 Maven projects (say A and B). B have a dependency on
> A.
> > > The
> > > > dependency version is expressed using a property (say ${A.version}).
> > > > In the SVN trunk, in B.pom, A.version=1-SNAPSHOT.
> > > > A and B are independent Maven modules (not multi-module).
> > > >
> > > > Basically, the script is aware of the release order and will:
> > > >  - svn checkout A
> > > >  - mvn release:prepare release:perform -B -DreleaseVersion=1-RC1
> (batch
> > > > mode so release version was a parameter of the script)
> > > >  - svn checkout B
> > > >  - update A dependency in B.pom to 1-RC1
> > > >  - mvn release:prepare release:perform -B -DreleaseVersion=4-RC1
> > > >
> > > >
> > > > My question is: how can I update A dependency in B.pom? I tried to
> use
> > > > versions-maven-plugin but the plugin is too smart for my usage as it
> > > always
> > > > try to update to the latest released version. What I want is to be
> able
> > > to
> > > > say: "update property named A.version to value 1-RC1" even if A was
> > > already
> > > > released in version 2.
> > > >
> > > > Do you know a way to do this?
> > > >
> > > > Thanks,
> > > >
> > > > Julien
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re : Re : Updating properties defined in pom from command line

Posted by Julien HENRY <he...@yahoo.fr>.
Bug submitted with 2 IT test cases (1st with value fixed in the pom and 2nd with a property specified on the command line).

MVERSIONS-80

I didn't have looked at the plugin code yet and I would like to know if this is something that will be easily fixed. What is your opinion?

Thanks,

Julien


----- Message d'origine ----
> De : Stephen Connolly <st...@gmail.com>
> À : Maven Users List <us...@maven.apache.org>
> Envoyé le : Jeu 22 Octobre 2009, 13 h 36 min 30 s
> Objet : Re: Re : Updating properties defined in pom from command line
> 
> sounds like a bug... if you can produce an integration test and file a JIRA
> that would be great... I cannot look into this at the moment [swamped at
> work]
> 
> 2009/10/22 Julien HENRY 
> 
> > Hi Stephen,
> >
> > Have you already tested the solution you propose? I tried and it is not
> > working so I was wondering if there is something wrong in my use or if it is
> > a plugin bug.
> >
> > My test case:
> > I have a property in my pom:
> > 1.3
> > running mvn versions:update-properties the value is changed to
> > 1.4
> >
> > but when I put this configuration in the pom:
> >          
> >            ...
> >            
> >              test.prop.version
> >              ...
> >              [1.4]
> >              ...
> >            
> >            ...
> >          
> > reverting to
> > 1.3
> > and running mvn versions:update-properties the value is not changed. There
> > is no error but only:
> > Property ${test.prop.version}: Leaving unchanged as 1.3
> >
> > Of course using a property instead of a fixed value in property
> > configuration doesn't work better.
> >
> > Any idea?
> >
> > Thanks
> >
> > Julien
> >
> >
> >
> >
> >
> > ________________________________
> > De : Stephen Connolly 
> > À : Maven Users List 
> > Envoyé le : Jeu 22 Octobre 2009, 12 h 15 min 57 s
> > Objet : Re: Updating properties defined in pom from command line
> >
> > you should be able to define a range to restrict updates to within a
> > range...
> >
> > e.g. add a config section with a version restriction specified and have
> > that
> > defined by a property
> >
> > 
> >  ...
> >  
> >    ...
> >    
> >      ...
> >      
> >        org.codehaus.mojo
> >        versions-maven-plugin
> >        1.0
> >        
> >          ...
> >          
> >            ...
> >            
> >              manchu.version
> >              ...
> >              [${magic}]
> >              ...
> >            
> >            ...
> >          
> >          ...
> >        
> >      
> >      ...
> >    
> >    ...
> >  
> >  ...
> > 
> >
> >
> > then
> >
> > mvn versions:updateProperties -Dmagic=newAVersion
> >
> >
> > 2009/10/22 Julien HENRY 
> >
> > > Hi,
> > >
> > > I'm working on a script that will automatically release many artifacts.
> > For
> > > example I have 2 Maven projects (say A and B). B have a dependency on A.
> > The
> > > dependency version is expressed using a property (say ${A.version}).
> > > In the SVN trunk, in B.pom, A.version=1-SNAPSHOT.
> > > A and B are independent Maven modules (not multi-module).
> > >
> > > Basically, the script is aware of the release order and will:
> > >  - svn checkout A
> > >  - mvn release:prepare release:perform -B -DreleaseVersion=1-RC1 (batch
> > > mode so release version was a parameter of the script)
> > >  - svn checkout B
> > >  - update A dependency in B.pom to 1-RC1
> > >  - mvn release:prepare release:perform -B -DreleaseVersion=4-RC1
> > >
> > >
> > > My question is: how can I update A dependency in B.pom? I tried to use
> > > versions-maven-plugin but the plugin is too smart for my usage as it
> > always
> > > try to update to the latest released version. What I want is to be able
> > to
> > > say: "update property named A.version to value 1-RC1" even if A was
> > already
> > > released in version 2.
> > >
> > > Do you know a way to do this?
> > >
> > > Thanks,
> > >
> > > Julien
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >



      

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


RE: maven 2.2.1: is there an inherent pom?

Posted by Martin Gainty <mg...@hotmail.com>.
Paul
did you look at implementing requireMavenVersion rule?
<project>
  [...]
  <build>
   <plugins>
     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>2.2.1</version>
                </requireMavenVersion>
http://maven.apache.org/plugins/maven-enforcer-plugin/usage.html

plugin information is inherited by child from parent so to break the pattern use <inherited>false</inherited>
http://maven.apache.org/guides/mini/guide-configuring-plugins.html

Martin 
______________________________________________ 
Any/all use of information including monitoring of information contained within this transmission is subject to the http://maven.apache.org/license.html




> Subject: maven 2.2.1: is there an inherent pom?
> Date: Thu, 22 Oct 2009 13:42:03 +0200
> From: Paul.Rebholz@six-group.com
> To: users@maven.apache.org
> 
> hello maven users
> 
> these days I was trying to figure out if maven 2.2.1 comes with a
> version-fixed set of plugins, i.e. if there is an inherent pom which
> fixes this.
> 
> We are building our SW with maven and want to make sure that using maven
> 2.2.1 yields the same results right now as it would in the future, in
> other words, is there a guarantee that - out of the box - no newer
> plugin versions are used in the future?
> 
> Is there someone out there who can confirm this?
> 
> Regards, Paul 
>  
> This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. 
> The sender's company reserves the right to monitor all e-mail communications through their networks.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  
_________________________________________________________________
Windows 7: Simplify your PC. Learn more.
http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen1:102009

Re: Re : Updating properties defined in pom from command line

Posted by Stephen Connolly <st...@gmail.com>.
sounds like a bug... if you can produce an integration test and file a JIRA
that would be great... I cannot look into this at the moment [swamped at
work]

2009/10/22 Julien HENRY <he...@yahoo.fr>

> Hi Stephen,
>
> Have you already tested the solution you propose? I tried and it is not
> working so I was wondering if there is something wrong in my use or if it is
> a plugin bug.
>
> My test case:
> I have a property in my pom:
> <test.prop.version>1.3</test.prop.version>
> running mvn versions:update-properties the value is changed to
> <test.prop.version>1.4</test.prop.version>
>
> but when I put this configuration in the pom:
>          <properties>
>            ...
>            <property>
>              <name>test.prop.version</name>
>              ...
>              <version>[1.4]</version><!--Testing with a fixed value-->
>              ...
>            </property>
>            ...
>          </properties>
> reverting to
> <test.prop.version>1.3</test.prop.version>
> and running mvn versions:update-properties the value is not changed. There
> is no error but only:
> Property ${test.prop.version}: Leaving unchanged as 1.3
>
> Of course using a property instead of a fixed value in property
> configuration doesn't work better.
>
> Any idea?
>
> Thanks
>
> Julien
>
>
>
>
>
> ________________________________
> De : Stephen Connolly <st...@gmail.com>
> À : Maven Users List <us...@maven.apache.org>
> Envoyé le : Jeu 22 Octobre 2009, 12 h 15 min 57 s
> Objet : Re: Updating properties defined in pom from command line
>
> you should be able to define a range to restrict updates to within a
> range...
>
> e.g. add a config section with a version restriction specified and have
> that
> defined by a property
>
> <project>
>  ...
>  <build>
>    ...
>    <plugins>
>      ...
>      <plugin>
>        <groupId>org.codehaus.mojo</groupId>
>        <artifactId>versions-maven-plugin</artifactId>
>        <version>1.0</version>
>        <configuration>
>          ...
>          <properties>
>            ...
>            <property>
>              <name>manchu.version</name>
>              ...
>              <version>[${magic}]</version>
>              ...
>            </property>
>            ...
>          </properties>
>          ...
>        </configuration>
>      </plugin>
>      ...
>    </plugins>
>    ...
>  </build>
>  ...
> </project>
>
>
> then
>
> mvn versions:updateProperties -Dmagic=newAVersion
>
>
> 2009/10/22 Julien HENRY <he...@yahoo.fr>
>
> > Hi,
> >
> > I'm working on a script that will automatically release many artifacts.
> For
> > example I have 2 Maven projects (say A and B). B have a dependency on A.
> The
> > dependency version is expressed using a property (say ${A.version}).
> > In the SVN trunk, in B.pom, A.version=1-SNAPSHOT.
> > A and B are independent Maven modules (not multi-module).
> >
> > Basically, the script is aware of the release order and will:
> >  - svn checkout A
> >  - mvn release:prepare release:perform -B -DreleaseVersion=1-RC1 (batch
> > mode so release version was a parameter of the script)
> >  - svn checkout B
> >  - update A dependency in B.pom to 1-RC1
> >  - mvn release:prepare release:perform -B -DreleaseVersion=4-RC1
> >
> >
> > My question is: how can I update A dependency in B.pom? I tried to use
> > versions-maven-plugin but the plugin is too smart for my usage as it
> always
> > try to update to the latest released version. What I want is to be able
> to
> > say: "update property named A.version to value 1-RC1" even if A was
> already
> > released in version 2.
> >
> > Do you know a way to do this?
> >
> > Thanks,
> >
> > Julien
> >
> >
> >
> >
>
>
>
>
>