I think this bug is related to an issue I'm currently having but I'd like to
confirm.

>From the Getting
Started<http://maven.apache.org/guides/getting-started/index.html>page
there's mention that when performing a multi-module build that "it is
not required that you run install to successfully perform these steps - you
can run package on its own and the artifacts in the reactor will be used
from the target directories instead of the local repository."

This doesn't seem to be true for dependencies on attached
tests<http://maven.apache.org/guides/mini/guide-attached-tests.html>
.

An example using the following multi-module structure:
|+POM.XML   <-- multi-module and parent pom (root)
|
|--A
|  |+POM.XML   <-- attaches tests for other projects to use
|
|--B
|  |+POM.XML
|
|--C   <-- depends on test classes from A
   |+POM.XML

Results from running at the root:
mvn clean package - project c fails stating "Failed to resolve artifact."
org.example:a:test-jar:tests:1.0.0-SNAPSHOT
mvn clean install - build successful, presumably since the test artifact was
installed prior to module 'c' being built

I know ideally the test infrastructure would be it's own project/module, but
at the moment this isn't feasible (and I assume the build would work fine
under this model).

Is there a work around for this?  Is this a manifestation of issue
MNG-3043<http://jira.codehaus.org/browse/MNG-3043>
?

Thanks,
Jamie.

Reply via email to