Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2167

FindBugs plugin runs into command line length limit on Windows

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0-milestone-8
    • Fix Version/s: 1.0-rc-1

      Description

      Similar to the mailing list thread at [1]http://gradle.1045684.n5.nabble.com/G... – I'm unable to run the findbugs task on my code due to this error in JDK 1.7:

      [ant:findbugs] java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_02\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long

      Or, with JDK 1.6:

      [ant:findbugs] java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_21\jre\bin\java.exe": CreateProcess error=87, The parameter is incorrect

      I'm using this version of gradle:

      ------------------------------------------------------------
      Gradle 1.0-milestone-8
      ------------------------------------------------------------

      Gradle build time: Monday, February 13, 2012 11:53:32 PM UTC
      Groovy: 1.8.4
      Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
      Ivy: 2.2.0
      JVM: 1.6.0_21 (Sun Microsystems Inc. 17.0-b17)
      OS: Windows 7 6.1 amd64

      When I run gradle with --debug, I can extract the command it runs when it tries to start FindBugs in a new JVM. I've abbreviated it in two places below:

      14:32:46.933 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Execute:Java13CommandLauncher: Executing 'C:\Program Files\Java\jdk1.6.0_21\jre\bin\java.exe' with arguments:
      '-Dfindbugs.debug=true'
      '-Dfindbugs.hostApp=FBAntTask'
      '-classpath'
      'C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\libs\third-party\findbugs-2.0.0.jar;C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\libs\third-party\findbugs-ant-2.0.0.jar'
      'edu.umd.cs.findbugs.FindBugs2'
      '-pluginList'
      ''
      '-sortByClass'
      '-timestampNow'
      '-xml'
      '-auxclasspathFromInput'
      '-sourcepath'
      (abbreviated from 120 files to 2)'C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\bridge\src\com\sri\pal\AbstractActionDef.java;C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\bridge\src\com\sri\pal\ActionDef.java'
      '-outputFile'
      'C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\bridge\build\reports\findbugs\main.xml'
      '-exitcode'
      (abbreviated from 166 files to 2)
      'C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\bridge\build\classes\main\com\sri\pal\AbstractActionDef.class'
      'C:\Users\chris\work\PAL-CPOF-SHELL\current\tasklearning\bridge\build\classes\main\com\sri\pal\ActionDef.class'

      It seems likely that this command line is simply too long for Windows to handle.
      ----------------------------------------------------------------------------------------
      [1] http://gradle.1045684.n5.nabble.com/Groovyc-fork-failing-on-Windows-td3357060.html

        Attachments

          Activity

            People

            Assignee:
            breskeby René Gröschke
            Reporter:
            forums Gradle Forums
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: