Maven enforcer plugin missing or invalid rules

你。 提交于 2019-12-03 05:50:29
user944849

It may be that you are using invalid rule names. Check out the rules page. The rule names are case sensitive. Though this is not the case here.

---- Edit ----

Note that the POM configuration has an execution ID of enforce-java and that execution is bound to the validate phase of the lifecycle. The command mvn enforcer:enforce is running a goal, not a phase in the lifecycle. The configuration you provided in the POM doesn't apply to the enforcer:enforce goal.

There are two ways to make this work. Which one you choose depends on what you need.

  1. If you are just trying to test the enforcer plugin configuration without running the whole build, run mvn validate.
  2. If the requirement is that mvn enforcer:enforce works, then change the execution ID to default-cli.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!