ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bender, Christopher" <Christopher.Ben...@tdsecurities.com>
Subject RE: Nested Tasks
Date Tue, 14 Oct 2003 14:12:09 GMT
i am using ant 1.5.4  and the answer is yes to both questions.

-----Original Message-----
From: peter reilly [mailto:peter.reilly@corvil.com]
Sent: Tuesday, October 14, 2003 10:10 AM
To: Ant Users List
Subject: Re: Nested Tasks


  * What does task1 look like:

    Does it implement TaskContainer?

  * Does
      <sequential>
         <task2/>
      </sequential>
    work.

  * are you using ant 1.5 or ant 1.6 ?
Peter

On Tuesday 14 October 2003 15:06, Bender, Christopher wrote:
> I have changed the build file to the following, using some of Stefan's
> advice
>
> <path id="taskPath">
>    <fileset dir="${homeDir}/deploy/lib">
> 	 <include name="*.jar"/>
> 	 <include name="*.zip"/>
>   </fileset>
> </path>
>
> <taskdef name="task1_container"
> 		 classname="com.blah.task1"
>              classpathref="taskPath"
>              loaderRef="taskLoader">
> </taskdef>
>
> <taskdef name="task2"
> 		 classname="com.blah.task2"
>              classpathref="taskPath"
>              loaderRef="taskLoader">
> </taskdef>
>
>
> but
>
> <task1_container>
>      <task2 />
> </task1_container>
>
> still doesnt seem to find the task2.
>
> I tried the .properties file solution and it did not work either.
>
> Thanks in advance for any help.
>
> Chris
>
>
> -----Original Message-----
> From: Bender, Christopher
> Sent: Tuesday, October 14, 2003 9:21 AM
> To: 'Ant Users List'
> Subject: Nested Tasks
>
>
> Hey,
>
> i am developing some of my own tasks and I am running into the following
> problem.  I have the two task defs below
>
> <taskdef name="task1_container"
> 		 classname="com.blah.task1">
>    <classpath>
> 	  <fileset dir="${homeDir}/deploy/lib">
> 		 <include name="*.jar"/>
> 		 <include name="*.zip"/>
> 	  </fileset>
>    </classpath>
> </taskdef>
>
> <taskdef name="task2"
> 		 classname="com.blah.task2">
>    <classpath>
> 	  <fileset dir="${homeDir}/deploy/lib">
> 		 <include name="*.jar"/>
> 		 <include name="*.zip"/>
> 	  </fileset>
>    </classpath>
> </taskdef>
>
> Now, if I invoke each of these tasks independently, they both run fine.
> (ie. <task1_container />
>      <task2 />
> )
>
>
> If I attempt to go:
>
> <task1_container>
>      <task2 />
> </task1_container>
>
> I get the good old ant jar/task error:
> "file:C:/......./build.xml:360: Could not create task of type: task2.
> Ant could not find the task or a class this task relies upon."
> but the jar with the tasks is found in ${homeDir}/deploy/lib and that is
> part of the classpath.
>
>
> This is stumping me pretty good and Im hoping someone has experience
> something similar and found a solution.
>
>
> Thanks,
> Chris
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message