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

Put LICENSE to the JAR #188

Closed
bespaltovyj opened this issue Aug 16, 2021 · 9 comments
Closed

Put LICENSE to the JAR #188

bespaltovyj opened this issue Aug 16, 2021 · 9 comments

Comments

@bespaltovyj
Copy link
Contributor

I use gradle plugin for automatic check dependencies licenses. But your library not verified, because in your jar file license not present.
Can you put license to JAR file?
image

@oshai
Copy link
Owner

oshai commented Aug 17, 2021

Hi, thanks for reporting the issue!
I am not aware of any standard of adding the license file to the jar. Can you point out such?
Maybe a better idea will be that the gradle plugin will look also on github to check for license file?

@BorzdeG
Copy link
Contributor

BorzdeG commented Aug 17, 2021

https://github.com/merkle-open/gradle-license-enforce-plugin fetches information from Maven POM file

@bespaltovyj
Copy link
Contributor Author

I am not aware of any standard of adding the license file to the jar. Can you point out such?

I'm not good at software licensing, but in apache license page
"Include a copy of the Apache License, typically in a file called LICENSE, in your work"

Distributing source code and binary files are two different things and in both cases you need a license file(in source code is present). Most likely, the licenses in maven pom refer only to the maven repository and the correct check is checking the license file. But I`m not suer whether it is necessary to put the linece file into the jar.

https://github.com/merkle-open/gradle-license-enforce-plugin fetches information from Maven POM file

Thanks for link, I chose my plugin because it is more popular and I hope that its support will not be discontinued.

@oshai
Copy link
Owner

oshai commented Aug 23, 2021

So it sounds like having it in the pom.xml is enough (and more standard).

@choweiyuan
Copy link

I use the same https://github.com/jk1/Gradle-License-Report plugin to check dependencies license and ran into the same problem. Interestingly this wasn't a problem back in v1.x.x, problem starts from v2 onwards

Either way would be good to have this fixed

@bespaltovyj
Copy link
Contributor Author

I can fix this problem if the owners of the project don't mind.

@oshai
Copy link
Owner

oshai commented Nov 2, 2021

sure, go ahead and send a PR.

@bespaltovyj
Copy link
Contributor Author

The problem turned out to be more complicated than I expected.
And the main reason is that kotlin-logging jar is a kotlin multiplatform jar. And the plugin can't read its licenses.

The solution to this problem is to change the type of dependency to kotlin-logging-jvm.
But I still did a PR with the addition of a license, because it seems right to me.

P.S. the plugin is able to process the license from the POM.

@oshai
Copy link
Owner

oshai commented Dec 6, 2021

solved in #191 version 2.0.12.

@oshai oshai closed this as completed Dec 6, 2021
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

No branches or pull requests

4 participants