Hi all,
I'm having trouble getting JUnit 4 test cases written in Groovy to work in Maven. With the attached POM file and Groovy test case file (which I put in "src/test/groovy/GroovyTestTest.groovy"), I get the Maven output shown below. I have attached the test report; it involves a "java.lang.IllegalAccessError: tried to access field org.codehaus.groovy.reflection.CachedClass.EMPTY".
This is with Maven 2.1.0 on Java 5 on MacOS.
Can anyone help?
Thanks!
Cheers,
Alexander.
gauss:groovytestproject koller$ mvn clean test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building groovytestproject
[INFO] task-segment: [clean, test]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /Users/koller/Documents/nb-workspace/groovytestproject/target
[INFO] [resources:resources]
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/koller/Documents/nb-workspace/groovytestproject/src/main/resources
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [groovy:generateTestStubs {execution: default}]
[INFO] Generated 1 Java stub
[INFO] [resources:testResources]
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/koller/Documents/nb-workspace/groovytestproject/src/test/resources
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to /Users/koller/Documents/nb-workspace/groovytestproject/target/test-classes
[INFO] [groovy:testCompile {execution: default}]
[INFO] Compiled 1 Groovy class
[INFO] [surefire:test]
[INFO] Surefire report directory: /Users/koller/Documents/nb-workspace/groovytestproject/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running GroovyTestTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.063 sec <<< FAILURE!
Results :
Tests in error:
test1(GroovyTestTest)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
GroovyTestTest.groovypom.xmlGroovyTestTest.txt