Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Add pom.xml, pom.properties and LICENSE+NOTICE to release jars #1036

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

snazy
Copy link
Member

@snazy snazy commented Feb 20, 2025

Adds convenient, but not strictly necessary information to each generated "main" jar.

This includes pom.properties and pom.xml files where Maven places those, in META-INF/maven/group-id/artifact-id/. Also adds the NOTICE and LICENSE files in META-INF, which makes it easier for license scanners.

inputs.property("GAV", "${project.group}:${project.name}:${project.version}")
dependsOn("generatePomFileForMavenPublication")
from(rootProject.rootDir) {
include("LICENSE", "NOTICE")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about including the root NOTICE into each jar. Binary notices may have to be different for different jars because of different dependency sets.

@jbonofre : WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's all we have at the moment. 🤷

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theorically, we should have LICENSE/NOTICE actually representing what's in the jar. Taking LICENSE/NOTICE from the root folder (e.g. source distribution) is fine.

I'm working on LICENSE/NOTICE for uber jars/distributions (see #1031 ).

So let me do a pass, but using LICENSE/NOTICE sounds reassonoable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still do not see the benefit of including the root NOTICE in every jar (due to it not being 100% correct) but I'll defer to @jbonofre 's opinion.

@snazy snazy requested a review from dimas-b February 25, 2025 11:40
…jars

Adds convenient, but not strictly necessary information to each generated "main" jar.

This includes `pom.properties` and `pom.xml` files where Maven places those, in `META-INF/maven/group-id/artifact-id/`. Also adds the `NOTICE` and `LICENSE` files in `META-INF`, which makes it easier for license scanners.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants