Class CheckSignatureMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.animal_sniffer.maven.CheckSignatureMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="check", defaultPhase=PROCESS_TEST_CLASSES, requiresDependencyResolution=TEST, threadSafe=true) public class CheckSignatureMojo extends org.apache.maven.plugin.AbstractMojoChecks the classes compiled by this module.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]annotationsAnnotation names to consider to ignore annotated methods, classes or fields.protected booleancheckTestClassesShould test classes be checked.protected booleanfailOnErrorShould signature check failures throw an error?protected booleanignoreDependenciesShould dependencies be ignored.protected String[]ignoresClass names to ignore signatures for (wildcards accepted).protected FileoutputDirectoryThe directory for compiled classes.protected org.apache.maven.project.MavenProjectprojectprotected SignaturesignatureSignature module to use.protected booleanskipShould signature checking be skipped?protected FiletestOutputDirectoryThe directory for compiled test classes.
-
Constructor Summary
Constructors Constructor Description CheckSignatureMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()voidsetSignature(String signatureId)
-
-
-
Field Detail
-
outputDirectory
@Parameter(defaultValue="${project.build.outputDirectory}", required=true, readonly=true) protected File outputDirectoryThe directory for compiled classes.
-
testOutputDirectory
@Parameter(defaultValue="${project.build.testOutputDirectory}", required=true, readonly=true) protected File testOutputDirectoryThe directory for compiled test classes.- Since:
- 1.19
-
checkTestClasses
@Parameter(property="animal.sniffer.checkTestClasses", defaultValue="false") protected boolean checkTestClassesShould test classes be checked.- Since:
- 1.19
-
signature
@Parameter(required=true, property="animal.sniffer.signature") protected Signature signatureSignature module to use.
-
ignores
@Parameter protected String[] ignores
Class names to ignore signatures for (wildcards accepted).
-
annotations
@Parameter protected String[] annotations
Annotation names to consider to ignore annotated methods, classes or fields.By default 'org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement' and 'org.jvnet.animal_sniffer.IgnoreJRERequirement' are used.
-
ignoreDependencies
@Parameter(defaultValue="true") protected boolean ignoreDependencies
Should dependencies be ignored.
-
skip
@Parameter(defaultValue="false", property="animal.sniffer.skip") protected boolean skipShould signature checking be skipped?
-
failOnError
@Parameter(defaultValue="true", property="animal.sniffer.failOnError") protected boolean failOnErrorShould signature check failures throw an error?
-
project
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
-
-
Method Detail
-
setSignature
public void setSignature(String signatureId)
- Parameters:
signatureId- A fully-qualified path to a signature jar. This allows users to set a signature for command-line invocations, such as:mvn org.codehaus.mojo:animal-sniffer-maven-plugin:1.15:check -Dsignature=org.codehaus.mojo.signature:java17:1.0
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
-