You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by je...@bnpparibas.com on 2005/06/21 10:44:52 UTC

Réf. : Re: How do deal with ">" or LT in maven 1.0.1

Hi,

Sorry, the result is the same.

Jean-Marc




Extranet
dantran@gmail.com - 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, jean-marc.bottin@bnpparibas.com
<je...@bnpparibas.com> 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:
> org.apache.commons.jexl.ExpressionImpl@130633a. 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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



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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Réf. : Re: Réf. : Re: Réf. : Re: How do deal with ">" or LT in maven 1.0.1

Posted by je...@bnpparibas.com.
Hi Justin,

Thank you for your help.

Jean-Marc




Extranet
Justin_Freitag@national.com.au - 22/06/2005 11:06


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



Pour : users

cc :   users


Objet :     Re:  Réf. : Re: Réf. : Re: How do deal with ">" or LT in maven
       1.0.1


here ya go :)

<goal name="mytest">
    <j:invokeStatic var="bleh" className="java.lang.Integer"  method="
parseInt">
       <j:arg type="java.lang.String" value="5"/>
     </j:invokeStatic>

   <echo>bleh class is ${bleh.getClass()}</echo>
   <j:if test="${bleh gt 4}">
            <echo>true</echo>
   </j:if>
   <j:if test="${bleh lt 3}">
            <echo>false</echo>
   </j:if>
</goal>




             jean-marc.bottin@
             bnpparibas.com
                                                                        To
             22/06/2005 05:41          users@maven.apache.org
             PM                                                         cc

                                                                   Subject
             Please respond to         Réf. : Re: Réf. : Re: How do deal
               "Maven Users            with ">" or LT in maven 1.0.1
                   List"
             <users@maven.apac
                  he.org>








I think you are right. String will not work, it should be an int evalution.
But in maven I don't know how to convert a string to an int or integer.
Any idea?

Jean-Marc




Extranet
dantran@gmail.com - 22/06/2005 08:40


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



Pour : users

cc :


Objet :     Re: Réf. : Re: How do deal with ">" or LT in maven 1.0.1


this works

  <goal name="test-lt" >
    <j:set var="var" value="dontcare" />
    <j:if test="${ var.length() lt 8 }" >
      <ant:echo> lt works </ant:echo>
    </j:if>

  </goal>

my guest here lt and gt are not working at string level

-D

On 6/21/05, Justin_Freitag@national.com.au
<Ju...@national.com.au> wrote:
> echo the class of jBoxNumber. you might have to convert it.
>
>
>
>
>             jean-marc.bottin@
>             bnpparibas.com
>                                                                        To
>             21/06/2005 06:44          users@maven.apache.org
>             PM                                                         cc
>
>                                                                   Subject
>             Please respond to         Réf. : Re: How do deal with ">" or
>               "Maven Users            LT in maven 1.0.1
>                   List"
>             <users@maven.apac
>                  he.org>
>
>
>
>
>
>
>
> Hi,
>
> Sorry, the result is the same.
>
> Jean-Marc
>
>
>
>
> Extranet
> dantran@gmail.com - 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, jean-marc.bottin@bnpparibas.com
> <je...@bnpparibas.com> 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:
> > org.apache.commons.jexl.ExpressionImpl@130633a. 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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



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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




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



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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Réf. : Re: Réf. : Re: How do deal with ">" or LT in maven 1.0.1

Posted by Ju...@national.com.au.
here ya go :)

<goal name="mytest">
    <j:invokeStatic var="bleh" className="java.lang.Integer"  method="
parseInt">
       <j:arg type="java.lang.String" value="5"/>
     </j:invokeStatic>

   <echo>bleh class is ${bleh.getClass()}</echo>
   <j:if test="${bleh gt 4}">
            <echo>true</echo>
   </j:if>
   <j:if test="${bleh lt 3}">
            <echo>false</echo>
   </j:if>
</goal>



                                                                           
             jean-marc.bottin@                                             
             bnpparibas.com                                                
                                                                        To 
             22/06/2005 05:41          users@maven.apache.org              
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Réf. : Re: Réf. : Re: How do deal   
               "Maven Users            with ">" or LT in maven 1.0.1       
                   List"                                                   
             <users@maven.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           





I think you are right. String will not work, it should be an int evalution.
But in maven I don't know how to convert a string to an int or integer.
Any idea?

Jean-Marc




Extranet
dantran@gmail.com - 22/06/2005 08:40


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



Pour : users

cc :


Objet :     Re: Réf. : Re: How do deal with ">" or LT in maven 1.0.1


this works

  <goal name="test-lt" >
    <j:set var="var" value="dontcare" />
    <j:if test="${ var.length() lt 8 }" >
      <ant:echo> lt works </ant:echo>
    </j:if>

  </goal>

my guest here lt and gt are not working at string level

-D

On 6/21/05, Justin_Freitag@national.com.au
<Ju...@national.com.au> wrote:
> echo the class of jBoxNumber. you might have to convert it.
>
>
>
>
>             jean-marc.bottin@
>             bnpparibas.com
>                                                                        To
>             21/06/2005 06:44          users@maven.apache.org
>             PM                                                         cc
>
>                                                                   Subject
>             Please respond to         Réf. : Re: How do deal with ">" or
>               "Maven Users            LT in maven 1.0.1
>                   List"
>             <users@maven.apac
>                  he.org>
>
>
>
>
>
>
>
> Hi,
>
> Sorry, the result is the same.
>
> Jean-Marc
>
>
>
>
> Extranet
> dantran@gmail.com - 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, jean-marc.bottin@bnpparibas.com
> <je...@bnpparibas.com> 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:
> > org.apache.commons.jexl.ExpressionImpl@130633a. 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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



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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




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


Réf. : Re: Réf. : Re: How do deal with ">" or LT in maven 1.0.1

Posted by je...@bnpparibas.com.
I think you are right. String will not work, it should be an int evalution.
But in maven I don't know how to convert a string to an int or integer.
Any idea?

Jean-Marc




Extranet
dantran@gmail.com - 22/06/2005 08:40


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



Pour : users

cc :


Objet :     Re: Réf. : Re: How do deal with ">" or LT in maven 1.0.1


this works

  <goal name="test-lt" >
    <j:set var="var" value="dontcare" />
    <j:if test="${ var.length() lt 8 }" >
      <ant:echo> lt works </ant:echo>
    </j:if>

  </goal>

my guest here lt and gt are not working at string level

-D

On 6/21/05, Justin_Freitag@national.com.au
<Ju...@national.com.au> wrote:
> echo the class of jBoxNumber. you might have to convert it.
>
>
>
>
>             jean-marc.bottin@
>             bnpparibas.com
>                                                                        To
>             21/06/2005 06:44          users@maven.apache.org
>             PM                                                         cc
>
>                                                                   Subject
>             Please respond to         Réf. : Re: How do deal with ">" or
>               "Maven Users            LT in maven 1.0.1
>                   List"
>             <users@maven.apac
>                  he.org>
>
>
>
>
>
>
>
> Hi,
>
> Sorry, the result is the same.
>
> Jean-Marc
>
>
>
>
> Extranet
> dantran@gmail.com - 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, jean-marc.bottin@bnpparibas.com
> <je...@bnpparibas.com> 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:
> > org.apache.commons.jexl.ExpressionImpl@130633a. 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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



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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Réf. : Re: How do deal with ">" or LT in maven 1.0.1

Posted by dan tran <da...@gmail.com>.
this works

  <goal name="test-lt" >
    <j:set var="var" value="dontcare" />
    <j:if test="${ var.length() lt 8 }" >
      <ant:echo> lt works </ant:echo>
    </j:if>
    
  </goal>

my guest here lt and gt are not working at string level

-D

On 6/21/05, Justin_Freitag@national.com.au
<Ju...@national.com.au> wrote:
> echo the class of jBoxNumber. you might have to convert it.
> 
> 
> 
> 
>             jean-marc.bottin@
>             bnpparibas.com
>                                                                        To
>             21/06/2005 06:44          users@maven.apache.org
>             PM                                                         cc
> 
>                                                                   Subject
>             Please respond to         Réf. : Re: How do deal with ">" or
>               "Maven Users            LT in maven 1.0.1
>                   List"
>             <users@maven.apac
>                  he.org>
> 
> 
> 
> 
> 
> 
> 
> Hi,
> 
> Sorry, the result is the same.
> 
> Jean-Marc
> 
> 
> 
> 
> Extranet
> dantran@gmail.com - 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, jean-marc.bottin@bnpparibas.com
> <je...@bnpparibas.com> 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:
> > org.apache.commons.jexl.ExpressionImpl@130633a. 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>  For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

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


Re: Réf. : Re: How do deal with ">" or LT in maven 1.0.1

Posted by Ju...@national.com.au.
echo the class of jBoxNumber. you might have to convert it.



                                                                           
             jean-marc.bottin@                                             
             bnpparibas.com                                                
                                                                        To 
             21/06/2005 06:44          users@maven.apache.org              
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Réf. : Re: How do deal with ">" or  
               "Maven Users            LT in maven 1.0.1                   
                   List"                                                   
             <users@maven.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           




Hi,

Sorry, the result is the same.

Jean-Marc




Extranet
dantran@gmail.com - 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, jean-marc.bottin@bnpparibas.com
<je...@bnpparibas.com> 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:
> org.apache.commons.jexl.ExpressionImpl@130633a. 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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



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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




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