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: Greeting and task development question
Date Fri, 03 Oct 2003 14:31:25 GMT
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


Mime
View raw message