Class BundledLicenseTexts

java.lang.Object
org.codehaus.mojo.license.download.BundledLicenseTexts

public final class BundledLicenseTexts extends Object
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
  • Field Details

  • Method Details

    • getDefault

      public static BundledLicenseTexts 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 replacements
      mode - which kinds of URLs may be answered from a bundled text
      Returns:
      the entry, or null if the URL is not in the table or mode does not admit its kind