You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sp...@web.de on 2017/08/21 07:50:04 UTC

How to up date a property in a POM to a specific value

Hello mailing,

I use property values, defined in a POM, during resource filtering. I'd like to change this properties during my release process. I know that the Maven Version Plugin has a goal named update-properties. But it requires that the properties are used in the dependency definition. I search for something like 'set-property -Dname=propertyName -Dvalue=newValueForProperty'. Do you know a Maven Plugin that supports this use case?

Thank you and best regards,

Sandra Parsick

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


Re: Re: How to up date a property in a POM to a specific value

Posted by Anders Hammar <an...@hammar.net>.
User questions for the mojohaus plugins should be posted here at the Maven
users list. There is a separate dev list but that's for the development of
the plugins.

/Anders

On Mon, Aug 28, 2017 at 10:20 AM, <sp...@web.de> wrote:

> Thank you for the hint. I will repeat my question on the Mojohaus
> mailinglist.
>
> > Gesendet: Samstag, 26. August 2017 um 19:26 Uhr
> > Von: "John Patrick" <nh...@gmail.com>
> > An: "Maven Users List" <us...@maven.apache.org>
> > Betreff: Re: How to up date a property in a POM to a specific value
> >
> > If your talking about the codehaus version plugin which is now hosted
> > at mojohaus, it's a different mailing list i think...
> >
> > http://www.mojohaus.org/versions-maven-plugin/mail-lists.html
> >
> >
> >
> > On 23 August 2017 at 21:07, Sandra Parsick <sp...@web.de> wrote:
> > > Thanks for your answers.
> > >
> > > Passing the property value from command line don't meet my condition,
> > > because the new value has to be stored in the POM.
> > >
> > > I found out that a new mojo called "set-property" was implemented in
> the
> > > current master branch of versions maven plugin. This mojo would meet my
> > > use cases.
> > >
> > > Does it exist a target date for the next release of version maven
> plugin?
> > >
> > > Best regards,
> > >
> > > Sandra
> > >
> > >
> > > Am 22.08.2017 um 11:07 schrieb Anders Hammar:
> > >> Specifying property values from command line when doing a release
> could be
> > >> bad practice, as the pom deployed would not contain the value from
> command
> > >> line. It all depends on what the property is used for.
> > >>
> > >> /Anders
> > >>
> > >> On Tue, Aug 22, 2017 at 10:34 AM, John Patrick <
> nhoj.patrick@gmail.com>
> > >> wrote:
> > >>
> > >>> I think I do similar and I simply use
> > >>> -DpropertyName=newValueForProperty on the command line when
> executing
> > >>> the maven command, or via a profile and then activate the required
> > >>> profile.
> > >>>
> > >>> Just checking the property is already defined in a pom e.g.
> > >>> <project>...<properties>...<propertyName>oldValueForProperty</
> > >>> propertyName>
> > >>>
> > >>> At build time I would simply change the command line I'm using to
> > >>> build. I do this type of thing all the line when testing new
> > >>> dependencies, different external systems, loading different
> > >>> properties/config via a different dependency.
> > >>>
> > >>> John
> > >>>
> > >>>
> > >>> On 21 August 2017 at 08:50,  <sp...@web.de> wrote:
> > >>>> Hello mailing,
> > >>>>
> > >>>> I use property values, defined in a POM, during resource filtering.
> I'd
> > >>> like to change this properties during my release process. I know
> that the
> > >>> Maven Version Plugin has a goal named update-properties. But it
> requires
> > >>> that the properties are used in the dependency definition. I search
> for
> > >>> something like 'set-property -Dname=propertyName
> > >>> -Dvalue=newValueForProperty'. Do you know a Maven Plugin that
> supports this
> > >>> use case?
> > >>>>
> > >>>> Thank you and best regards,
> > >>>>
> > >>>> Sandra Parsick
> > >>>>
> > >>>> ------------------------------------------------------------
> ---------
> > >>>> 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: Re: How to up date a property in a POM to a specific value

Posted by sp...@web.de.
Thank you for the hint. I will repeat my question on the Mojohaus mailinglist.

