I have a simple test.xml file committed to a repository:
<?xml version="1.0"?> <project name="test" default="" basedir="."> <target name="test-arg-with-comma"> <echo>Ant arg received: ${arg.with.comma} </echo> </target> </project>
I configured an Ant task in a Bamboo plan this way:
- Build file: test.xml
- Target: test-arg-with-comma -Darg.with.comma=\"arg1 with comma, arg2 with comma\"
- The build is successful, but this is the log output relevant to the Ant task:
13-Jun-2012 18:05:51 Starting task 'My Ant Task' of type 'com.atlassian.bamboo.plugins.ant:task.builder.ant' 13-Jun-2012 18:05:51 Beginning to execute external process for build 'My Project - Ant Test Plan - Default Job' ... running command line: C:\Atlassian\apache-ant-1.8.3\bin\ant.bat -Djava.io.tmpdir=C:\Windows\Temp\MPR-ATP-JOB1 -f test.xml test-arg-with-comma -Darg.with.comma=\"arg1 with comma, arg2 with comma\" ... in: C:\Atlassian\atlassian-bamboo-4.0.1\Bamboo\bamboo_home\xml-data\build-dir\MPR-ATP-JOB1 ... using extra environment variables: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23 ANT_HOME=C:\Atlassian\apache-ant-1.8.3 Path=C:\Program Files\Java\jdk1.6.0_23\bin;C:\Program Files\Java\jdk1.6.0_23\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;c:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave Systems Corp\Gemalto\Access Client\v5\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files\Roxio\OEM\AudioCore\;C:\Program Files\Windows Live\Shared;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Subversion\bin;C:\Program Files\Perforce;C:\Perforce;C:\Atlassian\atlassian-plugin-sdk-3.9.2\bin;C:\Program Files\Mercurial\;C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin;C:\Perforce\p4;C:\Program Files\cvsnt;C:\Program Files\Git\bin;C:\Program Files\Java\jdk1.6.0_23\bin;C:\Program Files\Apache Software Foundation\apache-maven-3.0.4\bin;C:\Atlassian\apache-ant-1.8.3\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\CVSNT\;C:\Perforce\Server 13-Jun-2012 18:05:51 Buildfile: C:\Atlassian\atlassian-bamboo-4.0.1\Bamboo\bamboo_home\xml-data\build-dir\MPR-ATP-JOB1\test.xml 13-Jun-2012 18:05:51 13-Jun-2012 18:05:51 test-arg-with-comma: 13-Jun-2012 18:05:51 [echo] Ant arg received: "arg1 with comma arg2 with comma" 13-Jun-2012 18:05:51 13-Jun-2012 18:05:51 BUILD SUCCESSFUL 13-Jun-2012 18:05:51 Total time: 0 seconds 13-Jun-2012 18:05:51 Finished task 'My Ant Task'
As can be seen, first it recognizes the comma:
-Darg.with.comma=\"arg1 with comma, arg2 with comma\"
But later on, it's not recognized:
13-Jun-2012 18:05:51 [echo] Ant arg received: "arg1 with comma arg2 with comma"
This works if I try on Linux.
- duplicates
-
BAM-13608 "Options" input box for MSBuild Task of Bamboo cannot handle parameters with multiple values which contain space symbol
- Closed
- relates to
-
BAM-10740 Bamboo does not respect the quotes (") in the command line arguments on windows ( at least for the ANT task)
- Gathering Impact
-
BDEV-3243 Loading...
- is cloned from
-
BDEV-3244 Loading...
(1 mentioned in)