Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1444

Clover-for-Grails does not work in Grails 2.3.5

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Highest
    • 3.2.2
    • 3.2.0
    • Grails Plugin
    • None

    Description

      Using the latest Clover plugin version 3.2.0 with the latest Grails version 2.3.5 leads to the following error when the "test-app" command is invoked:

      | Error Error executing script TestApp: No such property: testTargetPatterns for class: _Events (Use --stacktrace to see the full trace)
      

      Running it with --stacktrace leads to the following output:

      | Error Error executing script TestApp: No such property: testTargetPatterns for class: _Events (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
      groovy.lang.MissingPropertyException: No such property: testTargetPatterns for class: _Events
      	at _Events$_run_closure3.doCall(_Events.groovy:75)
      	at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:102)
      	at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
      	at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
      	at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
      	at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
      	at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
      	at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
      	at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
      	at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
      	at TestApp$_run_closure1.doCall(TestApp.groovy:32)
      	at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
      	at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
      	at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
      	at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
      	at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
      	at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
      	at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
      	at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
      	at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
      	at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
      	at gant.Gant.withBuildListeners(Gant.groovy:427)
      	at gant.Gant.this$2$withBuildListeners(Gant.groovy)
      	at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source)
      	at gant.Gant.dispatch(Gant.groovy:415)
      	at gant.Gant.this$2$dispatch(Gant.groovy)
      	at gant.Gant.invokeMethod(Gant.groovy)
      	at gant.Gant.executeTargets(Gant.groovy:591)
      	at gant.Gant.executeTargets(Gant.groovy:590)
      

      It turns out that the error is in the <clover grails plugin>/scripts/_Events.groovy script at line 75:

      defStoredTestTargetPatterns = testTargetPatterns;
      

      Apparently the "testTargetPattern" global variable was removed in the course of Grails 2.3.3, when some script variables where put into helper classes. See also: http://grails.1312388.n4.nabble.com/Plugin-issue-can-t-find-targetPhasesAndTypes-td4652199.html

      There is currently no related Grails JIRA that I'm aware of. If this issue can't be worked out somehow it would require to create a Grails JIRA to check if the variable could be reintroduced or why it was removed.

      Attachments

        Issue Links

          Activity

            People

              mparfianowicz Marek Parfianowicz
              12051298f52d Benjamin Wolff
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: