[ 
http://jira.codehaus.org/browse/MCHECKSTYLE-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=131025#action_131025
 ] 

Dennis Lundberg commented on MCHECKSTYLE-90:
--------------------------------------------

Here is the relevant part of the dependency resolution when running 'mvn 
checkstyle:checkstyle -X'

[DEBUG] Adding managed dependencies for org.apache.maven:maven-model
[DEBUG]   org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.4
[DEBUG]   org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5
[DEBUG]   org.apache.maven.wagon:wagon-ssh:jar:1.0-alpha-5
[DEBUG]   org.apache.maven.wagon:wagon-file:jar:1.0-alpha-5
[DEBUG]   org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-alpha-5
[DEBUG]   org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.11 for project: 
null:plexus-utils:jar:1.4.4 from the repository.
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer 
found: 1.4.4)
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.4.4:runtime (selected for 
runtime)
[DEBUG]   org.codehaus.plexus:plexus-velocity:jar:1.1.2:runtime (selected for 
runtime)
[DEBUG] Retrieving parent-POM: plexus:plexus-containers::1.0.2 for project: 
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-7 from the 
repository.
[DEBUG] Retrieving parent-POM: plexus:plexus-root::1.0.3 for project: 
plexus:plexus-containers:pom:1.0.2 from the repository.
[DEBUG]     
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-7:runtime (removed - 
nearer found: 1.0-alpha-9)
[DEBUG]     commons-collections:commons-collections:jar:2.0:runtime (selected 
for runtime)              *<<<<<< plexus-velocity:1.1.2 wants 
commons-collections:2.0*
[DEBUG]     commons-logging:commons-logging-api:jar:1.0.4:runtime (selected for 
runtime)
[DEBUG]     velocity:velocity:jar:1.4:runtime (selected for runtime)
[DEBUG]       velocity:velocity-dep:jar:1.4:runtime (selected for runtime)
[DEBUG]   checkstyle:checkstyle:jar:4.4:runtime (selected for runtime)
[DEBUG]     antlr:antlr:jar:2.7.6:runtime (selected for runtime)
[DEBUG]     commons-beanutils:commons-beanutils-core:jar:1.7.0:runtime 
(selected for runtime)
[DEBUG]       commons-logging:commons-logging:jar:1.0:runtime (selected for 
runtime)
[DEBUG]     commons-cli:commons-cli:jar:1.0:runtime (selected for runtime)
[DEBUG]       commons-lang:commons-lang:jar:1.0:runtime (selected for runtime)
[DEBUG]         junit:junit:jar:3.7:runtime (removed - nearer found: 3.8.1)
[DEBUG]     commons-collections:commons-collections:jar:2.1:runtime (removed - 
nearer found: 2.0)   *<<<<<< checkstyle:4.4 wants commons-collections:2.0*
[DEBUG]     commons-logging:commons-logging:jar:1.0:runtime (removed - nearer 
found: 1.0.3)
[DEBUG]     commons-logging:commons-logging:jar:1.0.3:runtime (selected for 
runtime)

Why on earth does commons-collections 2.0 win here, when 2.1 is newer and 
potentially (as in this case) contains methods not included in 2.1? I suspect 
that this problem is in Maven core somewhere, but I'll see if I can create a 
workaround in this plugin somehow.

> Checkstyle-2.2-SNAPSHOT not working with Maven 2.0.9
> ----------------------------------------------------
>
>                 Key: MCHECKSTYLE-90
>                 URL: http://jira.codehaus.org/browse/MCHECKSTYLE-90
>             Project: Maven 2.x Checkstyle Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Ricky Hazelwood
>         Attachments: checkstyle-bug.zip
>
>
> The changes in Maven 2.0.9 is causing the plugin to use commons-collection 
> 2.0 instead of 2.1 required by checkstyle. Forcing the commons-collection 
> version 2.1 in the plugin config fixes this issue.
> [INFO] [checkstyle:checkstyle]
> [FATAL ERROR] org.apache.maven.plugin.checkstyle.CheckstyleReport#execute() 
> caused a linkage error (java.lang.NoClassDefFoundError) and may be 
> out-of-date. Check the realms:
> [FATAL ERROR] Plugin realm = 
> app0.child-container[org.apache.maven.plugins:maven-checkstyle-plugin]
> urls[0] = 
> file:/D:/maven2/repository/org/apache/maven/plugins/maven-checkstyle-plugin/2.2-SNAPSHOT/maven-checkstyle-plugin-2.2-SNAPSHOT.jar
> urls[1] = 
> file:/D:/maven2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
> urls[2] = 
> file:/D:/maven2/repository/org/apache/maven/reporting/maven-reporting-impl/2.0/maven-reporting-impl-2.0.jar
> urls[3] = 
> file:/D:/maven2/repository/commons-validator/commons-validator/1.1.4/commons-validator-1.1.4.jar
> urls[4] = file:/D:/maven2/repository/oro/oro/2.0.7/oro-2.0.7.jar
> urls[5] = 
> file:/D:/maven2/repository/doxia/doxia-core/1.0-alpha-4/doxia-core-1.0-alpha-4.jar
> urls[6] = 
> file:/D:/maven2/repository/org/codehaus/plexus/plexus-resources/1.0-alpha-4/plexus-resources-1.0-alpha-4.jar
> urls[7] = 
> file:/D:/maven2/repository/org/codehaus/plexus/plexus-velocity/1.1.2/plexus-velocity-1.1.2.jar
> urls[8] = 
> file:/D:/maven2/repository/commons-collections/commons-collections/2.0/commons-collections-2.0.jar
> urls[9] = 
> file:/D:/maven2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar
> urls[10] = file:/D:/maven2/repository/velocity/velocity/1.4/velocity-1.4.jar
> urls[11] = 
> file:/D:/maven2/repository/velocity/velocity-dep/1.4/velocity-dep-1.4.jar
> urls[12] = 
> file:/D:/maven2/repository/checkstyle/checkstyle/4.4/checkstyle-4.4.jar
> urls[13] = file:/D:/maven2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar
> urls[14] = 
> file:/D:/maven2/repository/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar
> urls[15] = 
> file:/D:/maven2/repository/commons-logging/commons-logging/1.0.3/commons-logging-1.0.3.jar
> urls[16] = 
> file:/D:/maven2/repository/checkstyle/checkstyle-optional/4.4/checkstyle-optional-4.4.jar
> [FATAL ERROR] Container realm = plexus.core
> urls[0] = file:/C:/Program Files/Java/maven/lib/maven-2.0.9-uber.jar
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] org/apache/commons/collections/ReferenceMap
> org.apache.commons.collections.ReferenceMap
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NoClassDefFoundError: org/apache/commons/collections/ReferenceMap
>       at 
> com.puppycrawl.tools.checkstyle.checks.duplicates.StrictDuplicateCodeCheck.<init>(StrictDuplicateCodeCheck.java:191)
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>       at java.lang.Class.newInstance0(Class.java:355)
>       at java.lang.Class.newInstance(Class.java:308)
>       at 
> com.puppycrawl.tools.checkstyle.PackageObjectFactory.createObject(PackageObjectFactory.java:110)
>       at 
> com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:87)
>       at 
> com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:149)
>       at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:140)
>       at 
> com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:208)
>       at 
> org.apache.maven.plugin.checkstyle.CheckstyleReport.executeCheckstyle(CheckstyleReport.java:870)
>       at 
> org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:587)
>       at 
> org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
>       at 
> org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:73)
>       at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:931)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:767)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:529)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.commons.collections.ReferenceMap
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>       at 
> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
>       at 
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
>       at 
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
>       at 
> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>       ... 42 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to