How can I speed up my maven2 build?

前端 未结 8 2153
孤独总比滥情好
孤独总比滥情好 2020-12-13 04:29

I\'m using a local artifactory to proxy the request, but the build and test phases are still a bit slow. It\'s not the actual compile and tests that are slow, it\'s the \"wa

相关标签:
8条回答
  • 2020-12-13 05:03

    There are some possibilities to optimize some of the build tasks. For example the 'clean' task can be optimized from minutes to just milliseconds using simple trick - rename 'target' folder instead of delete.

    To get details how to do it refer to Speed up Maven build.

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

    Initially, you should get a finer analysis on your build times using something like this and identify the candidates that are taking the most time.

    Are tests spinning up a H2 database per test? Is the download of external jar files taking the time? This will guide where to focus your investigation. Just applying go-fast flags don't usually work as they would have already been included by default, and you don't want to be sacrificing your tests with skip flags.

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