And rip out the <module> functionality from poms too. Instead, have maven support "module.xml" files which contain a list of <module> definitions and nothing else. Then the confusion over parent-poms vs poms that just happen to be in the parent directory would go away too.
[EMAIL PROTECTED] schrieb: > I'd rather go the other way. Rip out the ability to reference parent > poms using relative paths, and these sort of reports would go away, > because it's *clear* that building A3 will not cause B1 or B2 to be built. > > Using relative paths to poms solves a small subset of problems, in > smallish projects. But when projects start to scale up, relative paths > don't work. And they make people *think* in path-oriented ways, rather > than thinking in repository-oriented ways. > > Regards, > Simon > > Joshua ChaitinPollak schrieb: > >> I've noticed the following behavior, which I find a bit frustrating: >> >> Using Amit's project layout below, if I cd into A3 and run 'mvn >> compile', its going to use the B1 and B2 projects from my local >> repository, even if I referenced a parent pom in A3. I wish Maven >> would use the parent pom to determine if B1 and B2 were available, and >> compile them as well. >> >> In addition, I've noticed that maven gets confused if you have modules >> depend on the test jars (or worse, assemblies) of other modules. For >> example, I have this setup: >> >> Root >> - server >> - server-integration-tests >> >> The server-integration-tests are implemented as tests (so no >> production code), but the project has a dependency on the server, the >> server:test-jar, as well as the server:tar.bz2. >> >> But when I run mvn test-compile from root, I get errors saying that >> the server:test-jar and server:tar-bz2 cannot be found. >> >> My only option is to run "mvn install", which seems to work. >> >> I guess what I'm saying is that maven only runs the phase you >> specified at the commandline, for all modules in the pom, and I wish >> it would take phase into consideration when executing dependencies. If >> I run: >> >> mvn test-compile at the root of my project, it should be smart enough >> to run mvn package on the 'server' module and provide that package to >> the 'server-integration-tests' module. >> >> -Josh >> >> On Mar 21, 2008, at 9:31 AM, amit kumar wrote: >> >> >>> How to list that dependency? I do have the dependency of A3 on B1 and >>> B2(in >>> the <dependency> tag as jar). But that doesn't seems to make Maven go to >>> build B1 and B2 when building A3 because I guess it looks in the >>> repository, >>> if not there it throws an error. >>> >>> If it has been working in this way, it would have been the solution. >>> But I >>> am not able to see that happening. >>> >>> Is there a different way of mentioning a project As' dependency on >>> another >>> projectB that would trigger the build of projectB as soon as it finds >>> in the >>> dependencies? of that project? >>> >>> >>> Regards, >>> Amit. >>> >>> On Wed, Mar 19, 2008 at 6:49 AM, Brian E. Fox <[EMAIL PROTECTED]> >>> wrote: >>> >>> >>>> Maven starts with the ordering listed in the poms (A and its children, >>>> then B and its children, etc) unless there is a dependency. If it >>>> sees a >>>> dependency, then it will automatically reorder by pushing down modules >>>> that have a dependency so they build after their dep. >>>> >>>> I'm wondering why the order matters if you don't have a dependency >>>> listed (I'm assuming you don't or it would be ordered already). >>>> >>>> -----Original Message----- >>>> From: amit kumar [mailto:[EMAIL PROTECTED] >>>> Sent: Tuesday, March 18, 2008 4:42 AM >>>> To: Maven Users List >>>> Subject: Customizing Build order >>>> >>>> Hi, >>>> I have a multi-module project with the following structure. >>>> >>>> Root >>>> -A >>>> -A1 >>>> -A2 >>>> -A3 >>>> -B >>>> -B1 >>>> -B2 >>>> -B3 >>>> -B4 >>>> >>>> >>>> In the Root's pom i have mentioned my modules as: >>>> <module>A</module> >>>> <module>B</module> >>>> >>>> Now is there a way that I can change the normal build order(which is) >>>> >>>> -Root >>>> -A >>>> -A1 >>>> -A2 >>>> -A3 >>>> -B >>>> -B1 >>>> -B2 >>>> -B3 >>>> -B4 >>>> >>>> >>>> to something like >>>> >>>> -Root >>>> -A >>>> -A1 >>>> -A2 >>>> -B >>>> -B1 >>>> -B2 >>>> -A3 >>>> -B4 >>>> >>>> It is actually a requirement. But I doubt that there is a possibility >>>> that >>>> the CVS structure itself is not competent enough then to handle >>>> inter-module >>>> dependencies. >>>> >>>> Any inputs? >>>> >>>> Thanks and regards, >>>> Amit Kumar >>>> >>>> --------------------------------------------------------------------- >>>> 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] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]