Uploaded image for project: 'Infrastructure'
  1. Infrastructure
  2. INFRA-2292

url tag in pom is not properly interpolating strings

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: update-center
    • Labels:
      None
    • Environment:
      maven-hpi-plugin:3.6
    • Similar Issues:

      Description

      With the maven-hpi-plugin version 3.6, one can see that the url tag (now used to link documentation) is not having its string properly interpolated.

       

      As an example https://github.com/jenkinsci/chaos-monkey-plugin/blob/master/pom.xml#L39 will result in `https://github.com/jenkinsci/$%7Bproject.artifactId%7D-plugin` in the update center.

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            CC Jesse Glick, looks like we need to remove it from guidelines. Something does not work in the release profile

            Show
            oleg_nenashev Oleg Nenashev added a comment - CC Jesse Glick , looks like we need to remove it from guidelines. Something does not work in the release profile
            Hide
            pierrebtz Pierre Beitz added a comment -

            To be fair the documentation (https://wiki.jenkins.io/display/JENKINS/Hosting+Plugins#HostingPlugins-Hostingthepluginpage ) states: "Modify your project URL to point to the GitHub repository, e.g. http://github.com/jenkinsci/your-plugin", it was simply making sense to use the artifactid variable.

            Show
            pierrebtz Pierre Beitz added a comment - To be fair the documentation ( https://wiki.jenkins.io/display/JENKINS/Hosting+Plugins#HostingPlugins-Hostingthepluginpage ) states: "Modify your project URL to point to the GitHub repository, e.g.  http://github.com/jenkinsci/your-plugin ", it was simply making sense to use the artifactid variable.
            Hide
            jglick Jesse Glick added a comment -

            And the archetype now does the same.

            Something does not add up here. https://github.com/jenkinsci/chaos-monkey-plugin/blob/chaos-monkey-0.1/pom.xml#L43 is correctly expanded in http://repo.jenkins-ci.org/public/io/jenkins/plugins/chaos-monkey/0.1/chaos-monkey-0.1.hpi so what else is the update center generator pulling metadata from?

            Show
            jglick Jesse Glick added a comment - And the archetype now does the same. Something does not add up here. https://github.com/jenkinsci/chaos-monkey-plugin/blob/chaos-monkey-0.1/pom.xml#L43 is correctly expanded in http://repo.jenkins-ci.org/public/io/jenkins/plugins/chaos-monkey/0.1/chaos-monkey-0.1.hpi so what else is the update center generator pulling metadata from?
            Hide
            zbynek Zbynek Konecny added a comment -

            Jesse Glick I tried opening the .hpi and POM still has $ signs

            We discussed the same problem withe a different plugin with Oleg Nenashev and he mentioned that this may be related to incrementals (https://gitter.im/jenkinsci/docs?at=5d987f210e67130aae1aeca7 ) .

            Indeed locally following https://github.com/jenkinsci/incrementals-tools#enabling-incrementals-the-easy-way and running mvn install helped for the other plugin.

            Show
            zbynek Zbynek Konecny added a comment - Jesse Glick I tried opening the .hpi and POM still has $ signs We discussed the same problem withe a different plugin with Oleg Nenashev  and he mentioned that this may be related to incrementals ( https://gitter.im/jenkinsci/docs?at=5d987f210e67130aae1aeca7  ) . Indeed locally following  https://github.com/jenkinsci/incrementals-tools#enabling-incrementals-the-easy-way  and running mvn install helped for the other plugin.
            Hide
            jglick Jesse Glick added a comment -

            Zbynek Konecny yes the POM still has variable references, but the manifest does not. See the linked PR—I think this is simply a bug in the update center.

            Enabling Incrementals fixes this as a side effect because that turns on flatten-maven-plugin.

            Show
            jglick Jesse Glick added a comment - Zbynek Konecny yes the POM still has variable references, but the manifest does not. See the linked PR—I think this is simply a bug in the update center. Enabling Incrementals fixes this as a side effect because that turns on flatten-maven-plugin .
            Hide
            zbynek Zbynek Konecny added a comment -

            Jesse Glick thanks for the explanation. In another discussion  Daniel Beck said "The plugins site already extracts data from the POM and ignores metadata.mf as hard as possible;" so I thought that's by design

            Show
            zbynek Zbynek Konecny added a comment - Jesse Glick thanks for the explanation. In another discussion   Daniel Beck said "The plugins site already extracts data from the POM and ignores metadata.mf as hard as possible;" so I thought that's by design
            Hide
            danielbeck Daniel Beck added a comment -

            That's a quote from https://github.com/jenkinsci/maven-hpi-plugin/pull/68#issuecomment-317273691 and pre-dates work on update-center2 caches like https://github.com/jenkins-infra/update-center2/pull/206 with which, IIRC, I've reduced the duration of one generation from 20+ minutes to ~3 minutes. So the performance reasons (update center generation potentially opened thousands of zip files) I implied back then no longer apply.

            Show
            danielbeck Daniel Beck added a comment - That's a quote from https://github.com/jenkinsci/maven-hpi-plugin/pull/68#issuecomment-317273691 and pre-dates work on update-center2 caches like https://github.com/jenkins-infra/update-center2/pull/206 with which, IIRC, I've reduced the duration of one generation from 20+ minutes to ~3 minutes. So the performance reasons (update center generation potentially opened thousands of zip files) I implied back then no longer apply.
            Hide
            danielbeck Daniel Beck added a comment -

            (There may have been another reason for my comment, but that's the only one I can imagine right now.)

            Show
            danielbeck Daniel Beck added a comment - (There may have been another reason for my comment, but that's the only one I can imagine right now.)

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                pierrebtz Pierre Beitz
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: