如何抑制Maven“无法找到资源"讯息? [英] How to suppress Maven "Unable to find resource" messages?

查看:70
本文介绍了如何抑制Maven“无法找到资源"讯息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何告诉Maven对无法在其中找到依赖项的仓库显示无法找到资源" INFO消息,却显示那些确实在其中找到依赖项的信息库?即,显示匹配,但忽略未命中,因为这些淹没并模糊了匹配.

How can I tell Maven to suppress the "Unable to find resource" INFO messages for repositories in which it cannot find a dependency, but display those where it does find the dependency? That is, display the hits, but omit the misses since these drown out and obscure the hits.

例如,代替此输出:

Downloading: http://download.java.net/maven/2/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.pom
[INFO] Unable to find resource 'org.slf4j:slf4j-api:pom:1.5.8' in repository maven.java.net (http://download.java.net/maven/2)
Downloading: http://www.ibiblio.org/maven/mule/dependencies/maven2/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.pom
[INFO] Unable to find resource 'org.slf4j:slf4j-api:pom:1.5.8' in repository com.springsource.repository.bundles.release (http://w
ww.ibiblio.org/maven/mule/dependencies/maven2)
Downloading: http://repository.springsource.com/maven/bundles/external/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.pom
[INFO] Unable to find resource 'org.slf4j:slf4j-api:pom:1.5.8' in repository com.springsource.repository.bundles.external (http://
repository.springsource.com/maven/bundles/external)
Downloading: http://repository.jboss.com/maven2/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.pom

我希望Maven仅输出以下内容:

I would like Maven to simply output the following:

Downloading: http://repository.jboss.com/maven2/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.pom
2K downloaded  (slf4j-api-1.5.8.pom)

推荐答案

我不知道从maven内部做什么,但是您始终可以将输出传递给grep或sed之类的进程,以删除每个模式的行.

I don't know what to do from inside maven, but you could always pipe the output to a process like grep or sed to remove the lines per pattern.

这篇关于如何抑制Maven“无法找到资源"讯息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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