I have individual build.xml in each sub project. The problem is I need to add sourcepath in each build.xml to refer to the sources in the other project. As a result, the sources from the other sub project are compiled into this sub project and vice versa. This is something I don't want.
What can I say, I inherited the code :( My only concern now is to have the codes compiled and running ASAP. For the time being, I'm using Eclipse IDE to compile the codes and use Ant to jar the classes in each sub project as an individual jar file. --- Stephen McConnell <[EMAIL PROTECTED]> wrote: > > > > -----Original Message----- > > From: TH Lim [mailto:[EMAIL PROTECTED] > > Sent: Sunday, 12 March 2006 4:53 PM > > To: user@ant.apache.org > > Subject: Compile Sources Specific to Its > Subproject But Not > > Sources They Depend On > > > > Hi, > > > > I have a directory structure that looks something > like this > > > > -Projects/ > > -ProjectA/ > > +build/ > > +src/ > > +package1 > > -ProjectB/ > > +build/ > > +src/ > > +package2 > > > > > > I'm using Eclipse 3.x and have set each subproject > source to > > be built with in each subproject build directory > i.e. classes > > from ProjectA/src will be compiled into > ProjectA/build and > > ProjectB/src will be compiled into ProjectB/build. > > > > > Some of the sources in ProjectA/src depends on > sources in > > ProjectB/src and vice versa > > > > The classes generated by Eclipse are specific to > its > > subproject i.e. in ProjectA/build I will only see > > package1 and the classes benefit it and package2 > is NOT > > generated in this subproject. The same goes for > ProjectB. > > > > Is there anyway I could do the same for Ant? This > is because > > Ant generates both packages in ProjectA/build > directory. > > This does not sound right. Ant's invocation of the > javac task will place > classes into the destination directory that you > specify. From what your > saying here it sounds like your build file is > declaring that > "ProjectA/build" is the destination directory for > both projects. > > Concerning the circular dependencies - you need > factor out what is common > between the two projects and push this into a new > separate project that is > consumed by A and B. > > Cheers, Steve. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]