-
Notifications
You must be signed in to change notification settings - Fork 35
Make license used for pom configurable #760
base: master
Are you sure you want to change the base?
Conversation
@epeee Maybe you can read somehow Bintray plugin property to avoid duplication? |
Any updates on this one? |
Bump? |
Looking at it. I met @epeee at CodeOne conference and he mentioned that his PR needs bump. @jpkrohling, sorry for slow turnaround! I'm on it. |
Hey @epeee, I will review and provide my feedback shortly. In the meantime, I commented on the ticket so that @jpkrohling is unblocked and can customize the pom. |
I found a hack how to get license info from bintray configuration. @epeee @mockitoguy WDYT?
|
Please no :) That's a lot of complexity for little benefit. |
It's a simple reflection ;-) But as you wish! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. Let's update the defaults and ship it.
@@ -76,8 +76,8 @@ static void customizePom(Node root, ShipkitConfiguration conf, | |||
} | |||
|
|||
Node license = root.appendNode("licenses").appendNode("license"); | |||
license.appendNode("name", "The MIT License"); | |||
license.appendNode("url", repoLink + "/blob/master/LICENSE"); | |||
license.appendNode("name", conf.getLicenseInfo().getLicense()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add defaults, Apache 2.0 and blob/master/LICENSE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, good feedback, thx!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Let me know when you're ready.
MIT is 30y old and lawyers no longer like it. Let's default to Apache 2.0.
Once we merge it, can we get the license value populated to the Bintray extension, too? Thanks!!! Nice change! |
Before merging, we need to add defaults (as my comment) or make it "lenient". I suggest to add defaults because it is simpler and more useful. Then we can merge :) Let me know when you're ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my and Szczepan's comments. For me, it's not ready yet.
@@ -231,6 +236,24 @@ public void setWriteAuthToken(String writeAuthToken) { | |||
} | |||
} | |||
|
|||
public class LicenseInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about distribution
property in pom?
@@ -95,6 +96,10 @@ public ReleaseNotes getReleaseNotes() { | |||
return releaseNotes; | |||
} | |||
|
|||
public LicenseInfo getLicenseInfo() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to now configure a few licenses? E.g. one open source and one commercial?
Very first draft (#755).
This pr extends shipkit configuration in a way that we have to configure the license used (incl url now).
This will end up in a pom like
The downside of this approach is that we still have to configure the license used by gradle bintray plugin, e.g.:
We could add this one also to shipkit config and do the configuration in our gradle plugin. As a result we'd have the license config in one place.
Note: this is a breaking change and will cause builds without a shipkit.licenseInfo configuration to fail: