I'm not sure that I understand you entirely, but here goes.... If you
have shared test files, you will need to create a "test-jar" artifact
and add it as a dependency to any projects that need to use it.

This is documented in a mini-guide:
http://maven.apache.org/guides/mini/guide-attached-tests.html

Eclipse handles some of these classpath things without telling you
about it. It is not uncommon for things to work in Eclipse but not in
Maven for this reason (nearly always classpath or classloader issues).

Wayne

On 10/25/07, Jan Torben Heuer <[EMAIL PROTECTED]> wrote:
> Jan Torben Heuer wrote:
>
> > I have a problem with a junit test that failes when I run "mvn test" - but
> > it does not fail when I run the test by the eclipse-junit-plugin.
>
> Ok, I have another guess:
> Could it be, that dependencies to other modules are only to sources
> in /src/main/java/ but not to the test-sources in /src/test/java? (In other
> words: /target/classes and /target/test-classes)
>
> I can access a class in another module, but I cannot access a test-class in
> another test-module! (It is a mock-class, i wrote)
>
> How can I fix it?
>
> Jan
>
>
>
>
>
> ---------------------------------------------------------------------
> 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