Hi,

Sorry, the result is the same.

Jean-Marc




Extranet
[EMAIL PROTECTED] - 21/06/2005 10:35


Veuillez répondre à users@maven.apache.org



Pour : users

cc :


Objet :     Re: How do deal with ">" or LT in maven 1.0.1


try

<j:if test="${jboxNumber lt 10}">




On 6/21/05, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am having some difficulties with the LT expression.
> I am passing to a value by the command line like maven
> -Djbox.version=DEFF-UAT2-V9 jbox:try
>
> I want to evaluate the numeric part of the variable jbox;version which is
9
> in this example. So I proceed the following way:
>
> <j:set var="jboxLength"
> value="${context.getVariable('jbox.version').length()}"/>
> <j:set var="jboxNumber"
> value="${context.getVariable('jbox.version').substring(11,jboxLength)}"/>
>
> <j:if test="${jboxNumber &lt; 10}">
>      <echo>Less than 10</echo>
> </j:if>
>
> But I never reach the echo; I get the followinf error message:
>
> Caught exception evaluating:
> [EMAIL PROTECTED] Reason:
> java.lang.Exception: Invalid comparison : LT
> java.lang.Exception: Invalid comparison : LT
>        at
> org.apache.commons.jexl.parser.ASTLTNode.value(ASTLTNode.java:105)
>        at
> org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java:85)
>        at
> org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:123)
>        at
>
org.apache.commons.jelly.expression.jexl.JexlExpression.evaluate(JexlExpression.java:115)

>        at
>
org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(ExpressionSupport.java:106)

>        at
>
org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsBoolean(ExpressionSupport.java:116)

>        at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:87)
>        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>        at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>        at
> org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:92)
>        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>        at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>        at
> org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:84)
>        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>        at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>        at
> org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
>        at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:274)
>        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>        at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>        at com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:112)
>        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
> org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:1143)
>        at
> org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:647)
>        at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
>        at org.apache.maven.cli.App.doMain(App.java:488)
>        at org.apache.maven.cli.App.main(App.java:1239)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

>        at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>        at java.lang.reflect.Method.invoke(Method.java:324)
>        at com.werken.forehead.Forehead.run(Forehead.java:551)
>        at com.werken.forehead.Forehead.main(Forehead.java:581)
> BUILD FAILED
> Goal "jbox:trest" does not exist in this project.
> Total time: 2 seconds
> Finished at: Tue Jun 21 09:53:01 CEST 2005
>
> Any ideas?
>
> Thanks,
>
> Jean-Marc
>
>
>
> This message and any attachments (the "message") is
> intended solely for the addressees and is confidential.
> If you receive this message in error, please delete it and
> immediately notify the sender. Any use not in accord with
> its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval. The internet
> can not guarantee the integrity of this message.
> BNP PARIBAS (and its subsidiaries) shall (will) not
> therefore be liable for the message if modified.
>
>                ---------------------------------------------
>
> Ce message et toutes les pieces jointes (ci-apres le
> "message") sont etablis a l'intention exclusive de ses
> destinataires et sont confidentiels. Si vous recevez ce
> message par erreur, merci de le detruire et d'en avertir
> immediatement l'expediteur. Toute utilisation de ce
> message non conforme a sa destination, toute diffusion
> ou toute publication, totale ou partielle, est interdite, sauf
> autorisation expresse. L'internet ne permettant pas
> d'assurer l'integrite de ce message, BNP PARIBAS (et ses
> filiales) decline(nt) toute responsabilite au titre de ce
> message, dans l'hypothese ou il aurait ete modifie.
>
> ---------------------------------------------------------------------
> 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]



This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.

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

Reply via email to