This repository has been archived by the owner on Jan 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Make license used for pom configurable #760
Open
epeee
wants to merge
1
commit into
master
Choose a base branch
from
ep
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ public class ShipkitConfiguration { | |
private final GitHub gitHub = new GitHub(); | ||
private final Javadoc javadoc = new Javadoc(); | ||
private final ReleaseNotes releaseNotes = new ReleaseNotes(); | ||
private final LicenseInfo licenseInfo = new LicenseInfo(); | ||
private final Git git = new Git(); | ||
private final Team team = new Team(); | ||
|
||
|
@@ -95,6 +96,10 @@ public ReleaseNotes getReleaseNotes() { | |
return releaseNotes; | ||
} | ||
|
||
public LicenseInfo getLicenseInfo() { | ||
return licenseInfo; | ||
} | ||
|
||
public Git getGit() { | ||
return git; | ||
} | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. what about |
||
public String getLicense() { | ||
return store.getString("licenseInfo.license"); | ||
} | ||
|
||
public void setLicense(String license) { | ||
store.put("licenseInfo.license", license); | ||
} | ||
|
||
public String getUrl() { | ||
return store.getString("licenseInfo.url"); | ||
} | ||
|
||
public void setUrl(String url) { | ||
store.put("licenseInfo.url", url); | ||
} | ||
} | ||
|
||
public class Javadoc { | ||
/** | ||
* GitHub Javadoc repository name, for example: "mockito/shipkit-javadoc". | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 commentThe 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. |
||
license.appendNode("url", conf.getLicenseInfo().getUrl()); | ||
license.appendNode("distribution", "repo"); | ||
|
||
root.appendNode("scm").appendNode("url", repoLink + ".git"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?