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

Flattened pom throws errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: pipeline-maven-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.54
      Pipeline Maven Plugin 2.0.2
    • Similar Issues:

      Description

      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}"
                              }
                          }
                      }
                  }
              }
      

        Attachments

          Activity

          Hide
          cleclerc 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.

          Show
          cleclerc 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.
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Fixed in 2.0.3

          Show
          cleclerc Cyrille Le Clerc added a comment - Fixed in 2.0.3
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Ben Middleton can you please confirm that this issue is fixed?

          Show
          cleclerc Cyrille Le Clerc added a comment - Ben Middleton can you please confirm that this issue is fixed?
          Hide
          bengineer Ben Middleton added a comment -

          Thanks for fixing this.

          I no longer see these warnings.

          Show
          bengineer Ben Middleton added a comment - Thanks for fixing this. I no longer see these warnings.
          Hide
          tgr 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?)

           

          Show
          tgr 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?)  

            People

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

              Dates

              • Created:
                Updated:
                Resolved: