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" <[EMAIL PROTECTED]>
To: "Ant-User" <[EMAIL PROTECTED]>
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
>