mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-13 13:53:29 +00:00
uploadArchives customizePom for bom
Previously the bom was not being customized for the uploadArchives task. This commit enhances the bom plugin to support uploadArchives. Closes gh-7975
This commit is contained in:
parent
b95ccc211b
commit
f892746c00
@ -30,20 +30,30 @@ public class MavenBomTask extends DefaultTask {
|
||||
}
|
||||
project.install {
|
||||
repositories.mavenInstaller {
|
||||
pom.whenConfigured {
|
||||
packaging = "pom"
|
||||
withXml {
|
||||
asNode().children().last() + {
|
||||
delegate.dependencyManagement {
|
||||
delegate.dependencies {
|
||||
projects.sort { dep -> "$dep.group:$dep.name" }.each { p ->
|
||||
customizePom(pom)
|
||||
}
|
||||
}
|
||||
|
||||
delegate.dependency {
|
||||
delegate.groupId(p.group)
|
||||
delegate.artifactId(p.name)
|
||||
delegate.version(p.version)
|
||||
}
|
||||
}
|
||||
project.uploadArchives {
|
||||
repositories.mavenDeployer {
|
||||
customizePom(pom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void customizePom(pom) {
|
||||
pom.whenConfigured {
|
||||
packaging = "pom"
|
||||
withXml {
|
||||
asNode().children().last() + {
|
||||
delegate.dependencyManagement {
|
||||
delegate.dependencies {
|
||||
projects.sort { dep -> "$dep.group:$dep.name" }.each { p ->
|
||||
|
||||
delegate.dependency {
|
||||
delegate.groupId(p.group)
|
||||
delegate.artifactId(p.name)
|
||||
delegate.version(p.version)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -52,4 +62,4 @@ public class MavenBomTask extends DefaultTask {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user