On 9 May 2012 06:51, Iordanov, Borislav (CIAO) <[email protected]> wrote: > Hi, > > I'm a relatively new Maven user. I found an exact description of my problem > on StackOverflow, but no solution: > > http://stackoverflow.com/questions/10174542/resolving-maven-circular-dependencies-between-test-testhelper-and-project-unde > > One can easily get around the problem by first building the core project with > -Dmaven.test.skip=true. But the Eclipse plugin is not so smart and I can't > load my projects in Eclipse. > > I think this a legitimate case that Maven should be able to solve on its own > since the common test classes (Atesthelper in the StackOverflow post) are > declared as a test scope dependency. > > Is there any solution available for this problem (splitting the main project > in two is not an option, and it would be a terrible hack just to satisfy a > Maven limitation)? Any plugin or configuration trick?
The solution is to put A_t in a separate module that just has tests, breaking the circle. You need to keep in mind the way the lifecycle works, i.e. that the lifecycle is completed on each module before moving onto the next, so even though the requirements of the test phase could be satisfied if *all* modules are finished the compile phase, you will never have that case. > > Thanks much in advance! > Boris --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
