Hudson Nant 插件 = $WORKSPACE 属性包含空格
我正在尝试 Hudson 并尝试运行接收解决方案文件夹路径(对于我的 .net 1.1 项目)的 Nant 脚本,但由于路径中包含空格,它一直失败。
所以我的电话是:
- 添加构建步骤 NANT
- 设置我的 nant 文件路径 (D:\build\myproject.build)
- 单击“高级”并设置以下参数:
solutionPath="${WORKSPACE}" buildFlavor=发布 buildPlatform=任何CPU
- 当我运行构建时,出现以下错误:
执行命令:[cmd.exe, /C, "NAnt.exe -buildfile:D:\build\myproject.build "-D:buildPlatform=Any CPU" -D:buildFlavor=发布 -D:solutionPath=${WORKSPACE} &&出口 %%ERRORLEVEL%%"] [工作空间] $ cmd.exe /C '"NAnt.exe -buildfile:D:\build\myproject.build "-D:buildPlatform=Any CPU" -D:buildFlavor=发布 -D:solutionPath=${WORKSPACE} &&出口 %%错误级别%%"'
目标“Files\Hudson\jobs\myproject\workspace”在此不存在 项目。
这意味着因为我的路径包含空格,所以调用发送不正确。
我的尝试:
- solutionPath =“$ WORKSPACE”
- 在中间、底部或顶部设置solutionPath,始终相同
- 我尝试在参数末尾设置分号并以某种方式起作用,但显然当nant脚本运行时,半-冒号让这一切都失败了。而我真的不想走这条路。
- basedir 是相同的
我该如何解决这个问题?我已经尝试了将近3个小时,但没有任何结果。我要放弃哈德森了!这比 TFS 2008 控制台好得多,但我已经在那里工作了,所以搬到 Hudson 似乎比以往任何时候都更加遥远。
更新:忘记添加。我使用 Windows Batch 步骤让它工作,但我更喜欢通过 Nant 插件来完成,
谢谢大家
I'm trying out Hudson and tried to run my Nant script that receives the solution folder path (for my .net 1.1 project) and it keeps failing because of the spaces contained in the path.
So my call is:
- Add Build Step NANT
- Set my nant file path (D:\build\myproject.build)
- Click on Advanced and set the following parameters:
solutionPath="${WORKSPACE}" buildFlavor=Release buildPlatform=Any CPU
- When I run the build, then the following error shows up:
Executing command: [cmd.exe, /C, "NAnt.exe
-buildfile:D:\build\myproject.build "-D:buildPlatform=Any CPU"
-D:buildFlavor=Release -D:solutionPath=${WORKSPACE} && exit
%%ERRORLEVEL%%"] [workspace] $ cmd.exe /C '"NAnt.exe
-buildfile:D:\build\myproject.build "-D:buildPlatform=Any CPU"
-D:buildFlavor=Release -D:solutionPath=${WORKSPACE} && exit
%%ERRORLEVEL%%"'Target 'Files\Hudson\jobs\myproject\workspace' does not exist in this
project.
Which means that because my path contains spaces, the call is sent incorrectly.
My tryouts:
- solutionPath="$WORKSPACE"
- Setting solutionPath in the middle, or bottom, or top, always the same
- I tried setting a semi-colon at the end of the parameter and somehow worked but obviously when the nant script ran, the semi-colon made it all fail. And I really don't want to go this way.
- basedir is the same
How can I fix this? I've tried for almost 3 hours and nothing. I'm giving up on Hudson! which is way better than TFS 2008 console but I got working there already so moving to Hudson seems more distant than ever.
UPDATE: Forgot to add. I got it working using Windows Batch step, but I would prefer to do it thru the Nant plugin
Thanks guys
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我没有 Hudson 配置经验,但你为什么不尝试以下之一:
或者
I have no experience with Hudson configuration but why don't you try one of these:
or
最后,我只是使用Windows Batch Script步骤。我必须将 NANT 文件夹放入 PATH 中,并始终运行脚本:
nant.exe -buildfile:xxx.build
我没有时间进一步调查,也不认为这应该是一个大问题。
In the end, I just used Windows Batch Script step. I had to put the NANT folder in the PATH and always run the script as:
nant.exe -buildfile:xxx.build
I didn't have the time to investigate further nor I think this should be a big issue.