You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Owen <mi...@hotmail.com> on 2005/08/04 16:35:35 UTC

Getting dynamic property

Hi,

I writing a plugin for Maven 1.0.2 and I'm trying to do:

        <j:set var="bundlePropertyName" value="diststandalone" />

        <j:if 
test="${dep.getProperty('test.bundle.${bundlePropertyName}')=='true'}">

However, either though syntactical ok, this doesn't work in theory. When I 
do:

        <j:if 
test="${dep.getProperty('test.bundle.diststandalone')=='true'}">

it works in theory.

Anybody know how to get it to work so I can load a "dynamic" property?

Mike



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


RE: Getting dynamic property

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Mike,

You must do it in 2 steps:

<j:set var="bundleProperty" value="test.bundle.${bundlePropertyName}"/>
<j:if test="${dep.getProperty(bundleProperty)=='true'}">

-Vincent

> -----Original Message-----
> From: Michael Owen [mailto:michaelowenuk@hotmail.com]
> Sent: jeudi 4 août 2005 16:36
> To: users@maven.apache.org
> Subject: Getting dynamic property
> 
> Hi,
> 
> I writing a plugin for Maven 1.0.2 and I'm trying to do:
> 
>         <j:set var="bundlePropertyName" value="diststandalone" />
> 
>         <j:if
> test="${dep.getProperty('test.bundle.${bundlePropertyName}')=='true'}">
> 
> However, either though syntactical ok, this doesn't work in theory. When I
> do:
> 
>         <j:if
> test="${dep.getProperty('test.bundle.diststandalone')=='true'}">
> 
> it works in theory.
> 
> Anybody know how to get it to work so I can load a "dynamic" property?
> 
> Mike


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