Roman Kennke wrote:
Hi there,

I have a problem with the javac task that I cannot solve, maybe somebody
can help me. Let's say I have a directory layout like this:

src/proj1/Class1.java
src/proj1/Class2.java
src/proj2/Class1.java
src/proj2/Class2.java

Now I want to compile Class1 from proj1 and Class2 from proj2 and
exclude the other two. Also, I need to compile those in one go because
they depend on each other. I didn't find a way to implement this using
the srcdir attribute, or nested src tags. Any ideas?


You are in trouble as javac is going to take over. If it wants something, it may take it anyway.

If you have to do this -and the only place I've even encountered such a thing was laptop bioses- the trick is to copy all the files you want to one location, and none of the files you dont want.

This will build, but leave you with another nightmare, working out which files are actually included.

I would strongly encourage you not to do this. The laptop bioses almost made sense, because they had to fit into a small amount of memory, but even then the copies and the mess of #ifdef blocks meant the usual test for 'is some code in the build' was to edit the file so that it couldn't compile, then see if that broke the build.

--
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to