Re: Test source dependencies

2007-01-31 Thread Craig McClanahan

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  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]




RE: Test source dependencies

2007-01-30 Thread Jörg Schaible
Leo Freitas wrote on Tuesday, January 30, 2007 4:24 PM:

> 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  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?

Use a test-jar artifact: 
http://maven.apache.org/guides/mini/guide-attached-tests.html

- Jörg

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



Re: Test source dependencies

2007-01-30 Thread Andrew Williams
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".

Andy

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  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]



Test source dependencies

2007-01-30 Thread Leo Freitas


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  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]