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

Add Automatic-Module-Name entry to jar manifest #192

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

JohnnyJayJay
Copy link
Contributor

This PR adds a the Automatic-Module-Name manifest entry, making it easier for modular projects (Java 9 and above) to include this library. I've given the name org.spdx.library to the module, this can of course be changed if desired.

@goneall
Copy link
Member

goneall commented Sep 3, 2023

Thanks @JohnnyJayJay - I have not used Java modules in my projects to date, but the change seems reasonable. It looks like the name we use is quite important since we really shouldn't change it in the future.

I think the proposed name is correct since this will always be assumed to be "Java" and matches the naming conventions for the packages.

The other name to consider would be org.spdx.java.library which would be consistent with the Git repo naming convention which houses several different computer language libraries.

As mentioned above, I currently prefer the proposed org.spdx.library but wanted to check with you to see if there would be a future scenario where the module name may be used in a non-Java context.

@JohnnyJayJay
Copy link
Contributor Author

Cheers, thank you for the quick response. You're right, the module name should be final. But unless there is any other Java project that could reasonably be put under org.spdx.library, this should be good enough. Usually I'd use the "root package" of the project, but there isn't really one here aside from org.spdx which is a bit too general.

I have not used Java modules in my projects to date

They're quite useful for application development. As it stands, this library actually already gets an automatic module name (spdx.java.library) which is just derived from the jar file. Such names are generally considered unstable and people are discouraged from making modules depending on them, which is why setting an explicit name is good. Without doing that, Gradle actually won't accept the library as a module at all (and it becomes very annoying to build a modular application), so that's the main reason I'm making this PR.

Copy link
Member

@goneall goneall left a comment

Choose a reason for hiding this comment

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

Very minor change request - otherwise looks good.

Thanks @JohnnyJayJay

pom.xml Show resolved Hide resolved
@goneall goneall merged commit c6e6f54 into spdx:master Sep 4, 2023
1 check passed
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.

2 participants