Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
a6954614
Commit
a6954614
authored
Jun 17, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minimize contents of poms that are an ancestor of a user's pom
Fixes gh-21989
parent
0de466e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
MavenPublishingConventions.java
...pringframework/boot/build/MavenPublishingConventions.java
+17
-6
No files found.
buildSrc/src/main/java/org/springframework/boot/build/MavenPublishingConventions.java
View file @
a6954614
...
...
@@ -86,11 +86,15 @@ class MavenPublishingConventions {
pom
.
getUrl
().
set
(
"https://spring.io/projects/spring-boot"
);
pom
.
getName
().
set
(
project
.
provider
(
project:
:
getName
));
pom
.
getDescription
().
set
(
project
.
provider
(
project:
:
getDescription
));
pom
.
organization
(
this
::
customizeOrganization
);
if
(!
isUserInherited
(
project
))
{
pom
.
organization
(
this
::
customizeOrganization
);
}
pom
.
licenses
(
this
::
customizeLicences
);
pom
.
developers
(
this
::
customizeDevelopers
);
pom
.
scm
(
this
::
customizeScm
);
pom
.
issueManagement
(
this
::
customizeIssueManagement
);
pom
.
scm
((
scm
)
->
customizeScm
(
scm
,
project
));
if
(!
isUserInherited
(
project
))
{
pom
.
issueManagement
(
this
::
customizeIssueManagement
);
}
}
private
void
customizeJavaMavenPublication
(
MavenPublication
publication
,
Project
project
)
{
...
...
@@ -121,9 +125,11 @@ class MavenPublishingConventions {
});
}
private
void
customizeScm
(
MavenPomScm
scm
)
{
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"
);
private
void
customizeScm
(
MavenPomScm
scm
,
Project
project
)
{
if
(!
isUserInherited
(
project
))
{
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"
);
}
...
...
@@ -132,4 +138,9 @@ class MavenPublishingConventions {
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
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment