You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Joerg Hohwiller <jo...@j-hohwiller.de> on 2007/01/11 23:33:23 UTC

Re: Dependency management

Hi Alexander,

> Hi, I have a few questions about modules and dependencies.  Does the
> order of modules listed in the parent pom.xml matter?  
As said by others it does NOT matter for the dependency management.
It only matters for the ordering when the modules are rendered to the
menu of the generated site.

I maintain a very big project with maven that has up to 4 level deepth
modules and very complex situations like

P/B/B1 depends on P/A/A1
P/B/B2 depends on P/B/B1 and P/A/A2
P/A/A2 depends on P/B/B1

Where P is the main project, A and B are modules that both have to sub modules.
So it is NOT possible to build A or B completely independent of each other.
My situations are sometimes even more complex and I never had trouble with this.

> For example, if C
> depends on A and B depends on C, then the correct order would be:A, C  B
> <module>A</module>
> <module>C</module>
> <module>B</module>
> 
> If I specify instead
> <module>A</module>
> <module>B</module>
> <module>C</module>, will Maven pick up the right dependency order and
> build as if I had written A,C,B?
> 
> As for my second question, if I declare a dependency in a project, will
> that artifact be automatically built and deployed to maven repo so that
> it would be picked up for build?  For example, if I declare:
> 
> <dependency>
> 	<groupId>b</groupId>
> 	<artifactId>a</artifactId>
> 	<version>1.0</version>
> </dependency>
> 
> Will Maven go and build a for me or do I need to include a as a
> submodule?  Thanks. 
Regards
  Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org