• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins 2.54
      Pipeline Maven Plugin 2.0.2

      I have a maven project which uses the Flatten maven plugin (http://www.mojohaus.org/flatten-maven-plugin/)

      When I build the project using Jenkins Pipeline, I see the following warnings during the build:

      [jenkins-maven-event-spy] WARNING: unexpected Maven project file name '.flattened-pom.xml', problems may occur
      

      What problems may occur?

      My build script looks like this:

      pipeline {
                      agent {
                          label agentLabel
                      }
      
                      stages {
                          stage('Build') {
                              steps {
          withMaven(jdk: 'JDK8', maven: 'MVN3',
                  mavenSettingsConfig: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1422003195277') {
                                  bat "mvn -B ${args}"
                              }
                          }
                      }
                  }
              }
      

          [JENKINS-43616] Flattened pom throws errors

          We have seen problems with the maven assembly plugin that use a transient mom file that caused a file not found exception when the Jenkins pipeline plugin processed the results.

          The flatten plugin uses what seems to be a transient pom file. We have to check, we probably desire to collect/archive the source pom file for traceability.

          The problem you may face would be a failure to archive the pom file.

          Cyrille Le Clerc added a comment - We have seen problems with the maven assembly plugin that use a transient mom file that caused a file not found exception when the Jenkins pipeline plugin processed the results. The flatten plugin uses what seems to be a transient pom file. We have to check, we probably desire to collect/archive the source pom file for traceability. The problem you may face would be a failure to archive the pom file.

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/.gitignore
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/pom.xml
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/main/java/com/example/MonoModuleMavenApp.java
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/test/java/com/example/MonoModuleMavenAppTest.java
          maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractMavenEventHandler.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/8819434461c387ee46af6dd796b816a3244d7ad8
          Log:
          JENKINS-43616 special handling of the pom file when using the flatten-maven-plugin

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/.gitignore jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/pom.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/main/java/com/example/MonoModuleMavenApp.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/test/java/com/example/MonoModuleMavenAppTest.java maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractMavenEventHandler.java http://jenkins-ci.org/commit/pipeline-maven-plugin/8819434461c387ee46af6dd796b816a3244d7ad8 Log: JENKINS-43616 special handling of the pom file when using the flatten-maven-plugin

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/.gitignore
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/pom.xml
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/main/java/com/example/MonoModuleMavenApp.java
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/test/java/com/example/MonoModuleMavenAppTest.java
          maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractMavenEventHandler.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/0cb0729dcd45e93a7436e38d06281e221d6fa905
          Log:
          JENKINS-43616 special handling of the pom file when using the flatten-maven-plugin

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/.gitignore jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/pom.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/main/java/com/example/MonoModuleMavenApp.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/test/java/com/example/MonoModuleMavenAppTest.java maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractMavenEventHandler.java http://jenkins-ci.org/commit/pipeline-maven-plugin/0cb0729dcd45e93a7436e38d06281e221d6fa905 Log: JENKINS-43616 special handling of the pom file when using the flatten-maven-plugin

          Code changed in jenkins
          User: Cyrille Le Clerc
          Path:
          jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/.gitignore
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/pom.xml
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/main/java/com/example/MonoModuleMavenApp.java
          jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/test/java/com/example/MonoModuleMavenAppTest.java
          maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractMavenEventHandler.java
          http://jenkins-ci.org/commit/pipeline-maven-plugin/84c30718be9acaec69d2cac5af8163e76f8d56e8
          Log:
          Merge pull request #42 from jenkinsci/JENKINS-43616

          JENKINS-43616 special handling of the pom file when using the flatten-maven-plugin

          Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/70cbc0a9b336...84c30718be9a

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepOnMasterTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/.gitignore jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/pom.xml jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/main/java/com/example/MonoModuleMavenApp.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_flatten_pom_project/src/test/java/com/example/MonoModuleMavenAppTest.java maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractMavenEventHandler.java http://jenkins-ci.org/commit/pipeline-maven-plugin/84c30718be9acaec69d2cac5af8163e76f8d56e8 Log: Merge pull request #42 from jenkinsci/ JENKINS-43616 JENKINS-43616 special handling of the pom file when using the flatten-maven-plugin Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/70cbc0a9b336...84c30718be9a

          Fixed in 2.0.3

          Cyrille Le Clerc added a comment - Fixed in 2.0.3

          bengineer can you please confirm that this issue is fixed?

          Cyrille Le Clerc added a comment - bengineer can you please confirm that this issue is fixed?

          Ben Middleton added a comment -

          Thanks for fixing this.

          I no longer see these warnings.

          Ben Middleton added a comment - Thanks for fixing this. I no longer see these warnings.

          Tobias Gruetzmacher added a comment - - edited

          Unfortunately, this is still a problem when the configuration of the flatten-maven-plugin is changed, for example the way Jenkins itself does it: https://github.com/jenkinsci/plugin-pom/blob/master/pom.xml#L1288-L1289 (should I open a new issue for this?)

           

          Tobias Gruetzmacher added a comment - - edited Unfortunately, this is still a problem when the configuration of the flatten-maven-plugin is changed, for example the way Jenkins itself does it: https://github.com/jenkinsci/plugin-pom/blob/master/pom.xml#L1288-L1289 (should I open a new issue for this?)  

            cleclerc Cyrille Le Clerc
            bengineer Ben Middleton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: