Hi all,

I have three Maven projects example:A:1.0, example:B:1.0, and example:C:1.0. The former aggregates the two latter projects.

Now project example:B:1.0 attaches a test-jar to is primary artifact (as per <http://maven.apache.org/guides/mini/guide-attached-tests.html>).

Project C has a "test" scoped dependency on this attached artifact: example:B:test-jar:tests:1.0. (again, per the mini guide.)

Now, if I use Maven to install the aggregator project A like so

  mvn clean install -Dmaven.test.skip=true

and my local repository is initially void of example:B:test-jar:tests:1.0, I get a build failure.

While this seems to be related to <http://jira.codehaus.org/browse/MNG-2045>, I am not sure its the same issue, as the following *does* work:

  mvn clean install

This properly installs example:B:test-jar:tests:1.0 when building project B, just in time before project C needs it.

So, is the behavior when -Dmaven.skip.test=true a bug? Or need test-scoped dependencies still present even if nobody actually uses them? (FWIW, the behavior occurs using both Maven 2.2.1 and the 3.0-SNAPSHOT embedded into M2Eclipse.)

Thoughts?

Andreas Sewe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to