Class LicenseVerifierMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="verify")
    public class LicenseVerifierMojo
    extends org.apache.maven.plugin.AbstractMojo
    Validate the licenses against a list of known good.
    • Constructor Detail

      • LicenseVerifierMojo

        public LicenseVerifierMojo()
    • Method Detail

      • setLicenseFile

        public void setLicenseFile​(String licenseFile)
      • setExcludedMissingLicensesFile

        public void setExcludedMissingLicensesFile​(String excludedMissingLicensesFile)
      • setFailOnForbidden

        public void setFailOnForbidden​(String failOnForbidden)
      • setFailOnMissing

        public void setFailOnMissing​(String failOnMissing)
      • setFailOnWarning

        public void setFailOnWarning​(String failOnWarning)
      • setFailOnUnknown

        public void setFailOnUnknown​(String failOnUnknown)
      • setRequireAllValid

        public void setRequireAllValid​(String requireAllValid)
      • setCheckTransitiveDependencies

        public void setCheckTransitiveDependencies​(String checkTransitiveDependencies)
      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Execute the plugin.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - if anything goes south, the thrown exception is always MojoExecutionException.
      • shouldCheckTransitiveDependencies

        protected boolean shouldCheckTransitiveDependencies()
      • shouldArtifactBeIncluded

        protected boolean shouldArtifactBeIncluded​(org.apache.maven.artifact.Artifact a,
                                                   ExcludedMissingLicenseFile excludedArtifacts)
        Check if an artifact should be included in lists.
        Parameters:
        a - the artifact.
        excludedArtifacts - the list of excluded artifacts.
        Returns:
        true if included.
      • setVerbose

        public void setVerbose​(String verbose)