Yes, create a jar of the test classes:
http://maven.apache.org/plugins/maven-jar-plugin/test-jar-mojo.html

There are some limitations in this though (test dependencies are not
transitive). Moving these test classes to a separate project solves
that.

/Anders

On Tue, Jul 17, 2012 at 2:39 PM,  <[email protected]> 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?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to