-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Another solution might be an attached artifact (logically attached to
the main .jar in the repository via the metadata) that would be
available to other projects...so producing project A might also produce:
a-version-tests.jar
and you could then depend on it like such:
<dependency>
~ <groupId>some.group</groupId>
~ <artifactId>a</artifactId>
~ <version>someVersion</version>
~ <type>test-jar</type>
~ <scope>test</scope>
</dependency>
would that solve the problem?
- -john
Carsten Ziegeler wrote:
| Dave Neuer wrote:
|
|>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.
|>
|
| Oh no, they are still in A - that's trick :) (ok, one could call it
| hack). You have the correct pom for A containing the tests. You make a
| sub directory in project A: "tests-for-b", add a pom.xml there
| referencing the tests of A as src (using "../") and then it works.
|
|
|>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.
|>
|
| It would be interesting to hear what the m2 developers say about this
| problem :)
|
| Carsten
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFDMFs1K3h2CZwO/4URAq1eAJwMu6k7TkUiR25AcmxtHAGm77U26wCfRiBh
uTSibc3Gno8WdJEABwrM6BM=
=6B7J
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]