NoClassDefFound具有gradle自定义插件用法的ShortTypeHandling

时间:2014-07-15 11:03:17

标签: groovy gradle

  1. 我写了一些groovy代码,使用compile localGroovy()编译并将jar发布到artifactory。
  2. 现在我写了一个gradle插件,我有compile localGroovy()compile "gav of jar above"
  3. 我构建我的插件并发布到相同的神器。
  4. 现在, 要使用上面的自定义插件,我有

    buildscript {
        dependencies {
            classpath localGroovy()
            classpath "gav of plugin", transitive: true
        }
    }
    

    如你所见,我到处都使用相同的localGroovy()。我的gradle版本也一样。现在有了上面的内容,我得到以下错误:

    Caused by: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling
        at com.oracle.emdi.tools.lrgmanager.LrgManager.<clinit>(LrgManager.groovy:44)
        at com.oracle.emdi.gradle.testinfra.tasks.PrintLrg.class$(PrintLrg.groovy)
        at com.oracle.emdi.gradle.testinfra.tasks.PrintLrg.$get$$class$com$oracle$emdi$tools$lrgmanager$LrgManager(PrintLrg.groovy)
        at com.oracle.emdi.gradle.testinfra.tasks.PrintLrg.print(PrintLrg.groovy:38)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    

    当我在this pagehere中阅读时,问题与groovy / gradle版本不匹配有关。但这不是这种情况

0 个答案:

没有答案