[英]How to make Maven build fail on warnings?
Sometimes my Maven build gives a warning, ie, the Maven output has a line starting with [WARNING]
.有时我的 Maven 构建会发出警告,即 Maven 输出有一行以[WARNING]
开头。 (I am not talking about, eg, warnings in compiled Java code, but, eg, a warning that an empty jar-file is being created.) (我不是在谈论,例如,编译的 Java 代码中的警告,而是,例如,正在创建一个空的 jar 文件的警告。)
In such a situation I want my build to fail.在这种情况下,我希望我的构建失败。 How do I do that?我怎么做?
This feature was already suggested to Maven team in MNG-5091 .此功能已在MNG-5091 中向 Maven 团队建议。 Upvote it in their JIRA and let's wait (this is what I did) :)在他们的 JIRA 中投票,让我们等待(这就是我所做的):)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.