gleclaire / codenarc-maven-plugin

Maven Mojo Plug-In to generate reports based on the CodeNarc Analyzer
https://gleclaire.github.io/codenarc-maven-plugin/
Apache License 2.0
7 stars 17 forks source link

Can't use rulesets/size.xml #17

Open AlexanderZobkov opened 7 years ago

AlexanderZobkov commented 7 years ago

Impossible to use rulesets/size.xml as classpath does not include gmetrics library.

     [java] ERROR: org/gmetrics/metric/Metric
     [java] java.lang.NoClassDefFoundError: org/gmetrics/metric/Metric
     [java]     at java.lang.Class.getDeclaredMethods0(Native Method)
     [java]     at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
     [java]     at java.lang.Class.getDeclaredMethods(Class.java:1855)
     [java]     at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
     [java]     at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
     [java]     at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
     [java]     at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
     [java]     at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
     [java]     at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:342)
     [java]     at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:292)
     [java]     at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2994)
     [java]     at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:176)
     [java]     at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:192)
     [java]     at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:255)
     [java]     at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:806)
     [java]     at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.initMetaClass(ScriptBytecodeAdapter.java:774)
     [java]     at org.codenarc.rule.size.AbcMetricAstVisitor.$getStaticMetaClass(AbcMetricRule.groovy)
     [java]     at org.codenarc.rule.size.AbstractMethodMetricAstVisitor.<init>(AbstractMethodMetricAstVisitor.groovy:44)
     [java]     at org.codenarc.rule.size.AbcMetricAstVisitor.<init>(AbcMetricRule.groovy)
     [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     [java]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.