I can't say for sure I fixed it yet but I did find something in my case. I suspect the order of the modules in the parent pom is critical. In my case I have some nested module dependencies, that is module3 depends on module2 which depends on module1, etc. I suspect that you have to manually review all these dependencies and make sure all module dependencies are first in the list.
Although I found some that were not like this in my case, its a hard thing to test because you can make a change and everything still builds fine. its not until you make a breaking/new code change that another depends on can you know if the build is right...very frustrating. Again I'm not sure this will fix the issue yet but I'm going to see... It seems the reactor could be much smarter, or at least error out if its wrong. In my case the dependency the compiler complained about was in the correct reactor order but certain other modules did not have all their dependencies listed first. Let me know if this works for you. Perhaps others can let us know if I'm on the right track here. -Dave On Thu, Apr 16, 2009 at 9:26 AM, Dmitry Skavish <[email protected]> wrote: > I am having the same problem and would like to know that as well. Thanks! > > On Thu, Apr 16, 2009 at 10:19 AM, David Hoffer <[email protected]> wrote: > > > I have a multi-module build where some modules are dependent on other > > modules. What is happening is that the dependent module is getting its > > dependency from the local/corporate maven repo instead of the source code > > that was just built. How do I specify that modules always build using > > current source not prior built snapshot jars? > > > > Here is an example of the problem (it is really simple) > > > > Parent pom: > > <version>0.1-SNAPSHOT</version> > > <modules> > > <module>public</module> > > <module>internal</module> > > <module>security-public</module> > > </modules> > > > > public pom: > > <version>0.1-SNAPSHOT</version> > > > > internal pom: > > <dependencies> > > <dependency> > > <groupId>${project.groupId}</groupId> > > <artifactId>public</artifactId> > > <version>0.1-SNAPSHOT</version> > > </dependency> > > </dependencies> > > > > security-public: > > <dependency> > > <groupId>${project.groupId}</groupId> > > <artifactId>public</artifactId> > > <version>0.1-SNAPSHOT</version> > > </dependency> > > > > So what is happening is that instead of internal & security-public > > building > > using the just built public (note it is first so it was built first) they > > go > > out and download the last deployed snapshot and build using that instead. > > > > Nothing in the pom dependency syntax really says which to use but I > assumed > > that because maven 'knows' these are all in the reactor it would use > module > > source. However this doesn't seem to work, what do I need to do to fix > > this? > > > > BTW, the goals being run are 'clean deploy site-deploy' > > > > -Dave > > > > > > -- > Dmitry Skavish >
