如何抑制Maven“无法找到资源”消息?

如何告诉Maven为无法找到依赖关系的存储库抑制“无法找到资源”INFO消息,但是显示它确实找到依赖关系的那些消息? 也就是说,显示命中,但省略未命中,因为这些被淹没并掩盖了命中。

例如,而不是此输出:

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只输出以下内容:

 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这样的进程来删除每个模式的行。

您是否尝试更改settings.xml文件中的代理设置?