Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10770

In Maven Project, copy config files runs AFTER pre-Build Steps provided by M2 Extra Steps Plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We use M2 Extra Build steps to provide preprocessing for certain maven projects. However, we cannot use the configuration files provided by config file provider to provide settings files for these pre-build steps, since config file provider runs AFTER them.

      Reproduction:

      • Create a Maven Project
      • insert a pre build step
      • activate "Provide configuration files"

      Run the Project

      Expected result:

      config files are copied before prebuild step runs

      Actual result:

      The prebuild step runs (failing if it depends on the config file), copy files afterwards.

      Possible solutions:

      1) Change the order of the wrappers
      2) (prefered) change m2 extra steps plugin to use config File provider.

        Attachments

          Activity

          Hide
          domi Dominik Bartholdi added a comment -

          I see your point and yes you'r true this is currently not implemented - I'll try to have a look at this.
          In the meantime, you can use 'Build Environment > Provide Configuration files' to copy the correct settings.xml to an location you like.
          e.g. as it is described for the freestyle project
          https://wiki.jenkins-ci.org/download/thumbnails/58000129/freestyle.png.jpg
          https://wiki.jenkins-ci.org/download/attachments/58000129/maven-plugin.png.jpg

          https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin

          Show
          domi Dominik Bartholdi added a comment - I see your point and yes you'r true this is currently not implemented - I'll try to have a look at this. In the meantime, you can use 'Build Environment > Provide Configuration files' to copy the correct settings.xml to an location you like. e.g. as it is described for the freestyle project https://wiki.jenkins-ci.org/download/thumbnails/58000129/freestyle.png.jpg https://wiki.jenkins-ci.org/download/attachments/58000129/maven-plugin.png.jpg https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin
          Hide
          paux Stephan Pauxberger added a comment -

          Unfortunately, this does not work, since the provide configuration files step runs after Prebuild steps provided by m2 extra build steps (at least in our configuration)

          Show
          paux Stephan Pauxberger added a comment - Unfortunately, this does not work, since the provide configuration files step runs after Prebuild steps provided by m2 extra build steps (at least in our configuration)
          Hide
          domi Dominik Bartholdi added a comment -

          OK, got it now - sorry...
          I can fix at least this - you'l get a new release sometime this week

          Show
          domi Dominik Bartholdi added a comment - OK, got it now - sorry... I can fix at least this - you'l get a new release sometime this week
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          src/main/java/org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper.java
          http://jenkins-ci.org/commit/config-file-provider-plugin/b053cde3a01945a59ee58ac85c46867f42a3a2e3
          Log:
          JENKINS-10770: define ordinal for wrapper higher as the for m2extrasteps

          Compare: https://github.com/jenkinsci/config-file-provider-plugin/compare/f639cb7...b053cde

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper.java http://jenkins-ci.org/commit/config-file-provider-plugin/b053cde3a01945a59ee58ac85c46867f42a3a2e3 Log: JENKINS-10770 : define ordinal for wrapper higher as the for m2extrasteps Compare: https://github.com/jenkinsci/config-file-provider-plugin/compare/f639cb7...b053cde
          Hide
          domi Dominik Bartholdi added a comment -

          this is fixed since Version 1.1 of the config-file-provider-plugin

          Show
          domi Dominik Bartholdi added a comment - this is fixed since Version 1.1 of the config-file-provider-plugin
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          src/main/java/org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper.java
          http://jenkins-ci.org/commit/config-file-provider-plugin/97d97e937a95b4b73c6ca250c1267e0900eb64a2
          Log:
          JENKINS-10770: define ordinal for wrapper higher as the for m2extrasteps

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper.java http://jenkins-ci.org/commit/config-file-provider-plugin/97d97e937a95b4b73c6ca250c1267e0900eb64a2 Log: JENKINS-10770 : define ordinal for wrapper higher as the for m2extrasteps

            People

            Assignee:
            domi Dominik Bartholdi
            Reporter:
            paux Stephan Pauxberger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: