[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
vjuranek commented on JENKINS-23617 Cannot use spaces in groovy script parameters @nigel_charman: there are two parameters options, Groovy parameters - parameter for groovy executable and Script parameters - parameters for script. It was implemented only for the first one, Groovy parameters. I've created JENKINS-24757 for allowing spaces also in Script parameters. This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
Daniel Beck commented on JENKINS-23617 Cannot use spaces in groovy script parameters Jira is not a support site. Please ask in #jenkins on Freenode, or on the jenkinsci-users mailing list. This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
nigel_charman commented on JENKINS-23617 Cannot use spaces in groovy script parameters Hi, Using 1.20, I'm unable to get parameters with spaces working. I've tried with double and single quotes around the parameter. Can you advise how to get spaces working? thanks This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
vjuranek resolved JENKINS-23617 as Fixed Cannot use spaces in groovy script parameters Merged into master branch and released in 1.19. Change By: vjuranek (07/Jul/14 6:46 PM) Status: Reopened Resolved Resolution: Fixed This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
vjuranek reopened JENKINS-23617 Cannot use spaces in groovy script parameters ups, not intended to close it... Due to lack of time I didn't tested any other libraries and use proposed commons-exec, however this lib is IMHO far from perfect as it e.g. doesn't handle backslashed spaces (e.g. -cp /path/to/my\ groovy/libs splits into 3 args), but this is not subject of this issue and PR should be sent against used library. @enterit - please test JENKINS-23617 branch if it fixes your usecase, if yes I'll marge it to main branch and release Change By: vjuranek (06/Jul/14 8:42 PM) Resolution: Fixed Status: Resolved Reopened This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
SCM/JIRA link daemon commented on JENKINS-23617 Cannot use spaces in groovy script parameters Code changed in jenkins User: Vojtech Juranek Path: pom.xml src/main/java/hudson/plugins/groovy/Groovy.java http://jenkins-ci.org/commit/groovy-plugin/800175fb90c15f6bd543125ba02e829410667997 Log: [FIXED JENKINS-23617] Improve parsing of paramaters passed to groovy binary Compare: https://github.com/jenkinsci/groovy-plugin/compare/7d7972b3f95c^...800175fb90c1 This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
SCM/JIRA link daemon resolved JENKINS-23617 as Fixed Cannot use spaces in groovy script parameters Change By: SCM/JIRA link daemon (06/Jul/14 8:35 PM) Status: Open Resolved Resolution: Fixed This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
vjuranek commented on JENKINS-23617 Cannot use spaces in groovy script parameters > Why do you think using spaces is a quite rare use case? based on the fact, that I've never heard someone needs it before (well, we have pretty large deployment and use groovy heavily, so I thought that most of the usecases are already covered by complains of my co-workers) > I do not think there is an easy way to parse command line using regexp - it can be error-prone. agree that it could be error-prone. Will look into CommandLine implementation and other possibilities (if I find any) over the weekend. This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
enterit commented on JENKINS-23617 Cannot use spaces in groovy script parameters Why do you think using spaces is a quite rare use case? It may happen quite often, especially if other build params are passed to the script, like job description, text chunks etc. There is any easy workaround if you specify script text. But not if you specify script name to execute. If adding this new dependency is undesirable, we could copy CommandLine.parse(..) implementation. Ideally we should not be parsing command line at all, but hudson.Launcher.ProcStarter does not seem to accept single-string command. I do not think there is an easy way to parse command line using regexp - it can be error-prone. This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
Daniel Beck commented on JENKINS-23617 Cannot use spaces in groovy script parameters Would http://javadoc.jenkins-ci.org/hudson/util/ArgumentListBuilder.html work here? This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
Daniel Beck edited a comment on JENKINS-23617 Cannot use spaces in groovy script parameters (stupid comment) This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
vjuranek commented on JENKINS-23617 Cannot use spaces in groovy script parameters using some groovy executable parameters with spaces seems to me quite rare use case for which using CommandLine seems to me like an overkill. Would some more simple solution like quoting parameter with spaces and using e.g. reg. exp. for parsing solve your problem? This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [groovy] (JENKINS-23617) Cannot use spaces in groovy script parameters
enterit created JENKINS-23617 Cannot use spaces in groovy script parameters Issue Type: Bug Affects Versions: current Assignee: vjuranek Components: groovy Created: 30/Jun/14 6:43 AM Description: The issue is caused by oversimplified parameters parsing implementation in this class: https://github.com/jenkinsci/groovy-plugin/blob/master/src/main/java/hudson/plugins/groovy/Groovy.java //Add groovy parameters if(parameters != null) { StringTokenizer tokens = new StringTokenizer(parameters); while(tokens.hasMoreTokens()) { list.add(Util.replaceMacro(tokens.nextToken(),vr)); } } I would suggest to switch to org.apache.commons.exec.CommandLine.parse(..) method from Apache commons-exec. Not ideal, I know, but probably the best possible option if parsing command-line is inevitable. Is anyone interested in the patch? It would be very straightforward. Project: Jenkins Priority: Major Reporter: enterit This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.