Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 11560 invoked from network); 20 Nov 2003 15:45:04 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Nov 2003 15:45:04 -0000 Received: (qmail 80303 invoked by uid 500); 20 Nov 2003 15:44:47 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 80271 invoked by uid 500); 20 Nov 2003 15:44:47 -0000 Mailing-List: contact user-help@ant.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 user@ant.apache.org Received: (qmail 80147 invoked from network); 20 Nov 2003 15:44:46 -0000 Received: from unknown (HELO corvil.com) (213.94.219.177) by daedalus.apache.org with SMTP; 20 Nov 2003 15:44:46 -0000 Received: from preilly.local.corvil.com (preilly.local.corvil.com [172.18.1.173]) by corvil.com (8.12.9/8.12.5) with ESMTP id hAKFild8046022 for ; Thu, 20 Nov 2003 15:44:47 GMT (envelope-from peter.reilly@corvil.com) From: peter reilly Organization: corvil To: Ant Users List Subject: Re: antcall task problems when calling ant from java Date: Thu, 20 Nov 2003 15:44:03 +0000 User-Agent: KMail/1.5 References: <4D85E67FF7BC564AA33DC6DF1E134DF002FD7CFB@TDSI-EXCH-TOR2.CORP.TDSECURITIES.COM> In-Reply-To: <4D85E67FF7BC564AA33DC6DF1E134DF002FD7CFB@TDSI-EXCH-TOR2.CORP.TDSECURITIES.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200311201544.03786.peter.reilly@corvil.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Looking at: src/testcases/org/apache/tools/ant/BuildTestFile.java one needs to init the project and set the user property ant.file as well: project.init(); project.setUserProperty( "ant.file" , new File(filename).getAbsolutePath()); Peter On Thursday 20 November 2003 15:35, Bender, Christopher wrote: > PS. When I call the same file using the command line ant tool (as opposed > through java) the build works fine. > > -----Original Message----- > From: Bender, Christopher > Sent: Thursday, November 20, 2003 10:26 AM > To: Ant Users List > Subject: antcall task problems when calling ant from java > > > Hey, > > I have a buildfile that is named something other than build.xml, for > example, build.20031120.xml. I then do the following to setup the project: > > File buildFile = new File(getTempBuildFileLoc()); > project.setBaseDir(new File(getResourceDir()); > > ProjectHelper.configureProject(project, buildFile); > > project.setProperty("homeDir", getAppHome()); > > > > The problem comes when I try and execute the project and ant attempts to > execute my antcall tasks, it gives the following: > > java.io.FileNotFoundException: C:\.......\xml\build.xml (The system cannot > find the file specified) > > It seems that when it tries to do the ant call it tries to look for a > build.xml file for some reason, even though i didnt even invoke the project > using build.xml. Is there a property I am forgetting to set? > > > > thx, > chris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org