ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <>
Subject Re: Compiling a single file
Date Mon, 15 Jan 2001 17:30:54 GMT

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


----- 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 and I edit both but I only want to compile
> I can do this using ant by having a target and a
> and then doing ant [|]. 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

View raw message