Mercurial > hg > Blog
diff content/Maven/skipping-tests.md @ 98:1d9382b0329b
Specify the syntax on markdown blocks to avoid broken output that has class=err
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 19 Dec 2019 10:04:33 +0100 |
parents | 4cd9b65e10e4 |
children |
line wrap: on
line diff
--- a/content/Maven/skipping-tests.md Thu Dec 19 09:31:57 2019 +0100 +++ b/content/Maven/skipping-tests.md Thu Dec 19 10:04:33 2019 +0100 @@ -4,18 +4,22 @@ In more complicated Maven builds you might package your tests along with your normal code to use in other modules (see plugin doc to the [maven-jar-plugin](http://maven.apache.org/plugins/maven-jar-plugin/index.html) how to do it). For normal development you might not want to execute the unit tests every time you build. Compiling the source with + ::shell mvn compile won't build the tests which might fail the whole build as other modules depend on the compiled test classes. So you might be tempted to use + ::shell mvn compile test-compile which won't do the job either because the tests won't be compiled. At first glance using + ::shell mvn -Dmaven.test.skip=true test seems to be what you want to do but alas, the tests won't be compiled in this case either. The solution to this problem is to use + ::shell mvn -Dmaven.test.skip.exec=true test which actually enters the test phase (which in turn compiles the tests) but skips only the execution of the unit tests.