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

Consider slightly changing the license URL #1529

Closed
mbooth101 opened this issue Nov 6, 2018 · 14 comments
Closed

Consider slightly changing the license URL #1529

mbooth101 opened this issue Nov 6, 2018 · 14 comments

Comments

@mbooth101
Copy link

At Eclipse Foundation we have some automated tools to fetch the licenses of our third-party dependencies and in some cases it uses the URL for the license that is given in the pom.xml file.

For example, in the mockito-core pom.xml [1] the following URL is given for the license:

https://github.com/mockito/mockito/blob/master/LICENSE

The problem is that this is a rich github page which contains all kinds of images and javascript and when our tooling downloads it, the result is a page containing other people's logos (possible copyright issue) and non functioning buttons and links.

Would you consider changing the URL to this:

https://raw.githubusercontent.com/mockito/mockito/master/LICENSE

That way you get only the license text without all the github cruft that currently surrounds it.

[1] https://repo1.maven.org/maven2/org/mockito/mockito-core/2.23.0/mockito-core-2.23.0.pom

@TimvdLippe
Copy link
Contributor

I am indifferent about this. The one requirement I have is that we are consistent with other projects. What notation do project like JUnit and Spring use?

@mbooth101
Copy link
Author

JUnit and Spring projects actually go one step further and link to the license at a canonical source, e.g. EPL is published by Eclipse Foundation, so link to the Eclipse Foundation's copy of it. In the JUnit poms [1] they link directly to the Eclipse Foundation [2] and in the Spring poms [3] they link directly to the Apache Foundation [4]

I'm actually not sure if there is a canonical source for the MIT license, but there are other high-profile projects like ICU4j [3] that link directly into the license with the github raw URL as I am suggesting here for Mockito.

[1] https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.3.1/junit-jupiter-api-5.3.1.pom
[2] https://www.eclipse.org/legal/epl-v20.html
[3] https://repo1.maven.org/maven2/org/springframework/spring-web/5.1.2.RELEASE/spring-web-5.1.2.RELEASE.pom
[4] http://www.apache.org/licenses/LICENSE-2.0
[5] https://repo1.maven.org/maven2/com/ibm/icu/icu4j/63.1/icu4j-63.1.pom

@mbooth101
Copy link
Author

mbooth101 commented Nov 8, 2018

Looking around I also see that many projects link to the MIT license at opensource.org [1] and that would also be acceptible to me :-) It might also be the most consistent with other projects who are linking to licenses at canonical sources

[1] https://opensource.org/licenses/MIT

@TimvdLippe
Copy link
Contributor

Tweeted this out to ask for more information: https://twitter.com/TimvdLippe/status/1063501027624783873 If we can't find a consensus in the general Java community, we (the Mockito team) would probably just have to make a judgement call here. Thanks again for raising this issue!

@mockitoguy
Copy link
Member

Let's do it. We have at least 1 user report that this change would be useful. I don't think changing it will break any known use case. @mbooth101, do you want to submit a PR?

@mbooth101
Copy link
Author

Let's do it. We have at least 1 user report that this change would be useful. I don't think changing it will break any known use case. @mbooth101, do you want to submit a PR?

Hmm, I'm afraid I'm not familiar with gradle to know where this value is set. Please point me to the file I should change, or alternatively feel free to just make the change.

@Brianhedgecock

This comment has been minimized.

@mbooth101
Copy link
Author

mbooth101 commented Dec 6, 2018

Hmm, so I cloned the source and tried to find where this license URL is set, but the only result I get when grepping the source is the readme file:

$ grep -r "mockito/blob/master/LICENSE"
README.md:[![Build Status](https://travis-ci.org/mockito/mockito.svg?branch=release/2.x)](https://travis-ci.org/mockito/mockito) [![Coverage Status](https://img.shields.io/codecov/c/github/mockito/mockito.svg)](https://codecov.io/github/mockito/mockito) [![MIT License](http://img.shields.io/badge/license-MIT-green.svg) ](https://github.com/mockito/mockito/blob/master/LICENSE)

@mockitoguy, any clues?

@TimvdLippe
Copy link
Contributor

@mbooth101 This appears to be hard-coded at https://github.com/mockito/shipkit/blob/3a72e631874f245a837bb7396f382f3b4bac948d/subprojects/shipkit/src/main/groovy/org/shipkit/internal/gradle/util/PomCustomizer.java#L78-L81 Shipkit probably needs to be updated to either the new value, or allow it to be configured.

@dpursehouse
Copy link

This project doesn't seem to have a master branch any more, so the link in pom.xml results in 404 regardless of whether it's the raw URL or not.

@TimvdLippe
Copy link
Contributor

@dpursehouse Good catch! Do you mind updating Shipkit to allow us to specify a different license location and then update Mockito with a Shipkit upgrade + configuration change?

@dpursehouse
Copy link

@TimvdLippe Sorry, I don't have time to look into that :(

@TimvdLippe
Copy link
Contributor

If this is still necessary, we now configure it here:

url = 'https://github.com/mockito/mockito/blob/main/LICENSE'

@mbooth101
Copy link
Author

It's been 4 years, I don't recall if this is still needed. Feel free to close.

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

5 participants