Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 76900 invoked from network); 22 Mar 2002 16:17:13 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 22 Mar 2002 16:17:13 -0000 Received: (qmail 15578 invoked by uid 97); 22 Mar 2002 16:17:07 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 15551 invoked by uid 97); 22 Mar 2002 16:17:07 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 15538 invoked from network); 22 Mar 2002 16:17:06 -0000 Subject: Re: Ant Exiting? From: jbjk To: Ant Users List In-Reply-To: <000401c1d1bc$2044a130$0c3628aa@ad.dstsystems.com> References: <69D0FD30-3DA7-11D6-9FCB-00039379521C@mac.com> <000401c1d1bc$2044a130$0c3628aa@ad.dstsystems.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 22 Mar 2002 16:16:37 +0000 Message-Id: <1016813806.4364.2.camel@oasis> Mime-Version: 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'll try this out. Thanks. On Fri, 2002-03-22 at 16:10, Craig Minton wrote: > Try calling Ant build by using the Project class: > > String buildXmlFile = "build.xml"; > File dir = new File( "E:/myproject" ); > > Project pj = new Project( ); > pj.init( ); > // Add the default listener > > // Check the createLogger() method in Main.java > pj.addBuildListener( createLogger( ) ); > > > try > { > File file = FileUtils.newFileUtils( ).resolveFile( dir, > buildXmlFile ); > buildXmlFile = file.getAbsolutePath(); > > pj.setBaseDir( dir ); > pj.setUserProperty( "basedir" , dir.getAbsolutePath( ) ); > > // Set properties, if needed > pj.setProperty( "user", user ); > > // Add your build listeners, if needed > pj.addBuildListener( new MyBuildListener( ) ); > > > File bldFile = new File ( buildXmlFile ); > pj.setUserProperty( "ant.file" , buildXmlFile ); > ProjectHelper.configureProject( pj, bldFile ); > } > catch ( BuildException be ) > { > be.printStackTrace( ); > } > pj.executeTarget( buildTarget ); > > > -Craig > > ----- Original Message ----- > From: > To: > Sent: Friday, March 22, 2002 9:13 AM > Subject: Ant Exiting? > > > > If I use Ant in another Java application and call it via the 'start' > > method on > > Main, if the build fails the JVM is closed, i.e. so is the calling > > application. > > > > Is there any way to call Ant without having System.exit called to > > signify the end of execution. > > > > -John K > > > > > > -- > > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: