如何在执行Maven期间禁用特定警告? [英] How to disable specific warning during Maven execution?
问题描述
由于我使用的配置,我得到了很多这样的信息:
Due to the configuration I'm using, I get lots of these:
[WARNING] 'dependencies.dependency.systemPath' for local-deps:[...] should not point at files within the project directory, ${basedir}/[...] will be unresolvable by dependent projects [...]
由于这是当前设置应用程序的方式,因此我无法修复它们;但是它们会使控制台杂乱无章,因此有办法禁用它们吗? mvn --quiet
不能选择,因为它会删除太多消息.
Since this is how the application is currently setup, I can't fix them; but they clutter the console, so is there a way to disable them? mvn --quiet
is not an option because it removes too many messages.
推荐答案
请参见 Maven 3.1.x记录文档.您可以通过编辑${M2_HOME}/conf/logging/simplelogger.properties
文件来配置日志级别.首先将org.slf4j.simpleLogger.showLogName
的值设置为true
,您将看到打印不需要的消息的日志名.之后,添加行org.slf4j.simpleLogger.log.a.b.c=error
,其中a.b.c
是日志名称.
See the Maven 3.1.x logging documentation. You can configure the log level by editing the ${M2_HOME}/conf/logging/simplelogger.properties
file. First set the value of org.slf4j.simpleLogger.showLogName
to true
and you will see the logname that prints your unwanted message. After that add the line org.slf4j.simpleLogger.log.a.b.c=error
where a.b.c
is the logname.
这篇关于如何在执行Maven期间禁用特定警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!