Details
-
Bug
-
Status: Resolved (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
Hudson Master running on Ubuntu Lucid
Hudson Slave running on Windows Server 2003 x64, controlled by Hudson Windows Slave Service
Description
I have a Hudson job where the build needs to be parametrized. One of the required parameters for the build is the version of an artifact from another build. For this, I use "Build selector for Copy Artifact" as one of the user parameters for a build. The problem is that this causes an un-escaped xml tag to be passed in as an environment variable to an Ant build task.
For example, we have a Copy Artifact parameter by the name "build_selector". The ant target is "test". The ant build task then executes the following: cmd.exe /C '"ant.bat -file build.xml -Dbuild_selector=<StatusBuildSelector/> test && exit %%ERRORLEVEL%%"'. This results in an error message "The system cannot find the file specified.". This is occurring on my Hudson slave running Windows Server 2003 x64. Please let me know if I can provide any additional information in getting this issue resolved. Thank you.
Attachments
Issue Links
- is related to
-
JENKINS-7442 Ant build steps with properties including variables are broken
-
- Resolved
-
-
JENKINS-7657 Ant properties escaping breaks url parameter for jsunit build
-
- Resolved
-
-
JENKINS-7204 Ant properties are quoted incorrectly on Windows
-
- Closed
-
Hello mindless, the escaping issue seems to be taken care of on my Windows machine. I ran a test job with a parameter test_param. Here is the output:
Started by user anonymous
[ant_files] $ cmd.exe /C '"ant.bat -file build.xml "-Dtest_param=test^<to see if redirecting is ^>escaped" test && exit %%ERRORLEVEL%%"'
Buildfile: build.xml
test:
[echo] hello, world
[echo] test^<to see if redirecting is ^>escaped
BUILD SUCCESSFUL
Total time: 0 seconds
Finished: SUCCESS
It looks good, except do you know why these carets are showing up? Thanks!