You will need to package those shared test files in a separate
test-jar artifact, which you will then include as a dependency in
modA, modB, and modC.

There is additional information about creating and using test-jar
modules on the Maven website.

Wayne

On 11/28/06, Petar Tahchiev <[EMAIL PROTECTED]> wrote:
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.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to