> -----Original Message----- > From: Brown, Carlton > Sent: Friday, November 18, 2005 6:15 PM > To: Ant Users List > Subject: Subdirectory problem/always recompiles > > I've got a situation where the directory structure of the source code > doesn't exactly correspond to the package structure, and therefore the > javac task always recompiles. Due to a number of policy considerations > I can't change the dir structure, so I've tried to work around this with > some clever mapping and globbing. I couldn't come up with a solution > so I thought I'd bring it here. >
> Here's my source directory hierarchy: > > src/gadget/alpha/com/company/foo > src/gadget/beta/com/company/foo > src/gadget/gamma/com/company/foo > > > here's the output class hierarchy: > classes/com/company/foo > > And to make it more difficult, the files in the 3 subdirectories all > depend on each other. I stumbled on a solution that worked for me, using multiple path entries as attributes of the <javac> task. The solution fragment looks like thus (assuming the project basedir contains the directory gadget): <javac srcdir="gadget/alpha:gadget/beta:gadget/gamma" destdir="../classes"> I didn't know you could do this, but this prevented the second compile for me. Thanks to those who responded. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
