如何使Maven构建因警告而失败? [英] How to make Maven build fail on warnings?

查看:86
本文介绍了如何使Maven构建因警告而失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我的Maven版本会发出警告,即Maven输出的行以[WARNING]开头. (我所谈论的不是例如已编译的Java代码中的警告,而是例如有关正在创建一个空jar文件的警告.)

Sometimes my Maven build gives a warning, i.e., the Maven output has a line starting with [WARNING]. (I am not talking about, e.g., warnings in compiled Java code, but, e.g., a warning that an empty jar-file is being created.)

在这种情况下,我希望我的构建失败.我该怎么办?

In such a situation I want my build to fail. How do I do that?

推荐答案

已经在 MNG-5091 .在他们的JIRA中投票,让我们等待(这是我所做的):)

This feature was already suggested to Maven team in MNG-5091. Upvote it in their JIRA and let's wait (this is what I did) :)

这篇关于如何使Maven构建因警告而失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