-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexOutOfBoundsException: Illegal start index with ARTIFACT_NAME #3
Comments
Please note that the regular expression does contain the backslash. It has been swallowed by the github form. |
Also, if I double escape with backslash, the Jenkins job runs fine but the resulting URL is completely wrong: |
I'm seeing this too. Jenkins sees the artifact and is able to archive it, but selecting even artifact=$ARTIFACT_NAME{.*} returns the same error. This is when using a maven build with the release:perform goal. |
I have a suspicion the issue is:
http://docs.oracle.com/javase/6/docs/api/java/util/regex/Matcher.html seems to state that the matcher stores a copy of the string. If the result of the replacement results in an index that is longer than the entire original option input, the error will occur. |
That was it! |
matcher on each loop. Fixes vbehar#3.
On a related note, Maven 'automatic artifact archiving' does not play well this this feature, instead one must configure it as a post-build action. |
One additional note; the intent of the 'idx' logic isn't obvious -- matcher.find() acts as an iterator, so keeping track of where the last match ended shouldn't be necessary. |
Hi Vincent,
I’m trying to setup the Jenkins plugin for RunDeck but I keep getting this error (please see below) when I set the job options to pkgname=$ARTIFACT_NAME{.*.deb}. I’m using Jenkins v 1.465 and plugin version 2.11
Notifying RunDeck...
ERROR: Publisher org.jenkinsci.plugins.rundeck.RundeckNotifier aborted due to exception
java.lang.IndexOutOfBoundsException: Illegal start index
at java.util.regex.Matcher.find(Matcher.java:576)
at org.jenkinsci.plugins.rundeck.RundeckNotifier.parseProperties(RundeckNotifier.java:233)
at org.jenkinsci.plugins.rundeck.RundeckNotifier.notifyRundeck(RundeckNotifier.java:162)
at org.jenkinsci.plugins.rundeck.RundeckNotifier.perform(RundeckNotifier.java:97)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685)
at hudson.model.Build$RunnerImpl.post2(Build.java:162)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632)
at hudson.model.Run.run(Run.java:1459)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:239)
The text was updated successfully, but these errors were encountered: