Maven check style as a part of the build

前端 未结 3 2047
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-02 11:10

Is there a possibility to somehow force maven to fail the build if there are some checkstyle errors? Now I have to run site goal to generate java

3条回答
  •  情深已故
    2021-02-02 11:29

    Even though it has been a long time since this was asked, I did run into another problem:

    JavadocMethod: Unable to get class information for @throws tag 'X'.

    I solved this by changing the phase from "validate" to "test" so that checkstyle runs after the compile phase.

提交回复
热议问题