Mark runtime dependency as provided in pom.

This commit is contained in:
Jeremy Wood 2023-08-24 13:49:48 -04:00
parent ee5408764f
commit bae909a9e8
No known key found for this signature in database
GPG Key ID: C5BAD04C77B91B4B

View File

@ -104,6 +104,16 @@ publishing {
publications { publications {
maven(MavenPublication) { maven(MavenPublication) {
from components.java from components.java
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.implementation.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'provided'
}
}
} }
} }
repositories { repositories {