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
I have no experience with Hudson configuration but why don't you try one of these:
solutionPath="'${WORKSPACE}'"
or
solutionPath=""${WORKSPACE}""
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.
精彩评论