maven - 如何配置maven依赖收敛插件的输出级别?

标签 maven maven-3

我正在使用 Maven Enfrocer 插件,其依赖项集中在多模块构建中,因此它为构建中的每个 pom 运行 enfrocer 插件。每次运行该插件时,它都会产生大量信息输出,这使得读取构建结果变得困难。例如,在我的例子中,每次调用插件都会生成大约 400 行输出。下面的代码显示了输出的示例。

如何配置强制执行器依赖收敛插件以仅输出违规,否则除了依赖收敛检查成功之外不打印任何内容?

[INFO] --- maven-enforcer-plugin:1.1.1:enforce (enforce-dependencies-convergence) @ bar ---
[INFO] com.example:bar 0.0.1-SNAPSHOT 0.0.1-SNAPSHOT
[INFO] postgresql:postgresql 9.1-901-1.jdbc4 9.1-901-1.jdbc4
[INFO] com.fasterxml.jackson.core:jackson-databind 2.1.0 2.1.0
[INFO] com.fasterxml.jackson.core:jackson-annotations 2.1.0 2.1.0
[INFO] com.fasterxml.jackson.core:jackson-core 2.1.0 2.1.0
[INFO] javax.inject:javax.inject 1 1
[INFO] cglib:cglib-nodep 2.2.2 2.2.2
[INFO] com.googlecode.flyway:flyway-core 1.7 1.7
[INFO] joda-time:joda-time 2.1 2.1
[INFO] com.google.guava:guava 13.0.1 13.0.1
[INFO] org.hibernate:hibernate-validator 4.3.0.Final 4.3.0.Final
[INFO] javax.validation:validation-api 1.0.0.GA 1.0.0.GA
[INFO] org.jsoup:jsoup 1.7.1 1.7.1
[INFO] org.apache.httpcomponents:httpclient 4.2.2 4.2.2
[INFO] org.apache.httpcomponents:httpcore 4.2.2 4.2.2
[INFO] commons-codec:commons-codec 1.6 1.6
[INFO] commons-io:commons-io 2.4 2.4
[INFO] commons-fileupload:commons-fileupload 1.2.2 1.2.2
[INFO] org.slf4j:slf4j-log4j12 1.7.2 1.7.2
[INFO] org.slf4j:slf4j-api 1.7.2 1.7.2
[INFO] log4j:log4j 1.2.17 1.2.17
[INFO] org.slf4j:jcl-over-slf4j 1.7.2 1.7.2
[INFO] org.slf4j:slf4j-api 1.7.2 1.7.2
[INFO] org.slf4j:slf4j-api 1.7.2 1.7.2
[INFO] org.apache.velocity:velocity 1.7 1.7
[INFO] commons-collections:commons-collections 3.2.1 3.2.1
[INFO] org.hibernate.common:hibernate-commons-annotations 4.0.1.Final 4.0.1.Final
[INFO] org.hibernate:hibernate-entitymanager 4.1.8.Final 4.1.8.Final
[INFO] org.jboss.logging:jboss-logging 3.1.0.GA 3.1.0.GA
[INFO] org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec 1.0.0.Final 1.0.0.Final
[INFO] dom4j:dom4j 1.6.1 1.6.1
[INFO] org.hibernate:hibernate-core 4.1.8.Final 4.1.8.Final
[INFO] antlr:antlr 2.7.7 2.7.7
[INFO] org.jboss.logging:jboss-logging 3.1.0.GA 3.1.0.GA
[INFO] org.jboss.logging:jboss-logging 3.1.0.GA 3.1.0.GA
[INFO] org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec 1.0.0.Final 1.0.0.Final
[INFO] org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec 1.0.0.Final 1.0.0.Final
[INFO] dom4j:dom4j 1.6.1 1.6.1
[INFO] dom4j:dom4j 1.6.1 1.6.1
[INFO] org.hibernate.javax.persistence:hibernate-jpa-2.0-api 1.0.1.Final 1.0.1.Final
[INFO] org.javassist:javassist 3.15.0-GA 3.15.0-GA
[INFO] org.hibernate.common:hibernate-commons-annotations 4.0.1.Final 4.0.1.Final
[INFO] org.hibernate.common:hibernate-commons-annotations 4.0.1.Final 4.0.1.Final
[INFO] org.hibernate.javax.persistence:hibernate-jpa-2.0-api 1.0.1.Final 1.0.1.Final
[INFO] org.hibernate.javax.persistence:hibernate-jpa-2.0-api 1.0.1.Final 1.0.1.Final
[INFO] org.javassist:javassist 3.15.0-GA 3.15.0-GA
[INFO] org.javassist:javassist 3.15.0-GA 3.15.0-GA
[INFO] org.hibernate.common:hibernate-commons-annotations 4.0.1.Final 4.0.1.Final
[INFO] org.hibernate.common:hibernate-commons-annotations 4.0.1.Final 4.0.1.Final
[INFO] org.hibernate.common:hibernate-commons-annotations 4.0.1.Final 4.0.1.Final
[INFO] org.aspectj:aspectjweaver 1.7.1 1.7.1
[INFO] org.aspectj:aspectjrt 1.7.1 1.7.1
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-aop 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] aopalliance:aopalliance 1.0 1.0
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-expression 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-test 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-oxm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] commons-lang:commons-lang 2.5 2.5
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-webmvc 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-asm 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context-support 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-beans 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-context 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-core 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-expression 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-expression 3.1.3.RELEASE 3.1.3.RELEASE
[INFO] org.springframework:spring-web 3.1.3.RELEASE 3.1.3.RELEASE

最佳答案

这是一个已知错误:http://jira.codehaus.org/browse/MENFORCER-135

将在版本 1.2 中修复,当前版本是您正在使用的 1.1.1。

您只需要等待该版本即可:-(

关于maven - 如何配置maven依赖收敛插件的输出级别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13293556/

相关文章:

Java EE : NoClassDefFoundError org. joda.time.DateTime 与 IntelliJ 和 Maven

java - 无法在 Maven Surefire 中运行多次执行?

java - 为什么 maven 执行器插件在 maven 版本 3.6.1 时失败,但在 3.6.2 时通过?

hadoop - Oozie 3.3.0构建错误

maven - 在 Maven 项目中查找包含类文件的 jar

jakarta-ee - 使用 Maven 的 dev 和 prod 的不同配置文件

java - Spring Bundlor 类似物

java - m2Eclips插件: Resolve Workspace Artifacts - is it a good practice

java - 如何使用 Maven 构建两个 EAR,一个打包模块,另一个解包?

maven - 插件 org.apache.maven.plugins :maven-clean-plugin:2. 5 或其依赖项之一无法解析