Class LicenseInfoFile


  • public class LicenseInfoFile
    extends Object
    Represents the file in which licenses are categorized.
    • Constructor Detail

      • LicenseInfoFile

        public LicenseInfoFile​(String filePathString,
                               org.apache.maven.plugin.logging.Log log)
                        throws FileNotFoundException,
                               org.apache.maven.plugin.MojoExecutionException
        Initialize the instance from a file.
        Parameters:
        filePathString - The path to the file.
        log - The log instance to be able to log.
        Throws:
        FileNotFoundException - thrown when the file could not be found.
        org.apache.maven.plugin.MojoExecutionException - thrown when something goes wrong during initialization.
    • Method Detail

      • getLicenseInfo

        public LicenseInfo getLicenseInfo​(String name,
                                          String url)
        Search for a licence using name or url.
        Parameters:
        name - name to search for.
        url - url to search for.
        Returns:
        the found license or null.
      • addLicenseInfo

        public void addLicenseInfo​(LicenseInfo licenseInfo)
        Add a license to the "database".
        Parameters:
        licenseInfo - the license to add.