Groovy
  1. Groovy
  2. GROOVY-2084

Joint groovy/java compiler doesn't set classpath correctly when path contains spaces in Windows

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1-beta-2
    • Fix Version/s: 1.1-beta-3
    • Component/s: None
    • Labels:
      None

      Description

      If you have a path in your classpath that you provide to <groovyc> that contains spaces such as "C:\Documents And Settings\Blah" this causes the classpath to break and compilation errors occur ( on Windows only )

        Activity

        Graeme Rocher created issue -
        Graeme Rocher made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Blocker [ 1 ]
        Hide
        Graeme Rocher added a comment -

        Adding some debug, the generating classpath options look like this:

         ["-d", "C:\Documents and Settings\Gr
        aeme Rocher\.grails\0.6-RC1\projects\amazon\classes", "-sourcepath", "C:\Documen
        ts and Settings\Graeme Rocher\.grails\0.6-RC1\projects\amazon\generated-java-sou
        rce", "-classpath", "\"C:\Documents", "C:\sandbox\amazon\src\java\Bar.java"]
        

        The classpath has been completely chopped off after the first space

        Show
        Graeme Rocher added a comment - Adding some debug, the generating classpath options look like this: [ "-d" , "C:\Documents and Settings\Gr aeme Rocher\.grails\0.6-RC1\projects\amazon\classes ", " -sourcepath ", " C:\Documen ts and Settings\Graeme Rocher\.grails\0.6-RC1\projects\amazon\generated-java-sou rce ", " -classpath ", " \ "C:\Documents" , "C:\sandbox\amazon\src\java\Bar.java" ] The classpath has been completely chopped off after the first space
        Hide
        Jochen Theodorou added a comment -

        fixed

        Show
        Jochen Theodorou added a comment - fixed
        Jochen Theodorou made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Jochen Theodorou [ blackdrag ]
        Resolution Fixed [ 1 ]
        Hide
        Levi Yourchuck added a comment -

        appears to be broken in groovy 1.5.7

        C:_sources\src - xxxx yyyy>groovy -cp "C:_deployments\xxxx yyyy\temp_build" groovylink.groovy
        Caught: java.io.FileNotFoundException: C:_sources\src - xxxx yyyy\yyyy\temp_build groovylink.groovy (C:_sources\src - xxxx yyyy\yyyy\temp_build groovylink.groovy)

        notice that what I entered for the classpath has a space between the xxxx and the yyyy (the file not found message is mangling the path even more)

        Show
        Levi Yourchuck added a comment - appears to be broken in groovy 1.5.7 C:_sources\src - xxxx yyyy>groovy -cp "C:_deployments\xxxx yyyy\temp_build" groovylink.groovy Caught: java.io.FileNotFoundException: C:_sources\src - xxxx yyyy\yyyy\temp_build groovylink.groovy (C:_sources\src - xxxx yyyy\yyyy\temp_build groovylink.groovy) notice that what I entered for the classpath has a space between the xxxx and the yyyy (the file not found message is mangling the path even more)
        Hide
        Jochen Theodorou added a comment -

        I suggest you open a new issue and request to backport the change.

        Show
        Jochen Theodorou added a comment - I suggest you open a new issue and request to backport the change.
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12731175 ] Default workflow, editable Closed status [ 12743001 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12969294 ] Default workflow, editable Closed status [ 12977021 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        16d 6m 1 Jochen Theodorou 13/Sep/07 07:18

          People

          • Assignee:
            Jochen Theodorou
            Reporter:
            Graeme Rocher
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development