Hello everybody,

here is my problem: I have a project that consists of many modules: let's
say moduleA, moduleB, moduleC, etc. Now when I run

mvn test-compile

what happens is that maven's surefire plugin starts to compile the JUnit
tests of the modules. But the problem is that moduleA has some classes that
are needed by moduleB and moduleC to properly compile their junit tests.  I
tried to include a dependency for moduleA in the poms of moduleB and
moduleC, but what happens here is that maven looks for moduleA in the
repository, and when he finds the needed jar, he adds it to the class-path,
but that jar doesn't include needed classes, as they were compiled in

moduleA/target/test-classes/

and thus not included in the jar in the local repository.  My question is
this: is there some approach in which I can include the test-classes folder
of moduleA in the classpath when compiling the tests of moduleB and moduleC.


Thank you very much.


Regards, Petar.

Reply via email to