samedi 28 mars 2015

gradle test raise error: java.lang.NoClassDefFoundError: Could not initialize class groovy.lang.GroovySystem

I try to run "gradle test", and get error


My test is



class HelperTest extends ro.gd.Test {
Plugin o;

void setUp() {
o = new Plugin();
}

void testGetIdeaDeps() {
def r = o.ideaDeps
asrHaveVal r
}
}


when i run gradle test, it raise:



junit.framework.AssertionFailedError: Exception in constructor: testGetIdeaDeps (java.lang.NoClassDefFoundError: Could not initialize class groovy.lang.GroovySystem
at org.codehaus.groovy.reflection.ClassInfo.isValidWeakMetaClass(ClassInfo.java:221)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassForClass(ClassInfo.java:191)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:236)
at ro.gd.idea.HelperTest.$getStaticMetaClass(HelperTest.groovy)
at ro.Test.<init>(Test.groovy)
at ro.gd.Test.<init>(Test.groovy)
at ro.gd.idea.HelperTest.<init>(HelperTest.groovy)
...


Here is my full code


Aucun commentaire:

Enregistrer un commentaire