如何在 Maven 执行期间禁用特定警告?

wat*_*ery 5 maven

由于我使用的配置,我得到了很多这些:

[WARNING] 'dependencies.dependency.systemPath' for local-deps:[...] should not point at files within the project directory, ${basedir}/[...] will be unresolvable by dependent projects [...]
Run Code Online (Sandbox Code Playgroud)

由于这是应用程序当前的设置方式,我无法修复它们;但是它们使控制台混乱,那么有没有办法禁用它们?mvn --quiet不是一个选项,因为它删除了太多消息。

Yur*_* G. 2

请参阅Maven 3.1.x 日志记录文档。您可以通过编辑文件来配置日志级别${M2_HOME}/conf/logging/simplelogger.properties。首先将值设置为org.slf4j.simpleLogger.showLogNameto true,您将看到打印您不需要的消息的日志名。之后添加行org.slf4j.simpleLogger.log.a.b.c=errorwhere a.b.cis the logname。