Maven Multi-Module build fails failover maven plugin?
I recently discovered that Hudson is not a problem. It was actually Maven as building from multiple modules was causing build failures, not Hudson. I just didn't notice where the problem actually existed.
Leaving the original question here.
I am using failsafe-maven-plugin to run some integration tests. The difference between fault tolerant and safe files is that fault tolerance allows failure and does not summarize.
In my nightly builds, there are times when a service using integration tests might not be available. In regular assemblies, a failover plugin would allow building a continuation, as integration tests may fail. However, Hudson doesn't seem to respect this and stops the build and makes it rain.
I tried to disable failover tests on nightly builds using -DskipIT. It doesn't seem to work as I am involved in creating multiple modules.
Any ideas on how to get Maven to respect that these tests can fail even if they are part of a specific module?
The project structure looks like this:
-parent
\-jar
\-jar (where integration tests run)
\-war
\-ear
source to share
I don't believe your initial assumption that failafe-maven fails, that the build is correct. Failure of the test does not stop the completion of the integration phase, which is different from the surefire plugin that runs unit tests. This allows the post-integration-test phase to occur, so the test environment can be torn off (closing the application server, etc.).
This is followed by a validation phase that reviews the results of the integration tests. if one of these tests fails, then Maven will return with a build failure, which Hudson will pick up correctly, so your build might be flagged as broken.
source to share