If you really wanted to not include the test dependencies, you could
define a separate profile that is actived only when maven.test.skip is
not true and then includes the dependencies.
Stefan
Rohnny Moland wrote:
Thanks. maven.test.skip.exec=true is what I was looking for.
Thanks again,
Rohnny
On Feb 4, 2008 11:31 AM, Simon Kitching <[EMAIL PROTECTED]> wrote:
---- Simon Kitching <[EMAIL PROTECTED]> schrieb:
Tests can take a long time to run, so it's useful to sometimes skip that. But
compiling them is not normally something that people want to skip; checking in
code that breaks the compilation of tests should almost always be a build
failure.
If you read the surefire documentation, it explicitly says that *running* of
the tests is skipped, not compiling.
And anyway, the surefire plugin has the responsibility for running the tests,
but it is the maven-compiler-plugin that has the responsibility for compiling
them.
---- nicolas de loof <[EMAIL PROTECTED]> schrieb:
Build your project with maven.test.skip.exec=true
This will build the required test-jar dependencies but skip test execution.
Thanks for pointing that out Nicolas. All this time, I had not realised that
maven.test.skip was also skipping compilation of test classes!
The primary documentation on the surefire plugin is not at all clear on this
issue, BTW. But after drilling down into the plugin-documentation under the
project reports, it does indeed say so.
And in compiler plugin, after drilling down into project-reports |
plugin-documenation it can be seen that this plugin uses the same flag to
disable compilation of test classes - interesting.
BTW, just to clarify: I misunderstood the original email in this thread: the
original poster *wanted* to compile the unit tests but not run them, and was
surprised when maven.test.skip also prevented compilation. As Nicolas points
out, maven.test.skip.exec is the right thing to use in that case.
Regards,
Simon
---------------------------------------------------------------------
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]
--
best regards, Stefan Seidel software developer ________________________
VUB Printmedia GmbH Chopinstraße 4 D-04103 Leipzig Germany tel. +49
(341) 9 60 50 07 fax. +49 (341) 9 60 50 92 mail. [EMAIL PROTECTED] web.
www.vub.de HRB Köln 24015 UStID DE 122 649 251 GF Dr. Achim Preuss
Neudorf, Dr. Christian Preuss Neudorf
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]