On Mon, Sep 20, 2010 at 10:48 AM, Guillaume Bilodeau <gbilod...@yahoo.com> wrote: > > Hi guys, > > I'm sure this has been discussed before, but I can't seem to find anything > related to this subject. > > I've been working for a while with Maven 2 now, but only with single-module > projects. I am now working on a multi-module project with a flat structure > and have stumbled on some interesting behaviour that I can't explain. > Basically, running "mvn clean install" on the parent POM seems to be running > the "clean" goal on every module, then the "install" goal on every module. > This causes problems when building the project, since artifacts are not > installed in the repository in an order that allows module changes to be > visible to other dependent modules. > > Is this normal and how should I deal with this behaviour? I'm using Maven > 2.2.1.
If module B depends upon A, have you made sure that in module B's pom you declare the dependency on the artifcats of A? I suspect that you aren't. Maven will calculate your dependncy graphy between modules and ensure that they are built in the correct order. So you randomly order your modules, like <module>Z</module> <module>A</module> <module>G</module> <module>B</module> And if Z -> G -> B -> A (where -> indicate the project depends on the on the one to the right) then the build order will be A, B, G, Z. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org