ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: ant "run" target
Date Tue, 23 Jul 2002 18:33:45 GMT

----- Original Message -----
From: "Mike Charters" <>
To: <>
Sent: Tuesday, July 23, 2002 5:58 AM
Subject: ant "run" target

> hi,
> i am new to ant and developing in java in general.
> i was curious if it is typical to have an ant "run" target, just for
> running your program?  or is there another way that you java guys do it?

no, we run from ant all the time. I prefer to set fork=true and the same for

  <target name="import-wsdl" depends="fetch-wsdl">
      <arg file="${local.wsdl}"/>
      <arg value="--output"/>
      <arg file="${generated.dir}"/>
      <arg value="--verbose"/>
      <arg value="--package"/>
      <arg value="soapapi"/>
      <arg value="--testCase"/>

This is a 3rd party app, but I almost always run my own code from inside ant
as it guarantees the build first, and has good argument processing.

We even use as the boot launcher for our overnight load tests, making full
use of the <sleep> task.

> i noticed the book i have (ant: the definitive guide) did not say much
> about using the <java> command in the ant buildfiles much ... and i
> wondered if there is a reason (like maybe there is a different way to do
> it?)?

The reason is the book is somewhat limited in its scope :(  But there will
be a better one out in two weeks, and there is always the online
documentation, that I use so much it is my home page.

>when you do a distrib and run your program ... how do you run your
>distribution version?  do you use something like:

>java -jar somefile.jar

you can set a jar in the <java> task; this means that you have to point to
the entry point in your manifest, which means using the <manifest> task,
perhaps inside <jar>.

The other thing to run inside ant is your unit tests; look at to
discover about junit.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message