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 {
|
project.install {
|
||||||
repositories.mavenInstaller {
|
repositories.mavenInstaller {
|
||||||
pom.whenConfigured {
|
customizePom(pom)
|
||||||
packaging = "pom"
|
}
|
||||||
withXml {
|
}
|
||||||
asNode().children().last() + {
|
|
||||||
delegate.dependencyManagement {
|
|
||||||
delegate.dependencies {
|
|
||||||
projects.sort { dep -> "$dep.group:$dep.name" }.each { p ->
|
|
||||||
|
|
||||||
delegate.dependency {
|
project.uploadArchives {
|
||||||
delegate.groupId(p.group)
|
repositories.mavenDeployer {
|
||||||
delegate.artifactId(p.name)
|
customizePom(pom)
|
||||||
delegate.version(p.version)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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