Class LicenseVerifierMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- se.ayoy.maven.plugins.licenseverifier.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.AbstractMojoValidate the licenses against a list of known good.
-
-
Constructor Summary
Constructors Constructor Description LicenseVerifierMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Execute the plugin.voidsetCheckTransitiveDependencies(String checkTransitiveDependencies)voidsetExcludedMissingLicensesFile(String excludedMissingLicensesFile)voidsetFailOnForbidden(String failOnForbidden)voidsetFailOnMissing(String failOnMissing)voidsetFailOnUnknown(String failOnUnknown)voidsetFailOnWarning(String failOnWarning)voidsetLicenseFile(String licenseFile)voidsetRequireAllValid(String requireAllValid)voidsetVerbose(String verbose)protected booleanshouldArtifactBeIncluded(org.apache.maven.artifact.Artifact a, ExcludedMissingLicenseFile excludedArtifacts)Check if an artifact should be included in lists.protected booleanshouldCheckTransitiveDependencies()
-
-
-
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.MojoExecutionExceptionExecute 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)
-
-