Jenkins下Gradle和UNC路径的问题
将 %JENKINS_HOME% 从本地目录移动到 UNC 后出现此错误。知道如何解决这个问题吗?我们使用 Windows Server 2008,似乎无法在 Server 2008 下硬链接到 UNC。有人遇到过这个问题吗?
所有构建工具都存储在 \\UNCPath\BuildTools
%JENKINS_HOME% = \\UNCPath\JenkinsHome
下[工作空间] $ cmd.exe /C \\UNCPath\BuildTools\gradle\1.0\bin\gradle.bat clean jar cobertura test groovyDoc &&退出%%错误级别%% '\\UNCPath\JenkinsHome\jobs\Project\workspace' CMD.EXE 以上述路径作为当前目录启动。 不支持 UNC 路径。默认为 Windows 目录。 java.lang.IllegalArgumentException:URI 具有权限组件 在 java.io.File.(File.java:368) 在 org.gradle.api.internal.AbstractClassPathProvider$ClassPathScanner.find(AbstractClassPathProvider.java:146) 在 org.gradle.api.internal.AbstractClassPathProvider.findClassPath(AbstractClassPathProvider.java:80) 在 org.gradle.api.internal.DefaultClassPathRegistry.getClassPathFiles(DefaultClassPathRegistry.java:44) 在 org.gradle.api.internal.DefaultClassPathRegistry.getClassPathUrls(DefaultClassPathRegistry.java:35) 在 org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:38) 在 org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28) 在 org.gradle.launcher.GradleMain.main(GradleMain.java:24) 记录测试结果 发布Javadoc 跳过 Cobertura 覆盖率报告,因为构建不是不稳定或更好...... 完成:失败 块引用
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Gradle 可能无法处理 UNC 路径,对此不确定。你可以做什么,因为你使用的是Win2008,所以使用符号链接
mklink /D c:\jenkins_home \\UNCPath\BuildTools
然后设置 %JENKINS_HOME% = c:\jenkins_home
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 不支持 UNC 路径。您必须改用 PowerShell。
cmd.exe doesn't support UNC paths. You have to use PowerShell instead.
映射驱动器不起作用。 %JENKINS_HOME% 不喜欢映射的驱动器号。但是,我刚刚发现此链接可以进行注册表更改,并且消除了对 UNC 的检查。
http://support.microsoft.com/kb/156276
现在我遇到了 URI 问题:
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:
为什么不映射一个驱动器号?
Why don't you map a drive letter?