Incremental build in Jenkins

前端 未结 1 1584
忘掉有多难
忘掉有多难 2021-02-09 20:32

I am using Jenkins 1.462 and maven version is 3.0.4. At Jenkins I enabled check-box \"Incremental build - only build changed modules\"

I want to figure out 2 questions:<

相关标签:
1条回答
  • 2021-02-09 20:43

    As stated by Maven documentation incremental builds are not very reliable at least until 3.0.4:

    Currently (3.0.4) Apache Maven doesn't support incremental builds very well.

    https://cwiki.apache.org/confluence/display/MAVEN/Incremental+Builds (first line)

    Instead, I would strongly suggest using any of these two approaches for speeding up your build:

    • Using parallel builds. In my experience in large projects this works great and can greatly reduce the build time with minimum (if any) risk. Just execute something like mvn -T 1.5C clean install https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3

    • If your modules are independent you can rather move them to different projects and glue them together by using maven dependencies.

    0 讨论(0)
提交回复
热议问题