Yes, that's a workaround I'm not OK with, so a developer cannot be in
/masterProject/projectA and do "m2 test," see BUILD SUCCESSFUL and think
that everything is OK and check in a bunch of broken code because no
tests
were run -- since the tests for A don't live in A.
Again, I did write a maven-test-artfiact plugin which has a compile and
install target; it *does* generate a test artifact (default name
${artifactId}-test.${packaging}, but it's configurable.
However, it doesn't generate a POM, and even w/ a manually generated
one, and a declared dependancy on A's test artifact in project B,
surefire doesn't run the tests in the baseclasses which reside in the
test.jar.
That's where I got, and where I ran out of patience and time to keep
going. I'd be happy to ask my manager if we can release this code if
someone else were interested in running w/ it.
Dave
-----Original Message-----
From: Carsten Ziegeler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 20, 2005 2:05 PM
To: Maven Users List
Subject: Re: [m2] reasons for sticking with maven
Dave Neuer wrote:
>
> However, I don't like having no ability to reuse test code from one
> project in another project which depends on it. Example: project A has
> interface Blah and interface BlahDAO to persist blahs. I have
> AbstractBlahDAOTest which has testXXX methods which test *interface
> invariant* conditions of BlahDAO. Project B has a new subclass of Blah
> and BlahDAO, but it's ProjectBBlahDAO *must* still abide by the
> interface invariant constraints. So I want to have ProjectBBlahDAOTest
> which extends AbstractBlahDAOTest from project A, but I can't because
I
> can't generate another (test) artifact in maven.
>
We experienced similar problems in Cocoon - our workaround is to add
another
project A-test which contains the all test classes as its source. Then B
can depend on A-test with scope "test". But I think this is only a
workaround. It would be great if this could be solved somehow in m2
without any tricks.
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
---------------------------------------------------------------------
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]