You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Erik Svendsen <es...@lyngso-industri.dk> on 2000/10/05 11:09:18 UTC

Building current directory

Can anybody help tell me how I should configure my build.xml file so I can
build
files in the current directory. My problem is, that ant cannot find the
.class files
for the .java files. From the ant code it looks as if .class files are
looked for in the
"build-directory+relative path for .java file". So if you current directory
is somewhere
down in the sourece tree you will not find the .class file. 
I could of cause build from the root of the source tree, but I would like to
aviod this
because of the time it takes to scan all the files.

I am running Ant release 1.1.

Erik Svendsen

---
Erik Svendsen  
Software Engineer  
Lyngsø Industri  A/S  
tlf: +45 96 980 980  
email: esv@lyngso-industri.dk



Re: Building current directory

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "ES" == Erik Svendsen <es...@lyngso-industri.dk> writes:

 ES> Can anybody help tell me how I should configure my build.xml file
 ES> so I can build files in the current directory.

I'm not sure whether I understand what you want.

I assume you have src/a/b/c/D.java and classes/a/b/c/D.class. You want
to compile all files in src/a/b/c that are newer than their
corresponding .class files in classes/a/b/c/ - but you don't want to
set srcdir to src because the directory scanning takes too long.

Right?

The answer is, you can't, sorry. The best you could get is always
recompiling all files in src/a/b/c by setting the srcdir to this
directory and dest to classes.

The only good news I have to offer is that directory scanning for most
tasks will be a lot faster in Ant 1.2.

Stefan