Skip to content

Commit 685d7db

Browse files
cyrille-leclercCyrille Le Clerc
authored andcommitted
JENKINS-56666 maven-git-versioning-extension causes warnings due to temporary pom.xml file name '.git-versioned.pom.xml'
1 parent 4eda7f5 commit 685d7db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractMavenEventHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ public Xpp3Dom newElement(@Nonnull String name, @Nullable final MavenProject pro
126126
// JENKINS-42302: maven-shade-plugin creates a temporary project file dependency-reduced-pom.xml
127127
// TODO see if there is a better way to implement this "workaround"
128128
absolutePath = absolutePath.replace(File.separator + "dependency-reduced-pom.xml", File.separator + "pom.xml");
129+
} else if (absolutePath.endsWith(File.separator + ".git-versioned.pom.xml")) {
130+
// JENKINS-56666 maven-git-versioning-extension causes warnings due to temporary pom.xml file name '.git-versioned.pom.xml'
131+
// https://github.com/qoomon/maven-git-versioning-extension/blob/v4.1.0/src/main/java/me/qoomon/maven/gitversioning/VersioningMojo.java#L39
132+
// TODO see if there is a better way to implement this "workaround"
133+
absolutePath = absolutePath.replace(File.separator + ".git-versioned.pom.xml", File.separator + "pom.xml");
129134
} else {
130135
String flattenedPomFilename = getMavenFlattenPluginFlattenedPomFilename(project);
131136
if (flattenedPomFilename == null) {

0 commit comments

Comments
 (0)