ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Broderick <gbroder...@prosrm.com>
Subject RE: Greeting and task development question
Date Fri, 03 Oct 2003 15:04:40 GMT
Several methods:

1.  If the classes are on your classpath, then Ant should find them
automagically.
2. If the classes' jar file(s) can be put into ${ANT_HOME}/lib/ then Ant
should find them automagically.
3. If you're using an AntClassLoader (at least with the Ant 1.5 codebase,
haven't fiddled with the 1.6beta codebase enough to know), you can tell the
class loader a classpath where it should look for these classes.  This has
made my life a lot easier in a number of instances... :-)

Cheers
GRB


> -----Original Message-----
> From: Bender, Christopher 
> [mailto:Christopher.Bender@tdsecurities.com] 
> Sent: Friday, October 03, 2003 9:31 AM
> To: Ant Users List
> Subject: RE: Greeting and task development question
> 
> 
> Ok, ive been able to get a simple class to run from a jar 
> file, but now my problem is that the class I am trying to run 
> accesses other classes OUTSIDE of its own jar.  How would i 
> go about getting ANT to know where to find these classes?
> 
> Thanks Again
> Chris
> 
> -----Original Message-----
> From: Doug Lochart [mailto:dlochart@capecomputing.com]
> Sent: Thursday, October 02, 2003 2:27 PM
> To: Ant Users List
> Subject: Re: Greeting and task development question
> 
> 
> I prefer the <classpath> elements but that is the general idea.
> 
> Something like this:
> 
>  <taskdef  name="theTask"  classname="com.company.project.TaskClass">
>       <classpath>
>         <fileset dir="${utils.dir}/AntUtils/jars">
>           <include name="AntUtils.jar"/>
>         </fileset>
>      </classpath>
>   </taskdef>
> 
> Doug
> 
> 
> Invisible to Telescopic Eye ... Infinity the start that would not die!
> All who dare to cross her course
> Are swallowed by a fearsome force
> Through the void ... To be destroyed ?...
>    Or is there something more?
> Atomized .. At the core .. ot through the Astral Door ..
>    To SOAR !!!
> ----- Original Message ----- 
> From: "Bender, Christopher" <Christopher.Bender@tdsecurities.com>
> To: "Ant Users List" <user@ant.apache.org>
> Sent: Thursday, October 02, 2003 2:13 PM
> Subject: RE: Greeting and task development question
> 
> 
> Doug,  do you mean something like this:
> 
> <taskdef name="theTask"
>  classname="com.company.project.rel.TaskClass"
>  classpath="/deploy/theJarContainingTheClass.jar" />
> 
> where the jar has a class called 'TaskClass' of package
> com.company.project.rel??
> 
> CB
> 
> -----Original Message-----
> From: Doug Lochart [mailto:dlochart@capecomputing.com]
> Sent: Thursday, October 02, 2003 2:07 PM
> To: Ant Users List
> Subject: Re: Greeting and task development question
> 
> 
> You need to have the jar with tasks in the classpath.  One 
> way to do this is
> put the jar in the $ANT_HOME\lib directory.  If that is not 
> desirable you
> will need to spell out the classpath for your ant task in the 
> <taskdef>
> definition for your task so that ant can find it to run your task.
> 
> I hope this helps
> 
> Doug
> 
> Invisible to Telescopic Eye ... Infinity the start that would not die!
> All who dare to cross her course
> Are swallowed by a fearsome force
> Through the void ... To be destroyed ?...
>    Or is there something more?
> Atomized .. At the core .. ot through the Astral Door ..
>    To SOAR !!!
> ----- Original Message ----- 
> From: "Bender, Christopher" <Christopher.Bender@tdsecurities.com>
> To: <user@ant.apache.org>
> Sent: Thursday, October 02, 2003 1:50 PM
> Subject: Greeting and task development question
> 
> 
> Hey everyone!
> 
> Im new to this list and am a little unsure of how things work 
> but Im sure
> Ill catch on soon enough.
> 
> My first question is regarding the writing of my own tasks.  
> I have been
> able to write a simple task and get it to run using the 
> information found in
> the ant manual.  Unfortunate, I need to run more complex 
> tasks that have
> been zipped into a jar file.  I have the manifest for the jar 
> pointing to
> the class I want to run, and now I am wondering if there is 
> anyway I can get
> ant to run this jar?
> 
> Thanks a lot,
> 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
> 
> 
> ---------------------------------------------------------------------
> 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
> 


--------
This e-mail is for the designated recipient only and may contain privileged
or confidential information. If you have received it in error, please notify
the sender immediately and delete the original. Any other use of this e-mail
is prohibited.


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


Mime
View raw message