ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <ja...@squaretrade.com>
Subject Re: Compiling a single file
Date Mon, 15 Jan 2001 17:30:54 GMT
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" <kevinj@develop.com>
To: "Ant-User" <ant-user@jakarta.apache.org>
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
> 


Mime
View raw message