You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ez <er...@gmail.com> on 2008/10/13 11:54:21 UTC

dynamic properies

i need to use dynamic properties i maven 2.
say i pass to maven a property called propName using -DpropName=zzz
then in the pom.xml i need to define a dynamic property, which loads its
value from another pre-defined property:
<property.xxx>some xxx val</property.xxx>
<property.yyy>some yyy val</property.yyy>
<property.zzz>some zzz val</property.zzz>
<dynamic.property>${property.<propName>}</dynamic.property>

can that be done?

-- 
View this message in context: http://www.nabble.com/dynamic-properies-tp19951753p19951753.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: dynamic properies

Posted by ez <er...@gmail.com>.
thanks :-)
is there another way? i had seen in maven 1 some scripting examples to
implement just that. is something similar available in maven 2?


Stephen Connolly-2 wrote:
> 
> why not use profiles?
> 
> i.e.
> 
> <profile>
>   <profile>
>     <id>xxx</id>
>     <properties>
>       <dynamic.property>${property.xxx}</dynamic.property>
>     </properties>
>   </profile>
>   <profile>
>     <id>yyy</id>
>     <properties>
>       <dynamic.property>${property.yyy}</dynamic.property>
>     </properties>
>   </profile>
>   <profile>
>     <id>zzz</id>
>     <properties>
>       <dynamic.property>${property.zzz}</dynamic.property>
>     </properties>
>   </profile>
> </profiles>
> 
> 2008/10/13 ez <er...@gmail.com>:
>>
>> i need to use dynamic properties i maven 2.
>> say i pass to maven a property called propName using -DpropName=zzz
>> then in the pom.xml i need to define a dynamic property, which loads its
>> value from another pre-defined property:
>> <property.xxx>some xxx val</property.xxx>
>> <property.yyy>some yyy val</property.yyy>
>> <property.zzz>some zzz val</property.zzz>
>> <dynamic.property>${property.<propName>}</dynamic.property>
>>
>> can that be done?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/dynamic-properies-tp19951753p19951753.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/dynamic-properies-tp19951753p19964932.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: dynamic properies

Posted by Stephen Connolly <st...@gmail.com>.
why not use profiles?

i.e.

<profile>
  <profile>
    <id>xxx</id>
    <properties>
      <dynamic.property>${property.xxx}</dynamic.property>
    </properties>
  </profile>
  <profile>
    <id>yyy</id>
    <properties>
      <dynamic.property>${property.yyy}</dynamic.property>
    </properties>
  </profile>
  <profile>
    <id>zzz</id>
    <properties>
      <dynamic.property>${property.zzz}</dynamic.property>
    </properties>
  </profile>
</profiles>

2008/10/13 ez <er...@gmail.com>:
>
> i need to use dynamic properties i maven 2.
> say i pass to maven a property called propName using -DpropName=zzz
> then in the pom.xml i need to define a dynamic property, which loads its
> value from another pre-defined property:
> <property.xxx>some xxx val</property.xxx>
> <property.yyy>some yyy val</property.yyy>
> <property.zzz>some zzz val</property.zzz>
> <dynamic.property>${property.<propName>}</dynamic.property>
>
> can that be done?
>
> --
> View this message in context: http://www.nabble.com/dynamic-properies-tp19951753p19951753.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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