ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas SMETS <tsm...@netscape.net>
Subject Re: Task order troubles ...
Date Mon, 14 Apr 2003 22:21:30 GMT
Oooooooooooooooops ...
I attached the file but I didn't consider the fact the attachment were 
not forwarded :-(
Here it is :

===========================================
<?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]
//////////////////////////////////////////////////////////////



Thomas,











jesse@cryptocard.com wrote:
> On Sunday, April 13, 2003, at 06:35  PM, Thomas SMETS wrote:
> 
>> I have a build task which depends of an init task.
>> The build also checks if a property -set in the init task - could have 
>> been set. Basically in the init-task I check if the aspect compiler is 
>> accessible (tru an available-task).
>> If I do an <echo> at the end of the init I can see that the 
>> aspect-compiler is accessible (property has been set) but it seem that 
>> the build task is not accessible.
>> Can someone confirm me that it's the case & how I could circumvent 
>> this, then ... ?
> 
> 
> Can you post the relevant snipits from your build file?
> 
> Jesse Stockall - jesse@cryptocard.com
> CRYPTOCard Corp.
> 
> 
> ---------------------------------------------------------------------
> 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