ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manu manicklal <>
Subject Multiple source trees - excluding dependent classes.
Date Thu, 17 Apr 2003 01:19:29 GMT


need to compile sources in /src/webapplication into
/dist/webapplication with only classes from
webapplication tree and not ejb-java; even though
there are uncompiled dependent sources in

My project has multiple source trees. One for the web
application and one for the ejb/java classes. These
exist so we can generate the war file by simply
picking up all the compiled classes under the web
application tree.

I was attempting to compile and, war the web
application source tree and came across a problem.
Some classes in the web application source tree
reference classes in the ejb-java source tree. After
digging through the mail-archive, I used the
sourcepath="" option to surpress the -sourcepath in
javac task. Hence the dependent sources are now
getting compiled from the ejb-java tree. But the
problem is that the dependent classes are being placed
in the web application dist tree (this again because
javac task specifies -d as the destdir, which if i
supress all files are getting compiled into .). 

So when I run the war task, all dependent classes are
also getting picked up. I don't want the dependent
classes in the war file as they'd be seperately
packaged into jar files of their own.

And I need to be able to compile and generate the
webapplication tree without having to compile the
ejb-java tree first.

One possible solution that I thought of was to delete
all dependent class files from the webapplication tree
after running the javac task. But after reading
through the fileset documentation, I couldn't come up
with a way of deleting files that don't have a source
in the same directory. Also this could be prone to
error as .class files of inner classes would get
deleted too.

Second solution is to write my own Selector. Again
amounts to the same issue as the first solution.

Has anyone had a similar issue that they could
solve?Please can someone help me out with this


Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo

View raw message