Skip to content

Commit

Permalink
fix invalid generated pom files with self-referential dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
bratkartoffel committed Jul 17, 2023
1 parent 148f18b commit 48a7e84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog

### [unreleased]
* no changes yet
* (all) fix invalid generated pom files with self-referential dependencies

### [5.0.5] (2023-05-19)
* (base) upgrade openapi dependency to 2.2.10
Expand Down
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ subprojects {
email = 'simon-ossrh-release@fraho.eu'
}
}
// workaround
// https://stackoverflow.com/questions/69877418/why-does-every-pom-file-published-by-gradle-has-a-self-referential-dependency
// https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/365
withXml {
asNode().dependencies.dependency.each { dep ->
if(dep["artifactId"].last().value().last() == artifactId) {
assert dep.parent().remove(dep)
}
}
}
}
}
}
Expand Down

0 comments on commit 48a7e84

Please sign in to comment.