Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.4
-
None
-
Maven 3.2.2; Oracle JDK 8
Description
The dependency convergence rule check works great. I just wonder if it is really necessary to log the according error messages two times:
lines 127 to 134
for ( CharSequence errorMsg : errorMsgs ) { log.warn( errorMsg ); } if ( errorMsgs.size() > 0 ) { throw new EnforcerRuleException( "Failed while enforcing releasability the error(s) are " + errorMsgs ); }
this produces outputs like:
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce dependency convergence) @ bom --- [WARNING] Dependency convergence error for commons-logging:commons-logging:1.1.3 paths to dependency are: +-my.group:my.artifact:2.1-SNAPSHOT +-org.springframework:spring-context:4.0.9.RELEASE +-org.springframework:spring-core:4.0.9.RELEASE +-commons-logging:commons-logging:1.1.3 and +-my.group:my.artifact:2.1-SNAPSHOT +-com.orientechnologies:orientdb-graphdb:2.1-rc1 +-com.tinkerpop.blueprints:blueprints-core:2.6.0 +-commons-logging:commons-logging:1.1.1 [WARNING] Dependency convergence error for org.slf4j:jcl-over-slf4j:1.7.6 paths to dependency are: +-my.group:my.artifact:2.1-SNAPSHOT +-org.activiti:activiti-engine:5.17.0 +-org.activiti:activiti-bpmn-converter:5.17.0 +-org.slf4j:jcl-over-slf4j:1.7.6 and +-my.group:my.artifact:2.1-SNAPSHOT +-org.activiti:activiti-engine:5.17.0 +-org.slf4j:jcl-over-slf4j:1.7.6 and +-my.group:my.artifact:2.1-SNAPSHOT +-org.springframework.ldap:spring-ldap-core:2.0.2.RELEASE +-org.springframework.data:spring-data-commons:1.6.1.RELEASE +-org.slf4j:jcl-over-slf4j:1.7.1 [WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message: Failed while enforcing releasability the error(s) are [ Dependency convergence error for commons-logging:commons-logging:1.1.3 paths to dependency are: +-my.group:my.artifact:2.1-SNAPSHOT +-org.springframework:spring-context:4.0.9.RELEASE +-org.springframework:spring-core:4.0.9.RELEASE +-commons-logging:commons-logging:1.1.3 and +-my.group:my.artifact:2.1-SNAPSHOT +-com.orientechnologies:orientdb-graphdb:2.1-rc1 +-com.tinkerpop.blueprints:blueprints-core:2.6.0 +-commons-logging:commons-logging:1.1.1 , Dependency convergence error for org.slf4j:jcl-over-slf4j:1.7.6 paths to dependency are: +-my.group:my.artifact:2.1-SNAPSHOT +-org.activiti:activiti-engine:5.17.0 +-org.activiti:activiti-bpmn-converter:5.17.0 +-org.slf4j:jcl-over-slf4j:1.7.6 and +-my.group:my.artifact:2.1-SNAPSHOT +-org.activiti:activiti-engine:5.17.0 +-org.slf4j:jcl-over-slf4j:1.7.6 and +-my.group:my.artifact:2.1-SNAPSHOT +-org.springframework.ldap:spring-ldap-core:2.0.2.RELEASE +-org.springframework.data:spring-data-commons:1.6.1.RELEASE +-org.slf4j:jcl-over-slf4j:1.7.1 ]
the warning log messages are identical to the messages of the exception. so just skip one of the outputs if possible.