Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

License is always MIT in the generated POM #755

Open
jpkrohling opened this issue Sep 18, 2018 · 8 comments
Open

License is always MIT in the generated POM #755

jpkrohling opened this issue Sep 18, 2018 · 8 comments
Assignees
Labels

Comments

@jpkrohling
Copy link
Contributor

I just realized that no matter what I add as bintray/pkg/licenses, I always end up with MIT as license in the generated POM:

https://github.com/opentracing-contrib/java-interceptors/blob/v0.0.3/gradle/shipkit.gradle#L22

https://dl.bintray.com/opentracing/maven/io/opentracing/contrib/opentracing-interceptors/0.0.3/opentracing-interceptors-0.0.3.pom

This seems to be the relevant code:

@epeee
Copy link
Contributor

epeee commented Sep 18, 2018

Thank you for reporting this one!
I will work on a fix later on today..

@jpkrohling
Copy link
Contributor Author

I'm currently working on it and will send a PR soon.

@jpkrohling
Copy link
Contributor Author

Unfortunately, it seems that it's more complicated than I initially thought, as the POM customizer belongs to the Shipkit plugin but the licenses information is stored in the Bintray plugin. I'll let the experts fix then :)

@jpkrohling
Copy link
Contributor Author

@epeee, would you be able to provide some insight on the best way to solve this? As this is probably a blocker for us to use it, I'd be willing to give it a shot at fixing it, in case you don't have the time to fix it.

@epeee
Copy link
Contributor

epeee commented Sep 25, 2018

@jpkrohling I already thought about how to fix it and it looks like I will be able to spend some time on this one tomorrow. Sounds good?

@jpkrohling
Copy link
Contributor Author

Sounds good to me :)

@epeee epeee self-assigned this Sep 25, 2018
@epeee epeee added the bug label Sep 25, 2018
mockitoguy pushed a commit to mockito/shipkit-example that referenced this issue Oct 24, 2018
Needed for mockito/shipkit#755

Not intended to be checked in
@mockitoguy
Copy link
Member

Hey guys! I little bit late to the game due to my knee surgery.

@jpkrohling, I've opened a pull request in our example project to demonstrate how you can customize the pom. In general, Shipkit is a set of plugins on top of standard Gradle plugins. You should be able to override any customizations that Shipkit does. We are here to help figuring it out. Check out this PR for complete file: https://github.com/mockito/shipkit-example/pull/198/files

The most important part:

//shipkit.gradle file:
plugins.withId("org.shipkit.java-publish") {
        publishing.publications.javaLibrary.pom.withXml {
            //refer to Groovy xml Node reference for more info how to manipulate xml
            asNode().licenses.replaceNode {
                licenses {
                    license {
                        name "Eclipse Public License v2.0"
                        url "http://www.eclipse.org/legal/epl-v20.html"
                    }
                }
            }
        }
}

Let us know if it works for you!

@jpkrohling
Copy link
Contributor Author

jpkrohling commented Oct 31, 2018

It looks like it does work, thanks!

jverbus added a commit to linkedin/isolation-forest that referenced this issue Aug 13, 2019
sriramvasudevan added a commit to linkedin/LiFT that referenced this issue Sep 9, 2020
The POM license mentions the MIT license, despite linking to LiFT's BSD
2-Clause. The resolution is documented in mockito/shipkit#755.

Also updated the Readme to add the Bintray artifact download badge,
and to indicate the correct jar name.
sriramvasudevan added a commit to linkedin/LiFT that referenced this issue Sep 9, 2020
The POM license mentions the MIT license, despite linking to LiFT's BSD
2-Clause. The resolution is documented in mockito/shipkit#755.

Also updated the Readme to add the Bintray artifact download badge,
and to indicate the correct jar name.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants