Class CheckSignatureRule
java.lang.Object
org.codehaus.mojo.animal_sniffer.enforcer.CheckSignatureRule
- All Implemented Interfaces:
org.apache.maven.enforcer.rule.api.EnforcerRule
public class CheckSignatureRule
extends Object
implements org.apache.maven.enforcer.rule.api.EnforcerRule
Created by IntelliJ IDEA.
- Since:
- Sep 4, 2009 2:44:29 PM
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]Annotation names to consider to ignore annotated methods, classes or fields.private booleanShould test classes be checked.private String[]A list of artifact patterns to exclude.protected booleanShould dependencies be ignored.protected String[]Class names to ignore signatures for (wildcards accepted).private String[]A list of artifact patterns to include.protected SignatureSignature module to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapply(ClassFileVisitor v, File outputDirectory, File testOutputDirectory, org.apache.maven.project.MavenProject project, Logger logger) private static StringartifactId(org.apache.maven.artifact.Artifact artifact) buildPackageList(File outputDirectory, File testOutputDirectory, org.apache.maven.project.MavenProject project, Logger logger) List of packages defined in the application.buildSourcePathList(org.apache.maven.project.MavenProject project) voidexecute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper) private static org.apache.maven.model.DependencyfindMatchingDependency(Signature signature, List<org.apache.maven.model.Dependency> dependencies) booleanbooleanisResultValid(org.apache.maven.enforcer.rule.api.EnforcerRule enforcerRule)
-
Field Details
-
signature
Signature module to use. //required //parameter -
ignores
Class names to ignore signatures for (wildcards accepted). //parameter -
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. //parameter
-
ignoreDependencies
protected boolean ignoreDependenciesShould dependencies be ignored. //parameter default-value="true" -
includeDependencies
A list of artifact patterns to include. Patterns can include*as a wildcard match for any whole segment, valid patterns are:groupId:artifactIdgroupId:artifactId:typegroupId:artifactId:type:versiongroupId:artifactId:type:classifiergroupId:artifactId:type:classifier:version
- Since:
- 1.12
-
excludeDependencies
A list of artifact patterns to exclude. Patterns can include*as a wildcard match for any whole segment, valid patterns are:groupId:artifactIdgroupId:artifactId:typegroupId:artifactId:type:versiongroupId:artifactId:type:classifiergroupId:artifactId:type:classifier:version
- Since:
- 1.12
-
checkTestClasses
private boolean checkTestClassesShould test classes be checked. //parameter default-value="false"- Since:
- 1.19
-
-
Constructor Details
-
CheckSignatureRule
public CheckSignatureRule()
-
-
Method Details
-
execute
public void execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper) throws org.apache.maven.enforcer.rule.api.EnforcerRuleException - Specified by:
executein interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule- Throws:
org.apache.maven.enforcer.rule.api.EnforcerRuleException
-
findMatchingDependency
-
buildPackageList
private Set<String> buildPackageList(File outputDirectory, File testOutputDirectory, org.apache.maven.project.MavenProject project, Logger logger) throws IOException List of packages defined in the application.- Parameters:
outputDirectory-logger-- Throws:
IOException
-
apply
private void apply(ClassFileVisitor v, File outputDirectory, File testOutputDirectory, org.apache.maven.project.MavenProject project, Logger logger) throws IOException - Throws:
IOException
-
isCacheable
public boolean isCacheable()- Specified by:
isCacheablein interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule
-
isResultValid
public boolean isResultValid(org.apache.maven.enforcer.rule.api.EnforcerRule enforcerRule) - Specified by:
isResultValidin interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule
-
getCacheId
- Specified by:
getCacheIdin interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule
-
artifactId
-
buildSourcePathList
-