Class BundledLicenseTexts
java.lang.Object
org.codehaus.mojo.license.download.BundledLicenseTexts
A curated table of well-known license URLs whose content is available as a text bundled with the plugin, so that
the plugin does not have to request them from the license host.
The table is the resource "META-INF/licenses/bundled-license-urls.properties". Every entry maps one exact URL, without scheme and without
a leading www., to a BundledLicenseTexts.Kind and the id of a bundled license, which is the directory name under
META-INF/licenses/. It is a URL to text mapping and not a URL to identity mapping: it says "this URL
serves this document", not "the license of this project is X".
- Since:
- 2.8.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA matched table entry.static enumWhich of the bundled texts replace a download. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfind(String url, BundledLicenseTexts.Mode mode) Finds the bundled text for a URL.static BundledLicenseTexts
-
Field Details
-
TABLE_RESOURCE
-
-
Method Details
-
getDefault
- Returns:
- the table shipped with the plugin
-
find
Finds the bundled text for a URL.- Parameters:
url- the license URL, already rewritten by the configured URL replacementsmode- which kinds of URLs may be answered from a bundled text- Returns:
- the entry, or
nullif the URL is not in the table ormodedoes not admit its kind
-