"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: http://www.netbeans.org/source/browse/~checkout~/ant/src/org/apache/tools/ant/module/run/ 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. -Jesse > --- "Linskey, Patrick" <[EMAIL PROTECTED]> 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 > > org.apache.tools.ant.Main invokes System.exit(), and the Main > > constructor and 'runBuild' methods are protected and private, > > respectively. -- Jesse Glick <mailto:[EMAIL PROTECTED]> NetBeans, Open APIs <http://www.netbeans.org/> tel (+4202) 3300-9161 Sun Micro x49161 Praha CR
