Repository navigation
Write well-known licenses from bundled texts instead of downloading them - #781
Merged
Merged
Conversation
Maps exact well-known license URLs to the texts the plugin already ships, so that the download goals can answer them without a request.
Plain text URLs of the GNU, Apache and Eclipse licenses are served from the plugin by default, which relieves the license hosts (#626). HTML page URLs need license.useBundledLicenseTexts=all because the file name, content and sha1 change. license.useBundledLicenseTexts=none restores downloading.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Plain-text URLs of the GNU, Apache and Eclipse licenses are now written from the texts the plugin already ships in
META-INF/licenses, with no request to the license host (#626). The table inbundled-license-urls.propertiesis curated: each URL was fetched once and compared with the bundled text.license.useBundledLicenseTexts:text(default) serves exact.txtURLs (and Apache's extensionlessLICENSE-2.0, which is served astext/plain);allalso serves the HTML pages, whose file name, content and sha1 then change, so it is opt-in;nonedownloads everything as before.licenseUrlFileNamessha1 the bundled text does not match, URLs underserverUrlwith credentials, and anything after alicenseUrlReplacementsrewrite to another host.Verified:
mvn -B verify -Prun-itsβ 100 ITs pass, including two new ones that route the license hosts through WireMock and see no request for.txtURLs (one for the HTML URL unlessallis set); 17 new unit tests.