mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '2.3.x'
Closes gh-21994
This commit is contained in:
commit
bc4de8be8b
@ -86,11 +86,15 @@ class MavenPublishingConventions {
|
|||||||
pom.getUrl().set("https://spring.io/projects/spring-boot");
|
pom.getUrl().set("https://spring.io/projects/spring-boot");
|
||||||
pom.getName().set(project.provider(project::getName));
|
pom.getName().set(project.provider(project::getName));
|
||||||
pom.getDescription().set(project.provider(project::getDescription));
|
pom.getDescription().set(project.provider(project::getDescription));
|
||||||
pom.organization(this::customizeOrganization);
|
if (!isUserInherited(project)) {
|
||||||
|
pom.organization(this::customizeOrganization);
|
||||||
|
}
|
||||||
pom.licenses(this::customizeLicences);
|
pom.licenses(this::customizeLicences);
|
||||||
pom.developers(this::customizeDevelopers);
|
pom.developers(this::customizeDevelopers);
|
||||||
pom.scm(this::customizeScm);
|
pom.scm((scm) -> customizeScm(scm, project));
|
||||||
pom.issueManagement(this::customizeIssueManagement);
|
if (!isUserInherited(project)) {
|
||||||
|
pom.issueManagement(this::customizeIssueManagement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void customizeJavaMavenPublication(MavenPublication publication, Project project) {
|
private void customizeJavaMavenPublication(MavenPublication publication, Project project) {
|
||||||
@ -121,9 +125,11 @@ class MavenPublishingConventions {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void customizeScm(MavenPomScm scm) {
|
private void customizeScm(MavenPomScm scm, Project project) {
|
||||||
scm.getConnection().set("scm:git:git://github.com/spring-projects/spring-boot.git");
|
if (!isUserInherited(project)) {
|
||||||
scm.getDeveloperConnection().set("scm:git:ssh://git@github.com/spring-projects/spring-boot.git");
|
scm.getConnection().set("scm:git:git://github.com/spring-projects/spring-boot.git");
|
||||||
|
scm.getDeveloperConnection().set("scm:git:ssh://git@github.com/spring-projects/spring-boot.git");
|
||||||
|
}
|
||||||
scm.getUrl().set("https://github.com/spring-projects/spring-boot");
|
scm.getUrl().set("https://github.com/spring-projects/spring-boot");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,4 +138,9 @@ class MavenPublishingConventions {
|
|||||||
issueManagement.getUrl().set("https://github.com/spring-projects/spring-boot/issues");
|
issueManagement.getUrl().set("https://github.com/spring-projects/spring-boot/issues");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isUserInherited(Project project) {
|
||||||
|
return "spring-boot-starter-parent".equals(project.getName())
|
||||||
|
|| "spring-boot-dependencies".equals(project.getName());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user