On Tue, Jul 17, 2012 at 2:39 PM,  <org.apache.maven.u...@io7m.com> wrote:
> I have a multi-module project P, with modules P.Core, P.A, P.B.
>
> Both P.A and P.B are different implementations of an API specified
> in P.Core. In order to test that all implementations of P.Core have
> the same semantics, P.Core exports a set of abstract classes containing
> junit 4 tests which are then completed by P.A and P.B.
>
> The problem is this: classes defined in p-core/src/main/test are not
> visible from p-a/src/main/test or p-b/src/main/test. Moving the classes
> into p-core/src/main/java makes them visible to the tests defined in
> the other modules, but then this means that the junit dependency has
> to be moved from the test phase of P.Core to the compile phase, which
> is somewhat irritating.
>
> Is there a way allow the 'test' sections of modules to see each other?

Sure, add a dependency on the "test-jar" (and of course generate and
attach it in P.Core).
See http://maven.apache.org/guides/mini/guide-attached-tests.html


-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

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

Reply via email to