Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 66409 invoked from network); 15 Jan 2001 17:31:48 -0000 Received: from femail5.sdc1.sfba.home.com (24.0.95.85) by h31.sny.collab.net with SMTP; 15 Jan 2001 17:31:48 -0000 Received: from alsatian ([24.18.23.12]) by femail5.sdc1.sfba.home.com (InterMail vM.4.01.03.00 201-229-121) with SMTP id <20010115173151.MEYA29808.femail5.sdc1.sfba.home.com@alsatian> for ; Mon, 15 Jan 2001 09:31:51 -0800 Message-ID: <123101c07f19$0b508470$020a0a0a@alsatian> From: "Jason Rosenberg" To: References: Subject: Re: Compiling a single file Date: Mon, 15 Jan 2001 12:30:54 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Kevin, You could set things up to use a command-line defined property: ant -DjavaFileToCompile=foo And your script could then refer to ${javaFileToCompile} You could also wrapt the defining of this property within your Ant launching script, so you don't have to always enter '-DjavaFileToCompile'.... Jason ----- Original Message ----- From: "Kevin Jones" To: "Ant-User" Sent: Monday, January 15, 2001 12:14 PM Subject: Compiling a single file > Is there a way to get Ant to compile a single .java file, rather than have > to re-compile all the changed files in the project? > > So if I have foo.java and bar.java. I edit both but I only want to compile > foo.java. I can do this using ant by having a foo.java target and a bar.java > and then doing ant [bar.java|foo.java]. But suppose the project has a 100 > files. I don't want to write a build.xml with a hundred targets. Is there a > way of generalising ant to handle this? > > Kevin Jones > DevelopMentor > www.develop.com >