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

Failure to collect pom.xml file path when using flatten-maven-plugin with a non default "flattenedPomFilename"

XMLWordPrintable

      When using the flatten-maven-plugin with a non default "flattenedPomFilename", the captured maven pom file path is wrong and the maven event spy displays a warning.

      Sample with Jenkins workflow-step-api-2.17-SNAPSHOT

      [WARNING] [jenkins-event-spy] Unexpected Maven project file name 'workflow-step-api-2.17-SNAPSHOT.pom', problems may occur
      
      <project>
            ...
            <build>
              <plugins>
                <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>flatten-maven-plugin</artifactId>
                  <version>1.0.1</version>
                  <configuration>
                    <updatePomFile>true</updatePomFile>
                  </configuration>
                  <executions>
                    <execution>
                      <id>flatten</id>
                      <phase>process-resources</phase>
                      <goals>
                        <goal>flatten</goal>
                      </goals>
                      <configuration>
                          <flattenMode>oss</flattenMode>
                          <outputDirectory>${project.build.directory}</outputDirectory>
                          <flattenedPomFilename>${project.artifactId}-${project.version}.pom</flattenedPomFilename>
                      </configuration>
                    </execution>
                  </executions>
                </plugin>
                ...
              <plugins>
            <build>
      </project>
      

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

              Created:
              Updated:
              Resolved: