Giter Club home page Giter Club logo

Comments (7)

giorgio-v avatar giorgio-v commented on August 21, 2024

Please note that the regular expression does contain the backslash. It has been swallowed by the github form.

from jenkins-rundeck-plugin.

giorgio-v avatar giorgio-v commented on August 21, 2024

Also, if I double escape with backslash, the Jenkins job runs fine but the resulting URL is completely wrong:

http://packages/deb/elpq/snapshot/%7B.*.deb%7D:

from jenkins-rundeck-plugin.

jhmartin avatar jhmartin commented on August 21, 2024

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.

from jenkins-rundeck-plugin.

jhmartin avatar jhmartin commented on August 21, 2024

I have a suspicion the issue is:

        Matcher matcher = TOKEN_ARTIFACT_NAME_PATTERN.matcher(input);
        int idx = 0;
        while (matcher.find(idx)) {
[snip]
                    idx = matcher.start() + artifact.getFileName().length();

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.

from jenkins-rundeck-plugin.

jhmartin avatar jhmartin commented on August 21, 2024

That was it!
while (matcher.find(idx)) { needs to be while (matcher.reset(input).find(idx)) {. PR incoming.

from jenkins-rundeck-plugin.

jhmartin avatar jhmartin commented on August 21, 2024

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.

from jenkins-rundeck-plugin.

jhmartin avatar jhmartin commented on August 21, 2024

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.

from jenkins-rundeck-plugin.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.