【发布时间】:2015-03-02 17:59:51
【问题描述】:
我有 2 个 maven 模块和测试如下:
Module1
`src/test/java/Parent`
Module2
`src/test/java/Test // Test extends Parent`
Module1 对 Module1 有 rumtime 依赖
当我运行 mvn test 时,出现以下错误:
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException;嵌套异常是 java.lang.reflect.InvocationTargetException: null java.lang.reflect.InvocationTargetException 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:606) 在 org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) 在 org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) 在 org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) 在 org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) 在 org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) 引起:java.lang.NoClassDefFoundError: Parent
知道我可能在做什么正确吗? eclipse中编译成功。
【问题讨论】:
标签: maven-3