You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Zarar Siddiqi <za...@gmail.com> on 2006/09/26 21:49:50 UTC

Dependency of test classes across sub-modules

I have a scenario where a test class from one child module depends on
a test class from another child module, say ModuleA and ModuleB.

After some searching, I discovered this:
http://maven.apache.org/guides/mini/guide-attached-tests.html

But for ModuleB to even compile its tests, it needs the tests from
ModuleA and ModuleA is not JAR'ed up yet (using test-jar), hence
ModuleB cannot see it.

So, if I put the following in ModuleB's pom.xml, I'll get an error
saying ModuleA is not installed yet.

    <dependency>
      <groupId>ModuleA</groupId>
      <artifactId>ModuleA</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>test-jar</type>
    </dependency>

The question is how do I install the test-jar "on the fly" so that it
gets created AND ModuleB gets to see it when I type "maven test" on my
parent module's pom.xml.

Thanks.

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