ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Taylor <>
Subject Re: Embedding ANT into a project...
Date Wed, 20 Jun 2001 11:48:51 GMT
Depends on what you mean by "embedding". In my application I've
"embedded" Ant as follows:

1.) Copy into your project. RENAME THIS

2.) Make runBuild() have either public or package access, depending on
what you need.

3.) Comment-out project.fireBuildStarted() and
project.fireBuildFinished() from runBuild(). Now I can't remember why I
had to do that!

4.) Of course ensure the usual Ant jars are in your classpath.

Then I just pass in all the usual Ant parameters to Main(). This works
for me because I'm using an external "build" file. I think you're going
to have to do a little more since you're effectively wanting to hand
Ant a subset of a file. Just glancing at the code, I'd look into the
line ProjectHelper.configureProject(...) in runBuild().

--- Jon Baer <> wrote:
> Im just curious, Im about to write an AntProcessor for a natural
> language
> project Im working on (  The way it works is
> something like:
> <pattern>BUILD THE ALICEBOT</pattern>
> <template>
>     <ant>
>     <!-- ant target here -->
>     </ant>
> </template>
> I know, rather wierd but I figured since we are using Ant anyway that
> it would
> be cool to process some tasks under there.  Has anyone embedded it
> before?
> - Jon


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

View raw message