Fork me on GitHub
#tools-deps
<
2022-09-17
>
zalky15:09:06

Hi folks: I'd like to roll an OSS library as a jar, and I'm wondering if you need to include the license in the jar file, and if so, does it matter where it goes?

zalky15:09:56

I've looked at a lot of existing projects and some do and some don't.

Alex Miller (Clojure team)15:09:47

I think it is common to include at the root but there is no explicit place anything looks at

👍 1
respatialized15:09:45

https://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html Is there a way to document the license and its path using the jar's Manifest file?

Alex Miller (Clojure team)16:09:34

the most common way to specify a license is with a Maven pom, which has some attributes for this

zalky16:09:52

It seems that lein adds both a copy of the license from the project root into the META-INF folder of the jar, but also adds a license xml section into the pom.xml. Am I correct that tools.build does not provide any such feature?

Alex Miller (Clojure team)16:09:08

or rather it makes a pom, and can sync from a template pom.xml if you provide one, which can include license info

zalky16:09:01

I see, so that would add the pom xml, but not the actual license.

Alex Miller (Clojure team)16:09:02

and you would need to copy the license file in

👍 1