Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18034

Gradle plugin does not handle spaces in Jenkins install location

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • artifactory-plugin
    • None
    • Windows 7

      I have Jenkins installed in Tomcat which is installed in C:\Program Files (x86). Gradle execution fails due to space in the path for temp directory:

      [Gradle] - Launching build.
      [My Project] $ cmd.exe /C '"C:\.jenkins\tools\hudson.plugins.gradle.GradleInstallation\Gradle-1.6\bin\gradle.bat --init-script C:/Program Files (x86)/Apache Software Foundation/Tomcat 7.0/temp/init-artifactory6084622070616493781gradle assemble artifactoryPublish && exit %%ERRORLEVEL%%"'

      FAILURE: Build failed with an exception.

      • What went wrong:
        Could not read initialization script 'C:\Program' as it does not exist.

          [JENKINS-18034] Gradle plugin does not handle spaces in Jenkins install location

          Dale King added a comment -

          Actually, now that I look at it is probably the artifactory plugin at fault.

          Dale King added a comment - Actually, now that I look at it is probably the artifactory plugin at fault.

          Daniel Beck added a comment - Artifactory plugin assumes there are no spaces in the temp dir: https://github.com/jenkinsci/artifactory-plugin/blob/master/src/main/java/org/jfrog/hudson/gradle/ArtifactoryGradleConfigurator.java#L398 http://javadoc.jenkins-ci.org/hudson/FilePath.html#createTextTempFile%28java.lang.String,%20java.lang.String,%20java.lang.String,%20boolean%29 Workaround: provide a different java.io.tmpdir .

            eyalbe Eyal Ben Moshe
            dalewking Dale King
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: