-
Notifications
You must be signed in to change notification settings - Fork 0
[Maven] test source code will be lost after Skip Tests is enabled
Gukie edited this page Nov 17, 2017
·
1 revision
- Test source classes will be lost when Skip Tests is enabled when run in Eclipse.
- It seems the Skip Tests is equals to -Dmaven.test.skip, which will skip both compilation and execution
- If we want the test classes to be generated to avoid seeing ClassNotFoundException when running Junit after building, we should configure the goals as:
clean install -DskipTests
According to the documentation on the Maven Surefire Plugin, -Dmaven.test.skip should skip both compilation and execution of the tests. By contrast, -DskipTests just skips the test execution: the tests are still compiled
refer: