Is is possible to modify the maven console output

2019-03-17 04:12发布

I was wondering if it was possible to modify the output from maven to for example hide the lines that start with [INFO] or to be able to see lines that start with [DEBUG]?

3条回答
狗以群分
2楼-- · 2019-03-17 05:05

You can activate debug output using -X or --debug. For example:

mvn -X install

You can hide INFO messages using -q or --quiet. For example:

mvn -q install
查看更多
趁早两清
3楼-- · 2019-03-17 05:05

try grepping the output, e.g. mvn help:evaluate -Dexpression=project.version | grep -v "^\["

查看更多
啃猪蹄的小仙女
4楼-- · 2019-03-17 05:07

I don't think there is a way to configure it as a logger but mvn -q hides the [INFO] lines and mvn -X shows the debug messages.

Update in 2015: newer versions of maven have added a config file where this is finally possible although as a global per install configuration, check on your $mavenInstallationDir/conf/logging/simplelogger.properties if the file doesn't exist then your maven version is probably too old, I believe it was added on the 3.1 release

查看更多
登录 后发表回答