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 <stephen.alan.conno...@gmail.com>

> I haven't looked at the test cases yet...
>
> in theory yes
>
> ;-)
>
> -Stephen
>
> 2009/10/22 Julien HENRY <henr...@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 <stephen.alan.conno...@gmail.com>
>> > À : Maven Users List <users@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-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>

Reply via email to