ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas SMETS <tsm...@netscape.net>
Subject Re: I don't understand what's happening
Date Sat, 19 Apr 2003 17:14:48 GMT

Correct !
Thomas,



Antoine Levy-Lambert wrote:
> I think you should write in your echo target :
>         if="aspect-compiler.available"
> and not
>        if="${aspect-compiler.available}"
> (if and unless expect property names and not property values)
> Antoine
> 
> ----- Original Message -----
> From: "Thomas SMETS" <tsmets@netscape.net>
> To: <user@ant.apache.org>
> Sent: Tuesday, April 15, 2003 10:33 PM
> Subject: I don't understand what's happening
> 
> 
> 
>>Here it is my build.xml :
>>
>>===========================================
>><?xml version="1.0" ?>
>>
>><project basedir=".." default="echo" name="TestsForCustomer">
>>    <!-- Prefixes all the environment properties with the 'env.' string
>>      -->
>>    <property environment="env"  />
>>
>>    <!-- Only the properties located in this file can be modified to
>>customize    -->
>>    <!-- some values to your environment     -->
>>    <property resource="local.properties" />
>>
>>    <!-- Only the properties located in this file can be modified to
>>customize    -->
>>    <!-- some values to your environment    -->
>>    <property resource="externalTasks.properties" />
>>
>>   <taskdef
>>resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
>>     <classpath>
>>       <pathelement location= "${scripts.lib.dir}/aspectjtools.jar"/>
>>     </classpath>
>>   </taskdef>
>>
>>
>>    <target name="init"
>>            description="Needed to have some variables set.">
>>       <echo>Running the "init" task</echo>
>>    <available classname="org.aspectj.tools.ajbrowser.Main"
>>        property="compiler.inClasspath" />
>>       <available classname="${aspectj.needed}"
>>        property="aspect-compiler.available" />
>>       <available classname="${ftp.needed}"
>>        property="ftp.available" />
>>       <available classname="${junit.needed}"
>>        property="junit.available" />
>>       <echo> $ { aspect-compiler.available } :
> 
> ${aspect-compiler.available}
> 
>>       </echo>
>>    </target>
>>
>>
>>    <!-- Verifies if some libraries are present in the CLASSPATH -->
>>   <target  name="echo"
>>        if="${aspect-compiler.available}"
>>        depends="init"
>>                 description="Test the switch cases">
>>      <echo>
>>        Test
>>            aspect compiler available (${aspectj.needed}):
>>${aspect-compiler.available}
>>            ftp.client available (${ftp.needed}) : ${ftp.available}
>>            junit available (${junit.needed}) : ${junit.available}
>>      </echo>
>>    </target>
>>
>></project>
>>
>>
>>
>>================================
>>Voila !
>>
>>Running it gives this :
>>/////////////////////////  OUT PUT  /////////////////////////
>>[tsmets@calvin scripts]$ ant -buildfile test.xml
>>Buildfile: test.xml
>>
>>init:
>>      [echo] Running the "init" task
>>      [echo]  $ { aspect-compiler.available } : true
>>      [echo]
>>      [echo]
>>//////////////////////////////////////////////////////////////
>>
>>While I would have exepected, the variable being "true", the "echo"
>>target being executed.
>>
>>Can someone tellme how I could do that ?
>>
>>Tx,
>>
>>Thomas,
>>
>>Thomas,
>>--
>>Thomas SMETS
>>SCJP2 - Brussels
>>
>>http://tsmets.lautre.net
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


-- 
Thomas SMETS
SCJP2 - Brussels

http://tsmets.lautre.net


Mime
View raw message