> Gesendet: Samstag, 26. August 2017 um 19:26 Uhr
> Von: "John Patrick" <nh...@gmail.com>
> An: "Maven Users List" <us...@maven.apache.org>
> Betreff: Re: How to up date a property in a POM to a specific value
>
> If your talking about the codehaus version plugin which is now hosted
> at mojohaus, it's a different mailing list i think...
> 
> http://www.mojohaus.org/versions-maven-plugin/mail-lists.html
> 
> 
> 
> On 23 August 2017 at 21:07, Sandra Parsick <sp...@web.de> wrote:
> > Thanks for your answers.
> >
> > Passing the property value from command line don't meet my condition,
> > because the new value has to be stored in the POM.
> >
> > I found out that a new mojo called "set-property" was implemented in the
> > current master branch of versions maven plugin. This mojo would meet my
> > use cases.
> >
> > Does it exist a target date for the next release of version maven plugin?
> >
> > Best regards,
> >
> > Sandra
> >
> >
> > Am 22.08.2017 um 11:07 schrieb Anders Hammar:
> >> Specifying property values from command line when doing a release could be
> >> bad practice, as the pom deployed would not contain the value from command
> >> line. It all depends on what the property is used for.
> >>
> >> /Anders
> >>
> >> On Tue, Aug 22, 2017 at 10:34 AM, John Patrick <nh...@gmail.com>
> >> wrote:
> >>
> >>> I think I do similar and I simply use
> >>> -DpropertyName=newValueForProperty on the command line when executing
> >>> the maven command, or via a profile and then activate the required
> >>> profile.
> >>>
> >>> Just checking the property is already defined in a pom e.g.
> >>> <project>...<properties>...<propertyName>oldValueForProperty</
> >>> propertyName>
> >>>
> >>> At build time I would simply change the command line I'm using to
> >>> build. I do this type of thing all the line when testing new
> >>> dependencies, different external systems, loading different
> >>> properties/config via a different dependency.
> >>>
> >>> John
> >>>
> >>>
> >>> On 21 August 2017 at 08:50,  <sp...@web.de> wrote:
> >>>> Hello mailing,
> >>>>
> >>>> I use property values, defined in a POM, during resource filtering. I'd
> >>> like to change this properties during my release process. I know that the
> >>> Maven Version Plugin has a goal named update-properties. But it requires
> >>> that the properties are used in the dependency definition. I search for
> >>> something like 'set-property -Dname=propertyName
> >>> -Dvalue=newValueForProperty'. Do you know a Maven Plugin that supports this
> >>> use case?
> >>>>
> >>>> Thank you and best regards,
> >>>>
> >>>> Sandra Parsick
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> 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 up date a property in a POM to a specific value

Posted by John Patrick <nh...@gmail.com>.
If your talking about the codehaus version plugin which is now hosted
at mojohaus, it's a different mailing list i think...

http://www.mojohaus.org/versions-maven-plugin/mail-lists.html



On 23 August 2017 at 21:07, Sandra Parsick <sp...@web.de> wrote:
> Thanks for your answers.
>
> Passing the property value from command line don't meet my condition,
> because the new value has to be stored in the POM.
>
> I found out that a new mojo called "set-property" was implemented in the
> current master branch of versions maven plugin. This mojo would meet my
> use cases.
>
> Does it exist a target date for the next release of version maven plugin?
>
> Best regards,
>
> Sandra
>
>
> Am 22.08.2017 um 11:07 schrieb Anders Hammar:
>> Specifying property values from command line when doing a release could be
>> bad practice, as the pom deployed would not contain the value from command
>> line. It all depends on what the property is used for.
>>
>> /Anders
>>
>> On Tue, Aug 22, 2017 at 10:34 AM, John Patrick <nh...@gmail.com>
>> wrote:
>>
>>> I think I do similar and I simply use
>>> -DpropertyName=newValueForProperty on the command line when executing
>>> the maven command, or via a profile and then activate the required
>>> profile.
>>>
>>> Just checking the property is already defined in a pom e.g.
>>> <project>...<properties>...<propertyName>oldValueForProperty</
>>> propertyName>
>>>
>>> At build time I would simply change the command line I'm using to
>>> build. I do this type of thing all the line when testing new
>>> dependencies, different external systems, loading different
>>> properties/config via a different dependency.
>>>
>>> John
>>>
>>>
>>> On 21 August 2017 at 08:50,  <sp...@web.de> wrote:
>>>> Hello mailing,
>>>>
>>>> I use property values, defined in a POM, during resource filtering. I'd
>>> like to change this properties during my release process. I know that the
>>> Maven Version Plugin has a goal named update-properties. But it requires
>>> that the properties are used in the dependency definition. I search for
>>> something like 'set-property -Dname=propertyName
>>> -Dvalue=newValueForProperty'. Do you know a Maven Plugin that supports this
>>> use case?
>>>>
>>>> Thank you and best regards,
>>>>
>>>> Sandra Parsick
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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 up date a property in a POM to a specific value

