Run a maven test-jar file for GroovyTestCase (junit) -
Run a maven test-jar file for GroovyTestCase (junit) -
i have maven project contains 30 groovytestcase 'junit' test classes. able generate test-jar file contains test classes, using http://maven.apache.org/guides/mini/guide-attached-tests.html . however, every time seek run jar file using next command:
java -cp target/groovy-tests-1.0-snapshot-tests.jar com.mycompany.testclass
i next error:
exception in thread "main" java.lang.noclassdeffounderror: groovy/lang/groovyobject @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclasscond(classloader.java:631) @ java.lang.classloader.defineclass(classloader.java:615) @ java.security.secureclassloader.defineclass(secureclassloader.java:141) @ java.net.urlclassloader.defineclass(urlclassloader.java:283) @ java.net.urlclassloader.access$000(urlclassloader.java:58) @ java.net.urlclassloader$1.run(urlclassloader.java:197) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:247) caused by: java.lang.classnotfoundexception: groovy.lang.groovyobject @ java.net.urlclassloader$1.run(urlclassloader.java:202) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:247) ... 12 more
i have been struggling find way generate jar file can run tests without maven project.
please allow me know if there way generate jar file...
maven junit jar pom.xml noclassdeffounderror
Comments
Post a Comment