Hi Jörg,

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?

This is expected. The flag tells Maven to skip the complete test stuff i.e. also the compile phase and you will have an empty test jar. Therefore use -Dmaven.skip.test.exec=true to compile the test code, but skip the test execution.

thanks you for the explanation.

Just for the record: the property in question is called "maven.test.skip.exec", not "maven.skip.test.exec". Once that is fixed (or when using "skipTests", as Dan suggested) everything builds just fine; the attached tests are installed and found as dependency (even if they are never used).

The only unfortunate thing is that M2Eclipse's "Skip Tests" checkbox in the "Run Configurations" dialog seems to map to "maven.skip.test", not "maven.test.skip.exec" or "skipTests". Consequently, as soon as you have attached tests the GUI is not all that helpful anymore. :-(

Best wishes,

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to