Skip to content

Commit

Permalink
Ignore Tycho generated POMs (#635)
Browse files Browse the repository at this point in the history
Eclipse Tycho produces artificial Maven POMs during the build, which
should be ignored by the POM scanner.

Fixes #634.
  • Loading branch information
Bananeweizen authored Oct 1, 2023
1 parent 1800d1f commit 12ff85a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,14 @@ private static Path pomPath(MavenProject mavenProject) {
if (pomPath.endsWith(".flattened-pom.xml")) {
return mavenProject.getBasedir().toPath().resolve("pom.xml");
}
// org.eclipse.tycho:tycho-packaging-plugin:update-consumer-pom produces a synthetic pom
if (pomPath.endsWith(".tycho-consumer-pom.xml")) {
Path normalPom = mavenProject.getBasedir().toPath().resolve("pom.xml");
// check for existence of the POM, since Tycho can work pom-less
if (Files.isReadable(normalPom) && Files.isRegularFile(normalPom)) {
return normalPom;
}
}
return pomPath;
}

Expand Down

0 comments on commit 12ff85a

Please sign in to comment.