It sounds like you want a test-jar. See
http://maven.apache.org/guides/mini/guide-attached-tests.html 

I don't know how you could do this in Eclipse other then have the
Eclipse project have the test-jar in it's build path. I don't think
Eclipse can support a separate classpath for tests from main code. You
can specify additional classpaths when you run each test, but that's a
lot of effort and still wouldn't let you compile the test classes.

-----Original Message-----
From: Martin Aspeli [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 01, 2006 12:43 PM
To: [email protected]
Subject: Letting the tests of one project depend on the tests of another
one


Right, sorry for the flurry of questions...

We have a parent project P and two projects A and B inside it.
A/src/test/java/foo/bar has a class DatabaseTestCase. Now I need to
write a
database test in B, so I'd like to import foo.bar.DatabaseTestCase.

However, although B has a dependency on A, it doesn't get the test class
files in the JAR, so the import fails. I could always move the common
base
classes to the main package, but then I get dependencies on JUnit and
DBUnit, which are obviously still only necessary when running tests (be
they
for A or B).

Can Maven handle this?

Can Eclipse handle this? :)

Martin
--
View this message in context:
http://www.nabble.com/Letting+the+tests+of+one+project+depend+on+the+tes
ts+of+another+one-t1717855.html#a4665455
Sent from the Maven - Users forum at Nabble.com.


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