Skip to content

Commit 2a174ad

Browse files
authored
Allow overriding the published parent pom's name and description (#795)
The publishing-helper in Polaris derives the name and description used in the parent POM from ASF's published project information. If an Apache projects wants to publish the parent pom for a _related_ project, the name and description in the pom (may) need to be different (as for #785). This change allows this.
1 parent b1348a6 commit 2a174ad

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

build-logic/src/main/kotlin/publishing/PublishingHelperExtension.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ abstract class PublishingHelperExtension
3737
constructor(objectFactory: ObjectFactory, project: Project) {
3838
// the following are only relevant on the root project
3939
val asfProjectName = objectFactory.property<String>().convention(project.name)
40+
val overrideName = objectFactory.property<String>()
41+
val overrideDescription = objectFactory.property<String>()
4042
val baseName =
4143
objectFactory
4244
.property<String>()

build-logic/src/main/kotlin/publishing/configurePom.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ internal fun configurePom(project: Project, mavenPublication: MavenPublication,
107107
}
108108
issueManagement { url.set(projectPeople.bugDatabase) }
109109

110-
name.set(projectPeople.name)
111-
description.set(projectPeople.description)
110+
name.set(e.overrideName.orElse(projectPeople.name))
111+
description.set(e.overrideDescription.orElse(projectPeople.description))
112112
url.set(projectPeople.website)
113113
inceptionYear.set(projectPeople.inceptionYear.toString())
114114

0 commit comments

Comments
 (0)