Depends on what you mean by "embedding". In my application I've
"embedded" Ant as follows:
1.) Copy org.apache.tools.ant.Main.java into your project. RENAME THIS
CLASS.
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 <[EMAIL PROTECTED]> wrote:
> Im just curious, Im about to write an AntProcessor for a natural
> language
> project Im working on (www.alicebot.net). 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
>
=====
Don
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/