Thanks for the prompt reply Lukas, I had just came to that conclusion
myself (after finding an example) and it worked nicely. 

Regards
Jose


-----Original Message-----
From: Lukas Theussl [mailto:[EMAIL PROTECTED] 
Sent: 22 June 2007 01:43 PM
To: Maven Users List
Subject: Re: Jelly question

A dot in jelly indicates a method call, you can't access an element name
like that (best thing is usually to avoid using . and - in variable
names).

Try:

<j:set var="propArtifact"
value="${dep.getProperty('artifact.origin')}"/>

HTH,
-Lukas


Jose Correia wrote:
> Hi all
> 
> I'm trying to use jelly inside a maven reactor. When I iterate through

> a project.xml I have the following component:
> 
> <dependency>
> 
> <groupId>tools</groupId>
> 
> <artifactId>artifact</artifactId>
> 
> <version>SNAPSHOT</version>
> 
> <properties>
> 
> <classloader>root</classloader>
> 
> <artifact.origin>traderoot</artifact.origin>
> 
> </properties>
> 
> </dependency>
> 
> <dependency>
> 
> <groupId>jaxb</groupId>
> 
> <artifactId>jaxb-api</artifactId>
> 
> <version>1.5</version>
> 
> <properties>
> 
> <classloader>root</classloader>
> 
> </properties>
> 
> </dependency>
> 
> When I go through the project.xml Iam trying to identify the 
> "dependency" elements which have not got this subElement :
> 
> "artifact.origin" but jelly does not seem to respond to this:
> 
> <j:forEach var="dep" items="${multipoms.dependencies}">
> 
> <j:choose trim="true">
> 
> <j:when test="${(dep.properties != null) and (not 
> empty(dep.properties))}">
> 
> <j:forEach var="prop" items="${dep.properties}">
> 
> <j:set var="propArtifact" value="${prop.artifact.origin}D"/>
> 
> <echo>testing2 ${propArtifact}</echo>
> 
> ......
> 
> When i do that echo, even for the top element above (the one with 
> group id "tools" and which has a artifact.origin) I get: testing2 D 
> instead of
> testing2 traderootD How does one deal with a defined element with a
"."
> in it? Does one escape it as it seems that ${prop.artifact.origin} 
> doesn't do the trick....
> 
> Thanks
> 
> Jose
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to