ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: [PATCH] Easily invoking ant via Java APIs
Date Mon, 30 Apr 2001 12:04:19 GMT
"Twiggs, Glenn" wrote:
> I could take advantage of Patrick's patch. Why not apply the patch and avoid
> the "ugly" solution? Is there a reason for making the constructor and
> runBuild method of Main private? Please enlighten me :)

I'm sure I missed some context for this (mail server ate my ant-dev archive)
but I can't think of any reason why Main should be considered an API. It is a
helpful wrapper for commandline use, but Project is the API. If you are
integrating into an IDE, I don't think Main is the proper entry point at all.
See for example:

and specifically classes TargetExecutor, NetBeansLogger, and
OutputWriterOutputStream. Here the Ant classes Project, BuildListener,
BuildEvent, BuildException, and Location suffice for full control of the
execution of Ant. Surely such code could be simplified quite a bit if your
needs were simpler.


> --- "Linskey, Patrick" <> wrote:
> > I'm integrating ant into an IDE as the primary compilation tool, and
> > was hoping to be able to trivially invoke ant as if it were invoked
> > from a shell prompt. Unfortunately, the 'main' method in
> > invokes System.exit(), and the Main
> > constructor and 'runBuild' methods are protected and private,
> > respectively.

Jesse Glick   <>
NetBeans, Open APIs  <>
tel (+4202) 3300-9161 Sun Micro x49161 Praha CR

View raw message