Grails
  1. Grails
  2. GRAILS-8781

create-* scripts fail when trying to create unit tests

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 7 x64

      Description

      See the discussion here: http://grails.1312388.n4.nabble.com/Grails-2-0-1-create-service-command-results-in-error-tp4391153p4391702.html

      Here's the error:

      | Loading Grails 2.0.1
      | Configuring classpath
      | Configuring classpath.
      | Environment set to development
      | Environment set to development.
      | Environment set to development..
      | Environment set to development...
      | Environment set to development....
      | Environment set to development.....
      | Created file grails-app/services/com/mycompany/mypackage/MyClassService.groovy
      | Error Error executing script CreateService: java.io.FileNotFoundException: /Users/deandelponte/grails/grails-2.0.1/grails-resources/src/grails/templates/artifacts/UnitTest.groovy (No such file or directory) (Use --stacktrace to see the full trace)
      

      Notice the grails-resources directory in there, if you remove that then the directory path is valid. I'm on Windows and running into this issue, but the first person to report it looks like they were on Mac/Linux of some kind.

        Activity

        Hide
        John Cartwright added a comment -

        I can reproduce the problem on Mac 10.6.8/Grails 2.0.1. It seems to be related to the spock plugin. Works fine prior to installation of plugin; fails immediately after installation of plugin. Creating a new project w/o the spock plugin allows the test to be created.

        Removing the .grails/2.0.1/projects/<project> directory fixes the problem but only until the dependencies are refreshed.

        Show
        John Cartwright added a comment - I can reproduce the problem on Mac 10.6.8/Grails 2.0.1. It seems to be related to the spock plugin. Works fine prior to installation of plugin; fails immediately after installation of plugin. Creating a new project w/o the spock plugin allows the test to be created. Removing the .grails/2.0.1/projects/<project> directory fixes the problem but only until the dependencies are refreshed.
        Hide
        Brian Saville added a comment -

        According to Luke Daley, this is fixed in the latest snapshot of the spock plugin.

        Show
        Brian Saville added a comment - According to Luke Daley, this is fixed in the latest snapshot of the spock plugin.
        Hide
        Jeff Scott Brown added a comment -

        I cannot reproduce this with the latest 0.6 snapshot of the spock plugin.

        Brian, Can you confirm that you see the same?

        Show
        Jeff Scott Brown added a comment - I cannot reproduce this with the latest 0.6 snapshot of the spock plugin. Brian, Can you confirm that you see the same?
        Hide
        Jaroslav Kostal added a comment -

        I can confirm that with the latest spock-0.6-SNAPSHOT (2012-02-28) problem is solved.
        However I had to manually delete old spock-0.6-SNAPSHOT.zip (2012-02-12) from ivy cache...

        Show
        Jaroslav Kostal added a comment - I can confirm that with the latest spock-0.6-SNAPSHOT (2012-02-28) problem is solved. However I had to manually delete old spock-0.6-SNAPSHOT.zip (2012-02-12) from ivy cache...
        Hide
        Graeme Rocher added a comment -

        closing, as the issue was in the spock plugin

        Show
        Graeme Rocher added a comment - closing, as the issue was in the spock plugin

          People

          • Assignee:
            Jeff Scott Brown
            Reporter:
            Brian Saville
          • Votes:
            9 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development