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

withMaven fails to inject Maven settings files with docker-pipeline 1.14

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline-maven-plugin
    • None
    • pipeline-maven-plugin 2.x+
      docker-pipeline plugin 1.14

      Problem Description

      The docker-pipeline changed its behavior with version 1.14 and is no longer allowing plugins to contribute the "PATH" environment variable.

      The Pipeline Maven Plugin contributes to the PATH environment variable to specify the "mvn" command line arguments such as the settings file.

      Due to this change of behavior, the Pipeline Maven Plugin is no longer able to inject specify Maven settings file.

      Workaround

      If you need to specify the Maven settings file in a dockerized build agent using the Docker Pipeline Plugin,

      References

      https://github.com/jenkinsci/docker-workflow-plugin/commit/f55c122fe10f28bf31ccfca66f0587facf508148#diff-4d69c729a160747eba5c12ea83f7753cR248

      https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.0.2/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java#L279

          [JENKINS-47823] withMaven fails to inject Maven settings files with docker-pipeline 1.14

          Cyrille Le Clerc created issue -
          Cyrille Le Clerc made changes -
          Link New: This issue is related to JENKINS-40484 [ JENKINS-40484 ]
          Cyrille Le Clerc made changes -
          Link New: This issue is duplicated by JENKINS-47805 [ JENKINS-47805 ]
          Cyrille Le Clerc made changes -
          Assignee Original: Alvaro Lobato [ alobato ] New: Cyrille Le Clerc [ cleclerc ]
          Cyrille Le Clerc made changes -
          Summary Original: withMaven fails to inject Maven settings files with docker-piepline 1.14 New: withMaven fails to inject Maven settings files with docker-pipeline 1.14
          Cyrille Le Clerc made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          dan tran made changes -
          Comment [ where do I download the beta? :) ]
          Cyrille Le Clerc made changes -
          Description Original: h3. Problem Description

          The [docker-pipeline|https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin] changed its behavior with version 1.14 and is no longer allowing plugins to contribute the "PATH" environment variable.

          The Pipeline Maven Plugin contributes to the PATH environment variable to specify the "mvn" command line arguments such as the settings file.

          Due to this change of behavior, the Pipeline Maven Plugin is no longer able to inject specify Maven settings file.
          h3. Workaround

          If you need to specify the Maven settings file in a dockerized build agent using the Docker Pipeline Plugin,
           * either continue to use the Docker Pipeline Plugin 1.13
           * or specify the maven settings files using the [Config File Provider Plugin|https://wiki.jenkins.io/display/JENKINS/Config+File+Provider+Plugin]

          h3. References

          [https://github.com/jenkinsci/docker-workflow-plugin/commit/f55c122fe10f28bf31ccfca66f0587facf508148#diff-4d69c729a160747eba5c12ea83f7753cR248]

          [https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.0.2/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java#L279]
          New: h3. Problem Description

          The [docker-pipeline|https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin] changed its behavior with version 1.14 and is no longer allowing plugins to contribute the "PATH" environment variable.

          The Pipeline Maven Plugin contributes to the PATH environment variable to specify the "mvn" command line arguments such as the settings file.

          Due to this change of behavior, the Pipeline Maven Plugin is no longer able to inject specify Maven settings file.
          h3. Workaround

          If you need to specify the Maven settings file in a dockerized build agent using the Docker Pipeline Plugin,
           * continue to use the Docker Pipeline Plugin 1.13
           * or specify the maven settings files using the [Config File Provider Plugin|https://wiki.jenkins.io/display/JENKINS/Config+File+Provider+Plugin]
          * or use [pipeline-maven:3.0.3-beta-2|https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.0.3-beta-2] adapting the "PATH" environment variable or using Takari's Maven wrapper as described on the release notes

          h3. References

          [https://github.com/jenkinsci/docker-workflow-plugin/commit/f55c122fe10f28bf31ccfca66f0587facf508148#diff-4d69c729a160747eba5c12ea83f7753cR248]

          [https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.0.2/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java#L279]
          Cyrille Le Clerc made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Cyrille Le Clerc made changes -
          Link New: This issue is duplicated by JENKINS-47804 [ JENKINS-47804 ]
          Nuno Costa made changes -
          Link New: This issue is related to JENKINS-48284 [ JENKINS-48284 ]

            cleclerc Cyrille Le Clerc
            cleclerc Cyrille Le Clerc
            Votes:
            2 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: