Can we start the maven build from the point where it failed

前端 未结 6 420
孤城傲影
孤城傲影 2020-12-13 03:20

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

相关标签:
6条回答
  • 2020-12-13 03:43

    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.

    0 讨论(0)
  • 2020-12-13 03:46

    Here is the example

    mvn clean install -rf :your-module
    
    0 讨论(0)
  • 2020-12-13 03:48

    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

    0 讨论(0)
  • 2020-12-13 03:50

    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.

    0 讨论(0)
  • 2020-12-13 03:55

    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
    
    0 讨论(0)
  • 2020-12-13 04:03

    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
    
    0 讨论(0)
提交回复
热议问题