Complemento Hudson Nant = propiedad $ WORKSPACE que contiene espacios

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:

  1. Add Build Step NANT
  2. Set my nant file path (D:\build\myproject.build)
  3. Click on Advanced and set the following parameters:
solutionPath="${WORKSPACE}"
buildFlavor=Release
buildPlatform=Any CPU
  1. 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

Gracias chicos

preguntado el 27 de agosto de 11 a las 20:08

2 Respuestas

I have no experience with Hudson configuration but why don't you try one of these:

solutionPath="'${WORKSPACE}'"

or

solutionPath=""${WORKSPACE}""

Respondido 28 ago 11, 03:08

I tried the second option and didn't work. Hudson calls are thru Windows Batch Script. - Kat Lim Ruiz

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.

Respondido el 23 de Septiembre de 11 a las 18:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.