You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gabriel Bauman <ga...@bravenet.com> on 2003/06/03 00:28:36 UTC

Fun with Jelly

Hi there. I'm experimenting with maven.xml:

--------

<u:tokenize var="deployables" delim=",">
     ${context.getVariable("bravenet.deployables")}
</u:tokenize>

<j:forEach var="deployable" items="${deployables}">
     <echo>Detected deployable "${deployable}"</echo>
     <echo>
   ${context.getVariable("deployables.${deployable}.targets")} //PROBLEM!
     </echo>
</j:forEach>

---------

The second call to context.getVariable fails because of the reference to 
${deployable} in the parameter. I've tried a number of ways of doing 
this, and none have succeeded. Can anyone offer any enlightenment?

Also, offtopic - why not register jelly.ky as the Jelly domain name? I 
also prefer scripting Jelly while listening to styling mixes by Lemon 
Jelly (http://www.lemonjelly.ky)...

Gabe



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


Re: Fun with Jelly

Posted by Brett Porter <bp...@f2network.com.au>.
I think this will work:

<j:set var="deployVarName" value="deployables.${deployable}.targets" />
<echo>${context.getVariable(deployVarName)}</echo>

Also, its probably a good idea to import the Ant namespace 
(xmlns:ant="jelly:ant") and use <ant:echo>, as I'm not sure if at some 
point it might not be a default namespace.

Cheers,
Brett

Gabriel Bauman wrote:
> Hi there. I'm experimenting with maven.xml:
> 
> --------
> 
> <u:tokenize var="deployables" delim=",">
>     ${context.getVariable("bravenet.deployables")}
> </u:tokenize>
> 
> <j:forEach var="deployable" items="${deployables}">
>     <echo>Detected deployable "${deployable}"</echo>
>     <echo>
>   ${context.getVariable("deployables.${deployable}.targets")} //PROBLEM!
>     </echo>
> </j:forEach>
> 
> ---------
> 
> The second call to context.getVariable fails because of the reference to 
> ${deployable} in the parameter. I've tried a number of ways of doing 
> this, and none have succeeded. Can anyone offer any enlightenment?
> 
> Also, offtopic - why not register jelly.ky as the Jelly domain name? I 
> also prefer scripting Jelly while listening to styling mixes by Lemon 
> Jelly (http://www.lemonjelly.ky)...
> 
> Gabe
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
Web Developer
f2 network ~ everything essential
02 8596 4437


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