Can we start the maven build from the point where it failed
Suppose, I am doing a full build on my large project which has 7 modules and on the 6th module, the build failed because a test failed. Is there any way by which I can start the build from the point it failed?
Solution 1:
You can resume the build from the 6th module using -rf
or --resume-from
:
-rf, --resume-from
Resume reactor from specified project
See the Advanced Reactor Options for details.
Solution 2:
Here is the example
mvn clean install -rf :your-module
Solution 3:
you can resume the build from any module you want by using the -rf
command.
For example, if your build failed in myproject-proxy, you can use the following command:
mvn -rf myproject-proxy clean install
Solution 4:
look at the maven summary and you will see the executed modules and where maven is stopped. then try this:
mvn clean install-Dmaven.test.skip=true -rf :yourModule