Grails application with Clover fails with java.lang.VerifyError

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Your application is using the Clover-for-Grails plugin. Compilation fails with the java.lang.VerifyError exception.

例:

$ grails test-app -clover.on 

...
build	Clover: Clover is enabled. Configuration: [on:true, debug:[:], verbose:[:]]
...
build	| Error Exception occurred trigger event [SetClasspath]: java.lang.VerifyError: (class: com/atlassian/clover/ant/tasks/AbstractCloverTask, method: init signature: ()V) Incompatible argument to function (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)

 

原因

Your application is using some Grails plugin, which has a dependency on the Clover plugin and this dependency is being exported outside the plugin. As a consequence this Clover plugin becomes available to your application as well. At the same time you have a Clover dependency defined in your application's BuildConfig too. In case when these two dependencies refer to different Clover versions, it may lead to conflicts.

myApp -> somePlugin -> clover version A
      -> clover version B

ソリューション

1) If you own the plugin which has an invalid dependency, fix it's BuildConfig.groovy and add "export = false" in the Clover dependency. See Creating Grails plugins using Clover for details.

 

2) If you don't own the plugin, then exclude the transitive dependency to Clover in your application's BuildConfig.groovy. For example:

 

myApplication/grails-app/conf/BuildConfig.groovy
grails.project.dependency.resolution = {
  plugins { 
    compile(":somePluginWithInvalidDependency:1.0.0") {
      excludes "clover"  // exclude clover in wrong version
    }
    compile(":clover:3.2.0")    // use the desired version
  }
}

 

 

 

 

 

最終更新日: 2013 年 10 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.