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
Gradle may not be able to handle UNC paths, not sure on that one. What you could do, since you are using Win2008 is use a sym link
mklink /D c:\jenkins_home \\UNCPath\BuildTools
Then set %JENKINS_HOME% = c:\jenkins_home
cmd.exe doesn't support UNC paths. You have to use PowerShell instead.
Map a drive won't work. %JENKINS_HOME% doesn't like a mapped drive letter. However, I just found this link to do registry change and the check for UNC is eliminated.
http://support.microsoft.com/kb/156276
Now I have an URI problem:
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)
Why don't you map a drive letter?
net use X: \UNCPath\BuildTools
x:\script.bat
net use X: /d
精彩评论