Skip to content

Commit 6a74201

Browse files
committed
Root POM: link to project's LICENSE, add NOTICE+DISCLAIMER to comment
This change replaces the project's license URL in the parent POM from the AL-2.0 template to the `LICENSE` file in the project's root directory. Before (in `pom.xml`): ``` <licenses> <license> <name>Apache-2.0</name> <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> </license> </licenses> ``` With this change: ``` <licenses> <license> <name>Apache-2.0</name> <url>https://raw.githubusercontent.com/apache/polaris/HEAD/LICENSE</url> <comments>NOTICE: https://raw.githubusercontent.com/apache/polaris/HEAD/NOTICE DISCLAIMER: https://raw.githubusercontent.com/apache/polaris/HEAD/DISCLAIMER</comments> </license> </licenses> ```
1 parent cec41c4 commit 6a74201

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ internal fun configurePom(project: Project, mavenPublication: MavenPublication,
7575

7676
task.doFirst {
7777
mavenPom.run {
78+
val gitInfo = GitInfo.memoized(project)
7879
val asfProject = AsfProject.memoized(project, e.asfProjectId.get())
7980
val asfProjectId = asfProject.apacheId
8081

@@ -85,7 +86,14 @@ internal fun configurePom(project: Project, mavenPublication: MavenPublication,
8586
licenses {
8687
license {
8788
name.set("Apache-2.0") // SPDX identifier
88-
url.set(asfProject.licenseUrl)
89+
url.set(gitInfo.rawGithubLink("LICENSE"))
90+
comments.set(
91+
"""
92+
NOTICE: ${gitInfo.rawGithubLink("NOTICE")}
93+
DISCLAIMER: ${gitInfo.rawGithubLink("DISCLAIMER")}
94+
"""
95+
.trimIndent()
96+
)
8997
}
9098
}
9199
mailingLists {

0 commit comments

Comments
 (0)