On 1/30/07, Andrew Williams <[EMAIL PROTECTED]> wrote:
Make a new project ("T") and put all of the test code there in compile
scope (src/main/java)
then project A and B can both depend on T in scope "test".
The Shale framework[1] has a real-life example of this technique. We wanted
to use a common set of unit test base classes across tests for a bunch of
other modules, and the best solution was to create a separate Maven module
for the test framework, then depend on it (with "test" scope) everywhere i
was needed in our tests.
Andy
Craig
[1] http://shale.apache.org/
Leo Freitas wrote:
>
> How to fix dependencies among testing code?
> That is, if I have a project B test code that
> depends on project A test code.
> That is, there is abstract/base testing source
> code setup for A that B also uses.
>
> The usual <dependency> tag (even for test scope)
> would link to B/main/java with A/main/java but
> would not link B/test/java with A/test/java.
>
> That implies in a compilation error if I try to
> run the test cases for B. I thought to use assemblies
> to fix this, but it does not sound right.
>
> Any suggestion?
>
> ---------------------------------------------------------------------
> 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]