... or simply name them both non-java, such as A.java.source, and then
copy the desired one to A.java in its current directory (removing any
pre-existing A.java copies beforehand). That way, there is only one
A.java, regardless of directory.
If there are two different cases that are compiled, my solution for
similar situations (e.g., a family of products with shared classes and
some classes with minor product-specific variations, but the same class
name in each product) has been to have separate directories for the
unique cases and a common directory for the shared files -- then compile
with the desires sourcepath or equivalent.
For example:
.../common/B.java
.../common/C.java
.../case1/A.java
.../case2/A.java
Then compile using either "common + case1" or "common + case2"
directories, as desired. This can be extended hierarchically.
--Wayne
Burgess, Benjamin wrote:
You could always mange your files ahead of compiling. For example, you
could copy everything from the first directory into a temp directory,
then copy everything from the second directory into the temp directory
overwriting existing files, then compile from the temp directory.
Ben
-----Original Message-----
From: David Alves [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 27, 2007 2:18 PM
To: Ant Users List
Subject: filename collisions when compiling
I have two directories of source files that I want to compile. One of
them has
A.java
B.java
C.java
the other one has
A.java
The version of A in the second directory is different from the version
in the first directory. Is there set up my javac task so that it always
takes source files from the second directory if they are present there,
but takes them from the first directory if they are not present? Thanks
in advance for your help.
Regards,
David Alves
********************************************************************************************
This message, including any attachments, contains confidential information intended
for a specific individual and purpose, and is protected by law. If you are not the intended
recipient, please contact the sender immediately by reply e-mail and destroy all copies.
You are hereby notified that any disclosure, copying, or distribution of this
message, or
the taking of any action based on it, is strictly prohibited.
TIAA-CREF
********************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]