Posted by Sandra Parsick <sp...@web.de>.
Thanks for your answers.

Passing the property value from command line don't meet my condition,
because the new value has to be stored in the POM.

I found out that a new mojo called "set-property" was implemented in the
current master branch of versions maven plugin. This mojo would meet my
use cases.

Does it exist a target date for the next release of version maven plugin?

Best regards,

Sandra


Am 22.08.2017 um 11:07 schrieb Anders Hammar:
> Specifying property values from command line when doing a release could be
> bad practice, as the pom deployed would not contain the value from command
> line. It all depends on what the property is used for.
> 
> /Anders
> 
> On Tue, Aug 22, 2017 at 10:34 AM, John Patrick <nh...@gmail.com>
> wrote:
> 
>> I think I do similar and I simply use
>> -DpropertyName=newValueForProperty on the command line when executing
>> the maven command, or via a profile and then activate the required
>> profile.
>>
>> Just checking the property is already defined in a pom e.g.
>> <project>...<properties>...<propertyName>oldValueForProperty</
>> propertyName>
>>
>> At build time I would simply change the command line I'm using to
>> build. I do this type of thing all the line when testing new
>> dependencies, different external systems, loading different
>> properties/config via a different dependency.
>>
>> John
>>
>>
>> On 21 August 2017 at 08:50,  <sp...@web.de> wrote:
>>> Hello mailing,
>>>
>>> I use property values, defined in a POM, during resource filtering. I'd
>> like to change this properties during my release process. I know that the
>> Maven Version Plugin has a goal named update-properties. But it requires
>> that the properties are used in the dependency definition. I search for
>> something like 'set-property -Dname=propertyName
>> -Dvalue=newValueForProperty'. Do you know a Maven Plugin that supports this
>> use case?
>>>
>>> Thank you and best regards,
>>>
>>> Sandra Parsick
>>>
>>> ---------------------------------------------------------------------
>>> 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 up date a property in a POM to a specific value

Posted by Anders Hammar <an...@hammar.net>.
Specifying property values from command line when doing a release could be
bad practice, as the pom deployed would not contain the value from command
line. It all depends on what the property is used for.

/Anders

On Tue, Aug 22, 2017 at 10:34 AM, John Patrick <nh...@gmail.com>
wrote:

> I think I do similar and I simply use
> -DpropertyName=newValueForProperty on the command line when executing
> the maven command, or via a profile and then activate the required
> profile.
>
> Just checking the property is already defined in a pom e.g.
> <project>...<properties>...<propertyName>oldValueForProperty</
> propertyName>
>
> At build time I would simply change the command line I'm using to
> build. I do this type of thing all the line when testing new
> dependencies, different external systems, loading different
> properties/config via a different dependency.
>
> John
>
>
> On 21 August 2017 at 08:50,  <sp...@web.de> wrote:
> > Hello mailing,
> >
> > I use property values, defined in a POM, during resource filtering. I'd
> like to change this properties during my release process. I know that the
> Maven Version Plugin has a goal named update-properties. But it requires
> that the properties are used in the dependency definition. I search for
> something like 'set-property -Dname=propertyName
> -Dvalue=newValueForProperty'. Do you know a Maven Plugin that supports this
> use case?
> >
> > Thank you and best regards,
> >
> > Sandra Parsick
> >
> > ---------------------------------------------------------------------
> > 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 up date a property in a POM to a specific value

Posted by John Patrick <nh...@gmail.com>.
I think I do similar and I simply use
-DpropertyName=newValueForProperty on the command line when executing
the maven command, or via a profile and then activate the required
profile.

Just checking the property is already defined in a pom e.g.
<project>...<properties>...<propertyName>oldValueForProperty</propertyName>

At build time I would simply change the command line I'm using to
build. I do this type of thing all the line when testing new
dependencies, different external systems, loading different
properties/config via a different dependency.

John


On 21 August 2017 at 08:50,  <sp...@web.de> wrote:
> Hello mailing,
>
> I use property values, defined in a POM, during resource filtering. I'd like to change this properties during my release process. I know that the Maven Version Plugin has a goal named update-properties. But it requires that the properties are used in the dependency definition. I search for something like 'set-property -Dname=propertyName -Dvalue=newValueForProperty'. Do you know a Maven Plugin that supports this use case?
>
> Thank you and best regards,
>
> Sandra Parsick
>
> ---------------------------------------------------------------------
> 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