Hi Remy, Your best bet is to call some java code (using <j:invokeStatic> for example) for all numerical computations. They are not supported by JEXL (AFAIK).
-Vincent > -----Original Message----- > From: Menetrieux Remy [mailto:[EMAIL PROTECTED] > Sent: 06 April 2004 17:01 > To: Maven Users List > Subject: Jelly tag questions > > Hi, > > I create this code : > > > > <j:set var="vers" value="${pom.getVersions()}" /> > > <j:set var="max" value="${size(vers)}" /> > > <j:set var="max" value="${max - 1}" /> > > <j:forEach var="dep" items="${pom.getVersions()}" indexVar="index"> > > <echo>${ max > 0 }</echo> > > </j:forEach> > > When I execute it, I obtain the following message. It seems that jelly > don't > see max as an int. How ca do that ? > > Sorry for my english thank's. > > R�my > > > > Caught exception evaluating: > [EMAIL PROTECTED] > Reas > > on: java.lang.Exception: Invalid comparison : GT > > java.lang.Exception: Invalid comparison : GT > > at > org.apache.commons.jexl.parser.ASTGTNode.value(ASTGTNode.java:104) > > at > org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java > > :85) > > at > org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:1 > > 23) > > at > org.apache.commons.jelly.expression.jexl.JexlExpression.evaluate(Jexl > > Expression.java:115) > > at > org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse > > (ExpressionSupport.java:106) > > at > org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsStrin > > g(ExpressionSupport.java:91) > > at > org.apache.commons.jelly.impl.ExpressionScript.run(ExpressionScript.j > > ava:112) > > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) > > at > org.apache.commons.jelly.TagSupport.getBodyText(TagSupport.java:271) > > at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:205) > > > The information transmitted is intended only for the person or entity to > which it is addressed and may contain confidential and/or privileged > material. Any review, retransmission, dissemination or other use of, or > taking of any action in reliance upon, this information by persons or > entities other than the intended recipient is prohibited and may be a > violation of law. If you received this transmission in error, please > contact > the sender by reply e-mail and delete and destroy all copies of the > material, including all copies stored in the recipient's computer, printed > or saved to disk. Thank you. > Software virus: Europcar has taken precautions to minimize the risk of > transmitting software viruses, but we advise you to carry out your own > virus > checks on any attachment to this message. Europcar cannot accept liability > for any loss or damage caused by software viruses. > Intellectual Property: Europcar has built up a significant reputation in > the > name "Europcar" and has a number of trademark applications and > registrations > in many countries. No trademarks, service marks, and trade names owned or > licensed by Europcar or its affiliates may be copied, reproduced, > republished, uploaded, posted, transmitted, or distributed in any way, > without the prior written consent of Europcar. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
