Hi Ralf/Dermagg? There are unfortunately a few different issues all around quoting (that effect different platforms differently) and to my knowledge there is not a good cross platform way to escape quotes.
https://issues.jenkins-ci.org/browse/JENKINS-20808 https://issues.jenkins-ci.org/browse/JENKINS-16211 https://issues.jenkins-ci.org/browse/JENKINS-15074 https://issues.jenkins-ci.org/browse/JENKINS-11779 https://issues.jenkins-ci.org/browse/JENKINS-10984 https://issues.jenkins-ci.org/browse/JENKINS-10440 Depending on your needs – I may guess that a generic solution to https://issues.jenkins-ci.org/browse/JENKINS-10692 would provide you with a working option – but so far as I can tell attempts to fix the errors have just moved the error somewhere else. The other issue with quoting is you may well be calling a batch file (in this case ant.bat) who may then blindly attempt to quote arguments in order to be safe – which then breaks as things are already correctly quoted ☹ /James From: [email protected] [mailto:[email protected]] On Behalf Of Dermagg B. Magnusson Sent: 31 March 2014 14:14 To: [email protected] Subject: Quoting of parameters: Gerrit Event Stream => Build Parameter => ANT Call Hello, hope someone can give some hints to the following problem: I have Jenkins Gerrit Trigger Plugin setup to listen to the Gerrit Event Stream. Jenkins: Jenkins ver. 1.509.4 Gerrit Trigger: 2.11.1 Running on Windows Server 2008 R2, 64 Bit Some parameter include the mail address of the commiting user. This address, in the build parameters looks like this: GERRIT_CHANGE_OWNER: \"Lastname, Firstname\" <[email protected]<mailto:[email protected]>> So when it comes to call ANT it look like this: $ cmd.exe /C '""c:\Program Files\Apache\apache-ant-1.9.2\bin\ant.bat" ... "-DGERRIT_PATCHSET_UPLOADER=\""Lastname, Firstname\"" <[email protected]<mailto:[email protected]>>" ... "' Here the relevant part (extra "" have been added): " -DGERRIT_PATCHSET_UPLOADER= \" " Lastname, Firstname \" " <[email protected]<mailto:[email protected]>> " Outcome: quoting is broken, lastname (in bold letters) becomes the first non-paramter string in the ANT call and by this gets interpreted as build target. So, would be great to get some answers/ideas! Kind Regards, Ralph -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
