Hudson Nant Plugin = $ WORKSPACE property containing spaces

I'm trying to use Hudson and trying to run my Nant script, which gets the path to the solution folder (for my .net 1.1 project), and it continues to fail due to spaces in the path.

So my call is:

  • Add Build Step NANT
  • Set my path to the nant file (D: \ build \ myproject.build)
  • Click "Advanced" and set the following options:
solutionPath="${WORKSPACE}" buildFlavor=Release buildPlatform=Any CPU 
  • When I run the assembly, the following error appears:

Executing command: [cmd.exe, / C, "NAnt.exe -buildfile: D: \ build \ myproject.build" -D: buildPlatform = any processor "-D: buildFlavor = Release -D: solutionPath = $ {WORKSPACE} && & & Exit %% ERRORLEVEL %% "] [workspace] $ cmd.exe / C '" NAnt.exe -buildfile: D: \ build \ myproject.build "-D: buildPlatform = any processor" -D: buildFlavor = Release -D: solutionPath = $ {WORKSPACE} && & & Exit %% ERRORLEVEL %% "

Target 'Files \ Hudson \ jobs \ myproject \ workspace' in this project does not exist.

This means that since my path contains spaces, the call is not sent correctly.

My polls:

  • solutionPath = "$ WORKSPACE"
  • Setting up a Path solution in the middle, bottom, or top is always the same
  • I tried to set a half-hour at the end of the parameter and somehow worked, but obviously, when the nant script started, the half-time made everything fail. And I really don't want to go that route.
  • basedir is the same

How can i fix this? I tried for almost 3 hours and nothing. I refuse Hudson! which is much better than the TFS 2008 console, but I already worked there, so the transition to Hudson seems more distant than ever.

UPDATE: Forgot to add. I got it working using the Windows Batch step, but I would rather do it through the Nant plugin

Thanks guys,

+4
source share
2 answers

In the end, I just used the Windows Batch Script step. I had to put the NANT folder in PATH and always run Script as:

nant.exe -buildfile: xxx.build

I did not have time for further study, and I do not think that this should be a big problem.

0
source

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

 solutionPath="'${WORKSPACE}'" 

or

 solutionPath=""${WORKSPACE}"" 
0
source

Source: https://habr.com/ru/post/1369319/


All Articles