Community
Participate
Working Groups
Build Identifier: 0.13.0 I upgraded to tycho 0.13.0 and ran: mvn clean install -DskipTests yet tests where run: Tests run: 257, Failures: 0, Errors: 0, Skipped: 134 I've reported this issue before, but the issue is lost in bugzilla. Reproducible: Always Steps to Reproduce: mvn clean install -DskipTests
use -Dmaven.test.skip=true
maven.test.skip=true does not check the tests for compilation errors, skipTests does that. Furthermore, in a multiproject, a tycho subproject should be a good citizen and support "skipTests" (and "maven.test.skip") in the same way of all the other subprojects.
(In reply to comment #2) > maven.test.skip=true does not check the tests for compilation errors, skipTests > does that. There are some differences between maven surefire and tycho-surefire. One of them is that for tycho-surefire, tests are always in a separate project. This is fundamentally because Tycho is MANIFEST-first and MANIFEST dependencies do not have a "test" scope as maven has for POM dependencies. For tycho, maven.test.skip=true skips test execution, not test compilation. > Furthermore, in a multiproject, a tycho subproject should be a good citizen and > support "skipTests" (and "maven.test.skip") in the same way of all the other > subprojects. You mean you are mixing pom-first and manifest-first in the same reactor? This is not supported, see [1]. That said, if you still see an issue here, attach a sample project with steps to reproduce, expected behaviour and observed behaviour so we can see what you are talking about. [1] https://docs.sonatype.org/display/TYCHO/Dependency+on+pom-first+artifacts
The difference between surefire and tycho-surefire being what they are (and justified), not supporting -DskipTests violates the principle of least surprise. I see no reason not to support it? It would make our builds faster if we can compile without running the tests on the tycho projects too. To reproduce: git clone git@github.com:droolsjbpm/droolsjbpm-build-bootstrap.git git clone git@github.com:droolsjbpm/drools-planner.git git clone git@github.com:droolsjbpm/droolsjbpm-tools.git # droolsjbpm-tools is the tycho based multiproject droolsjbpm-build-bootstrap/script/mvn-all.sh clean install -DskipTests Notice how we build everything with a single mvn command. It's non-intuitive to be forced to use a different mvn command on tycho based projects than on the other projects.
(In reply to comment #4) > The difference between surefire and tycho-surefire being what they are (and > justified), not supporting -DskipTests violates the principle of least > surprise. > > I see no reason not to support it? It would make our builds faster if we can > compile without running the tests on the tycho projects too. > > To reproduce: > > git clone git@github.com:droolsjbpm/droolsjbpm-build-bootstrap.git > git clone git@github.com:droolsjbpm/drools-planner.git > git clone git@github.com:droolsjbpm/droolsjbpm-tools.git > # droolsjbpm-tools is the tycho based multiproject > droolsjbpm-build-bootstrap/script/mvn-all.sh clean install -DskipTests > > Notice how we build everything with a single mvn command. It's non-intuitive to > be forced to use a different mvn command on tycho based projects than on the > other projects. tycho does support the (albeit deprecated) -Dmaven.test.skip.exec [1] which has the same effect as -DskipTests so this should work around your issue in the meantime. The root cause why we violate "least surprise" here is that we cannot subclass the original surefire mojo (or any other mojo for that matter) due to maven core issue [2] . Instead we have a separate mojo that should behave *similar* but it's tedious to keep it up to date with the original surefire mojo. Also, there are certain features of the maven surefire plugin which we will probably never be able to support. [1] http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#skipExec [2] http://jira.codehaus.org/browse/MPLUGIN-56
> Instead we have a separate mojo that should behave *similar* +1 for similar behavior by hooking -DskipTests to -Dmaven.test.skip.exec
Updating parameters one by one is too much effort for Tycho developers and we'd rather spend our limited resources on more serious problems. The real solution here is to refactore surefire such that it can be extended for Tycho needs, so if somebody contributes a patch, I will help to review and merge it.
*** Bug 364856 has been marked as a duplicate of this bug. ***
http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=ebc97e9fdd630446e55b3bea3d7c58e7cfbed63c