ok,

This works to check on true, but what if I want to check on false? I could
use <j:else/> ofcourse and leave the <j:if/> empty, but that is not real
pretty is it?

thank you for helping out

-----Original Message-----
From: Steve Molloy [mailto:[EMAIL PROTECTED]
Sent: vrijdag 11 maart 2005 16:45
To: Maven Users List
Subject: RE: Maven systemscope


Try this:
        <j:set var="test" value="true"/>
        <echo>Should work</echo>
        <j:if test="${test}">
                <echo>Test is true...</echo>
        </j:if>
        <j:set var="test" value="false"/>
        <echo>Should not...</echo>
        <j:if test="${test}">
                <echo>Test is true...</echo>
        </j:if>
        <echo>Done...</echo>
You'll get:
    [echo] Should work
    [echo] Test is true...
    [echo] Should not...
    [echo] Done...
Steve
On Fri, 2005-11-03 at 16:38 +0100, Deblauwe, Wim wrote:
> nope, it does not print any of the possibilities in that case. The
brackets
> needs to be around the testcase.
> 
> If you have this:
> 
>               <j:if test="${passvar == 'true'}">
>                       <echo>passvar was true</echo>
>               </j:if>
> and you type: maven -Dpassvar=true test-test
> 
> then "passvar was true" is printed out.
> 
> If you use:
> 
>               <j:if test="${passvar} == 'true'">
>                       <echo>passvar was true</echo>
>               </j:if>
> 
> Then nothing is printed out.
> 
> So, guess I still got a problem :(
> 
> BTW: Is there somewhere a good tutorial on jelly? I already searched the
> offical site, but I found it very lacking.
> 
> regards,
> 
> Wim
> 
> -----Original Message-----
> From: Marc-Andre Blain [mailto:[EMAIL PROTECTED]
> Sent: vrijdag 11 maart 2005 16:32
> To: Maven Users List
> Subject: RE: Maven systemscope
> 
> 
> Maybe you should try the following:
>       <j:if test="${testing.var} == 'true'">
>               <echo>${testing.var} is true</echo>
>       </j:if>
>       <j:if test="${testing.var} != 'true'">
>               <echo>'${testing.var}' is not true</echo>
>       </j:if>
> 
> The brackets should delimit your variable, not the test case
> 
> regards,
> 
> Marc-Andre
> 
> -----Original Message-----
> From: Deblauwe, Wim [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 11, 2005 10:28 AM
> To: 'Maven Users List'
> Subject: RE: Maven systemscope
> 
> 
> thank you for your time, but I still got a last question on checking the
> variable. Consider this:
> 
> <goal name="test-test">
>       
>
<echo>${systemScope.setProperty("${pom.groupId}.${pom.artifactId}.buildstart
> ed",'true')}</echo>
>       <echo>${pom.groupId}</echo>
>       <echo>${pom.artifactId}</echo>
>       <echo>${pom.groupId}.${pom.artifactId}.buildstarted</echo>
>       <echo>systemScope["${pom.groupId}.${pom.artifactId}.buildstarted"] =
> ${systemScope["${pom.groupId}.${pom.artifactId}.buildstarted"]}</echo>
>       <j:set var="testing.var"
> value='${systemScope["${pom.groupId}.${pom.artifactId}.buildstarted"]}'/>
> 
>       <echo>${testing.var}</echo>
>       <j:if test="${testing.var == 'true'}">
>               <echo>${testing.var} is true</echo>
>       </j:if>
>       <j:if test="${testing.var != 'true'}">
>               <echo>'${testing.var}' is not true</echo>
>       </j:if>         
> </goal>
> 
> This is the output I get:
> 
> test-test:
>     [echo]
>     [echo] multiproject-root
>     [echo] multiproject-root-project
>     [echo] multiproject-root.multiproject-root-project.buildstarted
>     [echo]
> systemScope["multiproject-root.multiproject-root-project.buildstarted"] =
> true
>     [echo] true
>     [echo] 'true' is not true
> 
> 
> Why is true not true??
> 
> regards,
> 
> Wim
> 
> -----Original Message-----
> From: Marc-Andre Blain [mailto:[EMAIL PROTECTED]
> Sent: donderdag 10 maart 2005 15:43
> To: Maven Users List
> Subject: RE: Maven systemscope
> 
> 
> I tried the following and it returns me 'true'
> 
>       <goal name="test-test">
>       
>
<echo>${systemScope.setProperty("${pom.groupId}.${pom.artifactId}.buildstart
> ed",'true')}</echo>
>               <echo>${pom.groupId}</echo>
>               <echo>${pom.artifactId}</echo>
>               <echo>${pom.groupId}.${pom.artifactId}.buildstarted</echo>
>       
> <echo>systemScope["${pom.groupId}.${pom.artifactId}.buildstarted"] =
> ${systemScope["${pom.groupId}.${pom.artifactId}.buildstarted"]}</echo>
>       </goal>
> 
> Thanks !
> 
> Marc-Andre
> 
> -----Original Message-----
> From: Deblauwe, Wim [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 10, 2005 9:02 AM
> To: 'Maven Users List'
> Subject: RE: Maven systemscope
> 
> 
> Does not seem to work..
> 
> I have this:
> 
>       <goal name="wim:testing">
>       
>
${systemScope.setProperty("${pom.groupId}.${pom.artifactId}.buildstarted",'t
> rue')}
>                       <ant:echo>${systemScope}</ant:echo>
>       </goal>
> 
> When I look though the echo, it states:
> ${pom.groupId}.${pom.artifactId}.buildstarted=true
> 
> so, not expanded unfortunatly...
> 
> 
> -----Original Message-----
> From: Marc-Andre Blain [mailto:[EMAIL PROTECTED]
> Sent: donderdag 10 maart 2005 14:58
> To: Maven Users List
> Subject: RE: Maven systemscope
> 
> 
> You just need to insert it in double quotes
> 
>
${systemScope.setProperty("${pom.groupId}.${pom.artifactId}.buildstarted",'t
> rue')}
> 
> Regards,
> 
> Marc-Andre
> 
> -----Original Message-----
> From: Deblauwe, Wim [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 10, 2005 8:55 AM
> To: Maven Users List (E-mail)
> Subject: Maven systemscope
> 
> 
> Hi,
>  
> I would like to add the following to the systemscope:
>  
>
${systemScope.setProperty('${pom.groupId}.${pom.artifactId}.buildstarted','t
> rue')}
> 
>  
> This does not work, because ${pom.groupId} and ${pom.artifactId} do not
> expand to their values. I want ofcourse ${pom.groupId} and
${pom.artifactId}
> to expand to their values. Is there a way of doing this?
>  
> regards,
>  
> Wim
>  
> 
>   
> Ing. Wim Deblauwe 
> Software Development Engineer 
>   
> BarcoView - Medical Imaging Systems 
> President Kennedypark 35 
> B-8500 Kortrijk, Belgium 
> Tel. +32 56 233 985 Fax +32 56 233 457 
> www.barco.com <http://www.barco.com/>  
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
> 
>  
> - - - - - - - DISCLAIMER- - - - - - - -
> Unless indicated otherwise, the information contained in this message is
> privileged and confidential, and is intended only for the use of the
> addressee(s) named above and others who have been specifically authorized
to
> receive it. If you are not the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this message and/or
> attachments is strictly prohibited. The company accepts no liability for
any
> damage caused by any virus transmitted by this email. Furthermore, the
> company does not warrant a proper and complete transmission of this
> information, nor does it accept liablility for any delays. If you have
> received this message in error, please contact the sender and delete the
> message. Thank you.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - - - - - - - DISCLAIMER- - - - - - - -
> Unless indicated otherwise, the information contained in this message is
> privileged and confidential, and is intended only for the use of the
> addressee(s) named above and others who have been specifically authorized
to
> receive it. If you are not the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this message and/or
> attachments is strictly prohibited. The company accepts no liability for
any
> damage caused by any virus transmitted by this email. Furthermore, the
> company does not warrant a proper and complete transmission of this
> information, nor does it accept liablility for any delays. If you have
> received this message in error, please contact the sender and delete the
> message. Thank you.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - - - - - - - DISCLAIMER- - - - - - - -
> Unless indicated otherwise, the information contained in this message is
> privileged and confidential, and is intended only for the use of the
> addressee(s) named above and others who have been specifically authorized
to
> receive it. If you are not the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this message and/or
> attachments is strictly prohibited. The company accepts no liability for
any
> damage caused by any virus transmitted by this email. Furthermore, the
> company does not warrant a proper and complete transmission of this
> information, nor does it accept liablility for any delays. If you have
> received this message in error, please contact the sender and delete the
> message. Thank you.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - - - - - - - DISCLAIMER- - - - - - - -
> Unless indicated otherwise, the information contained in this message is
> privileged and confidential, and is intended only for the use of the
> addressee(s) named above and others who have been specifically authorized
to
> receive it. If you are not the intended recipient, you are hereby notified
> that any dissemination, distribution or copying of this message and/or
> attachments is strictly prohibited. The company accepts no liability for
any
> damage caused by any virus transmitted by this email. Furthermore, the
> company does not warrant a proper and complete transmission of this
> information, nor does it accept liablility for any delays. If you have
> received this message in error, please contact the sender and delete the
> message. Thank you.
- - - - - - - DISCLAIMER- - - - - - - -
Unless indicated otherwise, the information contained in this message is
privileged and confidential, and is intended only for the use of the
addressee(s) named above and others who have been specifically authorized to
receive it. If you are not the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this message and/or
attachments is strictly prohibited. The company accepts no liability for any
damage caused by any virus transmitted by this email. Furthermore, the
company does not warrant a proper and complete transmission of this
information, nor does it accept liablility for any delays. If you have
received this message in error, please contact the sender and delete the
message. Thank you.

Reply via email to