Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6253

Replace CI friendly variables in pom.xml when installing/deploying

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5.0
    • Fix Version/s: waiting-for-feedback
    • Component/s: None
    • Labels:
      None

      Description

      When using variables in pom.xml to get CI friendly version (https://maven.apache.org/maven-ci-friendly.html), these will not be replaced in installed or deployed pom files, which makes them unusable for other builds.

      Karl Heinz Marbaise suggested to use the flatten-maven-plugin to do the property replacement
      (http://blog.soebes.de/blog/2017/04/02/maven-pom-files-without-a-version-in-it/), and this was also suggested as a workaround in other tickets (MDEPLOY-223 got closed with "Not A Problem" solution).

      That indeed works, but flatten-maven-plugin has to be manually configured in the base POM, and additionally it changes the pom files in many other areas which you would not want.

      I honestly think that property replacement for the three allowed properties (${revision}, ${sha1}, ${changelist}) should be done by Maven internally without having the user configure other plugins. The feature is just not correctly working without, so closing such issues with "Not A Problem" is too little.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chamshoff Christoph Amshoff
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: