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
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.
Here is the example
mvn clean install -rf :your-module
Syntax: mvn -rf modulename mavengoal or mvn --resume-from modulename mavengoal
Ex: mvn -rf admin-module clean install or mvn --resume-from admin-module clean install
You could run the build of module 6 separately to see if it still fails, but I'm afraid that you need to build all modules from the beginning when you want to run the "big" build.
Edit: Of course the subsequent builds will be faster because the code of modules 1-5 are already compiled, unless you run clean as part of your build.
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
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