cmdgradleuncjenkins

Problem with Gradle and UNC path under Jenkins


Got this error after moving %JENKINS_HOME% to a UNC from a local directory. Any idea how to fix this? We use Windows server 2008 and it seems like there is no way to do hard link to a UNC under Server 2008. Has anyone ran into this problem?

All the build tools are stored under \\UNCPath\BuildTools

%JENKINS_HOME% = \\UNCPath\JenkinsHome

[workspace] $ cmd.exe /C \\UNCPath\BuildTools\gradle\1.0\bin\gradle.bat clean jar cobertura test groovyDoc && exit %%ERRORLEVEL%% '\\UNCPath\JenkinsHome\jobs\Project\workspace' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. java.lang.IllegalArgumentException: URI has an authority component at java.io.File.(File.java:368) at org.gradle.api.internal.AbstractClassPathProvider$ClassPathScanner.find(AbstractClassPathProvider.java:146) at org.gradle.api.internal.AbstractClassPathProvider.findClassPath(AbstractClassPathProvider.java:80) at org.gradle.api.internal.DefaultClassPathRegistry.getClassPathFiles(DefaultClassPathRegistry.java:44) at org.gradle.api.internal.DefaultClassPathRegistry.getClassPathUrls(DefaultClassPathRegistry.java:35) at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:38) at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28) at org.gradle.launcher.GradleMain.main(GradleMain.java:24) Recording test results Publishing Javadoc Skipping Cobertura coverage report as build was not UNSTABLE or better ... Finished: FAILURE Blockquote


Solution

  • cmd.exe doesn't support UNC paths. You have to use PowerShell instead.