0
votes

I updated the version of few dependencies in my project, the build got slow and it waits around 5+ minutes at the enforcer plugin. I tried to compare debug logs of previous builds which used to happen in 3 mins, compared to this which is taking 8+ minutes in total, 5+ minutes as I mentioned are stolen by the enforcer. The only significant difference I see in logs is below. No error or anything else, and also these logs move slow. hence the issue. If anyone knows what it means and how can I go pass-through this it would be of great help

omitForNearer: omitted=commons-codec:commons-codec:jar:1.10:compile kept=commons-codec:commons-codec:jar:1.10:compile

EDIT

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <dependencyConvergence/>
                                <banDuplicatePomDependencyVersions/>
                                <requireJavaVersion>
                                    <version>1.8.0</version>
                                </requireJavaVersion>
                                <requirePluginVersions>
                                    <message>Best Practice is to always define plugin versions!</message>
                                    <banLatest>true</banLatest>
                                    <banRelease>true</banRelease>
                                    <banSnapshots>true</banSnapshots>
                                    <!--                                    <phases>clean,deploy,site</phases>-->
                                </requirePluginVersions>
                                <requireSameVersions/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

EDIT This is all I could get, extracted few lines from the debug log

omitForNearer: omitted=com.mastercard.api:sdk-api-core:jar:1.4.31:compile kept=com.mastercard.api:sdk-api-core:jar:1.4.31:compile 18:55:41,514 [DEBUG] omitForNearer: omitted=log4j:log4j:jar:1.2.14:test kept=log4j:log4j:jar:1.2.14:compile 18:55:41,519 [DEBUG]
omitForNearer: omitted=com.google.guava:guava:jar:26.0-jre:test kept=com.google.guava:guava:jar:26.0-jre:compile 18:55:41,530 [DEBUG] omitForNearer: omitted=org.apache.commons:commons-lang3:jar:3.4:test kept=org.apache.commons:commons-lang3:jar:3.4:compile 18:55:41,550 [DEBUG] omitForNearer: omitted=org.jmockit:jmockit:jar:1.35:test kept=org.jmockit:jmockit:jar:1.35:compile 18:55:41,552 [DEBUG]
omitForNearer: omitted=com.beust:jcommander:jar:1.72:compile kept=com.beust:jcommander:jar:1.72:compile 18:55:41,571 [DEBUG]
omitForNearer: omitted=org.hamcrest:hamcrest-core:jar:1.3:compile kept=org.hamcrest:hamcrest-core:jar:1.3:compile 18:55:41,608 [DEBUG]
omitForNearer: omitted=org.slf4j:slf4j-api:jar:1.6.6:compile kept=org.slf4j:slf4j-api:jar:1.6.6:compile 18:55:41,610 [DEBUG]
omitForNearer: omitted=log4j:log4j:jar:1.2.14:compile kept=log4j:log4j:jar:1.2.14:compile 18:55:41,651 [DEBUG]
omitForNearer: omitted=commons-codec:commons-codec:jar:1.10:compile kept=commons-codec:commons-codec:jar:1.10:compile 18:55:41,741 [DEBUG] omitForNearer: omitted=joda-time:joda-time:jar:2.1:compile kept=joda-time:joda-time:jar:2.1:compile 18:55:41,748 [DEBUG]
omitForNearer: omitted=org.jdom:jdom:jar:1.1.3:compile kept=org.jdom:jdom:jar:1.1.3:compile 18:55:41,756 [DEBUG]
omitForNearer: omitted=xpp3:xpp3:jar:1.1.4c:compile kept=xpp3:xpp3:jar:1.1.4c:compile 18:55:41,759 [DEBUG]
omitForNearer: omitted=org.apache-extras.beanshell:bsh:jar:2.0b6:compile kept=org.apache-extras.beanshell:bsh:jar:2.0b6:compile 18:55:41,790 [DEBUG] omitForNearer: omitted=com.thoughtworks.xstream:xstream:jar:1.4.14:compile kept=com.thoughtworks.xstream:xstream:jar:1.4.14:compile 18:55:41,816 [DEBUG] omitForNearer: omitted=commons-codec:commons-codec:jar:1.10:compile kept=commons-codec:commons-codec:jar:1.10:compile 18:55:41,830 [DEBUG] omitForNearer: omitted=com.google.guava:guava:jar:26.0-jre:compile kept=com.google.guava:guava:jar:26.0-jre:compile 18:55:41,865 [DEBUG] omitForNearer: omitted=org.apache.commons:commons-lang3:jar:3.4:compile kept=org.apache.commons:commons-lang3:jar:3.4:compile 18:55:41,877 [DEBUG] omitForNearer: omitted=org.freemarker:freemarker:jar:2.3.22:compile kept=org.freemarker:freemarker:jar:2.3.22:compile 18:55:41,878 [DEBUG] omitForNearer: omitted=ognl:ognl:jar:3.0.21:compile kept=ognl:ognl:jar:3.0.21:compile 18:55:41,905 [DEBUG]
omitForNearer: omitted=org.hibernate:hibernate-core:jar:3.6.0.Final:compile kept=org.hibernate:hibernate-core:jar:3.6.0.Final:compile 18:55:41,914 [DEBUG] omitForNearer: omitted=org.apache.commons:commons-lang3:jar:3.4:compile kept=org.apache.commons:commons-lang3:jar:3.4:compile 18:55:41,930 [DEBUG] omitForNearer: omitted=org.apache.commons:commons-lang3:jar:3.4:compile kept=org.apache.commons:commons-lang3:jar:3.4:compile 18:55:41,952 [DEBUG] omitForNearer: omitted=org.apache.httpcomponents:httpcore:jar:4.4.11:compile kept=org.apache.httpcomponents:httpcore:jar:4.4.11:compile 18:55:41,964 [DEBUG] omitForNearer: omitted=org.apache.httpcomponents:httpcore:jar:4.4.11:compile kept=org.apache.httpcomponents:httpcore:jar:4.4.11:compile 18:55:41,974 [DEBUG] omitForNearer: omitted=commons-logging:commons-logging:jar:1.2:compile kept=commons-logging:commons-logging:jar:1.2:compile 18:55:42,028
omitForNearer: omitted=org.springframework:spring-core:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-core:jar:4.3.21.RELEASE:compile 18:55:42,063 [DEBUG] omitForNearer: omitted=org.springframework:spring-beans:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-beans:jar:4.3.21.RELEASE:compile 18:55:42,066 [DEBUG] omitForNearer: omitted=org.springframework:spring-core:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-core:jar:4.3.21.RELEASE:compile 18:55:42,069 [DEBUG] omitForNearer: omitted=org.springframework:spring-beans:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-beans:jar:4.3.21.RELEASE:compile 18:55:42,075 [DEBUG] omitForNearer: omitted=org.springframework:spring-aop:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-aop:jar:4.3.21.RELEASE:compile 18:55:42,077 [DEBUG] omitForNearer: omitted=org.springframework:spring-beans:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-beans:jar:4.3.21.RELEASE:compile 18:55:42,079 [DEBUG] omitForNearer: omitted=org.springframework:spring-core:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-core:jar:4.3.21.RELEASE:compile 18:55:42,084 [DEBUG] omitForNearer: omitted=org.springframework:spring-core:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-core:jar:4.3.21.RELEASE:compile 18:55:42,087 [DEBUG] omitForNearer: omitted=org.springframework:spring-core:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-core:jar:4.3.21.RELEASE:compile 18:55:42,094 [DEBUG] omitForNearer: omitted=org.springframework:spring-core:jar:4.3.21.RELEASE:compile kept=org.springframework:spring-core:jar:4.3.21.RELEASE:compile 18:55:42,104 [DEBUG] omitForNearer: omitted=com.fasterxml.jackson.core:jackson-annotations:jar:2.10.1:compile kept=com.fasterxml.jackson.core:jackson-annotations:jar:2.10.1:compile 18:55:42,109 [DEBUG] omitForNearer: omitted=com.google.guava:guava:jar:26.0-jre:compile kept=com.google.guava:guava:jar:26.0-jre:compile 18:55:42,119 [DEBUG] omitForNearer: omitted=org.apache.commons:commons-lang3:jar:3.4:compile kept=org.apache.commons:commons-lang3:jar:3.4:compile 18:55:42,121 [DEBUG]
omitForNearer: omitted=org.apache.httpcomponents:httpcore:jar:4.4.11:compile kept=org.apache.httpcomponents:httpcore:jar:4.4.11:compile [DEBUG]
omitForNearer: omitted=org.hamcrest:hamcrest-core:jar:1.3:compile kept=org.hamcrest:hamcrest-core:jar:1.3:compile 18:55:42,138 [DEBUG]
omitForNearer: omitted=org.hamcrest:hamcrest-library:jar:1.3:compile kept=org.hamcrest:hamcrest-library:jar:1.3:compile 18:55:42,139 [DEBUG] omitForNearer: omitted=commons-io:commons-io:jar:2.6:compile kept=commons-io:commons-io:jar:2.6:compile 18:55:42,141 [DEBUG]
omitForNearer: omitted=commons-collections:commons-collections:jar:3.2.2:compile kept=commons-collections:commons-collections:jar:3.2.2:compile 18:55:42,143 [DEBUG] omitForNearer: omitted=commons-lang:commons-lang:jar:2.6:compile kept=commons-lang:commons-lang:jar:2.6:compile 18:55:42,149 [DEBUG]
omitForNearer: omitted=org.apache.httpcomponents:httpclient:jar:4.5.13:compile kept=org.apache.httpcomponents:httpclient:jar:4.5.13:compile 18:55:42,162 [DEBUG] omitForNearer: omitted=org.apache.httpcomponents:httpclient:jar:4.5.13:compile kept=org.apache.httpcomponents:httpclient:jar:4.5.13:compile 18:55:42,164 [DEBUG] omitForNearer: omitted=commons-codec:commons-codec:jar:1.10:compile kept=commons-codec:commons-codec:jar:1.10:compile 18:55:42,171 [DEBUG] omitForNearer: omitted=com.google.guava:guava:jar:26.0-jre:compile kept=com.google.guava:guava:jar:26.0-jre:compile 18:55:42,190 [DEBUG] omitForNearer: omitted=com.fasterxml.jackson.core:jackson-databind:jar:2.10.1:compile kept=com.fasterxml.jackson.core:jackson-databind:jar:2.10.1:compile 18:55:42,200 [DEBUG] omitForNearer: omitted=org.apache.commons:commons-lang3:jar:3.4:compile kept=org.apache.commons:commons-lang3:jar:3.4:compile 18:55:42,202 [DEBUG] omitForNearer: omitted=log4j:log4j:jar:1.2.14:compile kept=log4j:log4j:jar:1.2.14:compile 18:55:42,204 [DEBUG]
omitForNearer: omitted=com.google.guava:guava:jar:26.0-jre:compile kept=com.google.guava:guava:jar:26.0-jre:compile 18:55:42,208 [DEBUG] omitForNearer: omitted=commons-cli:commons-cli:jar:1.3.1:compile kept=commons-cli:commons-cli:jar:1.3.1:compile 18:55:42,210 [DEBUG]
omitForNearer: omitted=com.google.guava:guava:jar:26.0-jre:compile kept=com.google.guava:guava:jar:26.0-jre:compile

1
Please show full pom file best would be a link to github/gitlab project...khmarbaise
I am not allowed to share the code, else I would have added, I know it is hard to imagine the scenario. I was trying to get some inputs or hints. I can around 800+ times similar line in the log, of course with different grouped. "omitForNearer" "kept", what is it exactly doing?Aadam
Which version of maven-enforcer-plugin do you use? Which Maven version and which JDK version do you use?khmarbaise
Maven 3.6.. enforce tried with both 1.4.1 and 3.* jdk 1.8Aadam
Which rules do you use? Please show at least the enforcer maven plugin configurationkhmarbaise

1 Answers

0
votes

Those who will face this issue can update Maven version, I was using 3.6.1 and issue persist no matter what, updated to Maven 3.6.3 and it is solved now. Thank you all