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 java.lang.Object implements org.apache.maven.enforcer.rule.api.EnforcerRule
Created by IntelliJ IDEA.- Since:
- Sep 4, 2009 2:44:29 PM
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]
annotations
Annotation names to consider to ignore annotated methods, classes or fields.private boolean
checkTestClasses
Should test classes be checked.private java.lang.String[]
excludeDependencies
A list of artifact patterns to exclude.protected boolean
ignoreDependencies
Should dependencies be ignored.protected java.lang.String[]
ignores
Class names to ignore signatures for (wildcards accepted).private java.lang.String[]
includeDependencies
A list of artifact patterns to include.protected Signature
signature
Signature module to use.
-
Constructor Summary
Constructors Constructor Description CheckSignatureRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
apply(ClassFileVisitor v, java.io.File outputDirectory, java.io.File testOutputDirectory, org.apache.maven.project.MavenProject project, Logger logger)
private static java.lang.String
artifactId(org.apache.maven.artifact.Artifact artifact)
private java.util.Set<java.lang.String>
buildPackageList(java.io.File outputDirectory, java.io.File testOutputDirectory, org.apache.maven.project.MavenProject project, Logger logger)
List of packages defined in the application.private java.util.List<java.io.File>
buildSourcePathList(org.apache.maven.project.MavenProject project)
void
execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper)
private static org.apache.maven.model.Dependency
findMatchingDependency(Signature signature, java.util.List<org.apache.maven.model.Dependency> dependencies)
java.lang.String
getCacheId()
boolean
isCacheable()
boolean
isResultValid(org.apache.maven.enforcer.rule.api.EnforcerRule enforcerRule)
-
-
-
Field Detail
-
signature
protected Signature signature
Signature module to use. //required //parameter
-
ignores
protected java.lang.String[] ignores
Class names to ignore signatures for (wildcards accepted). //parameter
-
annotations
protected java.lang.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. //parameter
-
ignoreDependencies
protected boolean ignoreDependencies
Should dependencies be ignored. //parameter default-value="true"
-
includeDependencies
private java.lang.String[] includeDependencies
A list of artifact patterns to include. Patterns can include*
as a wildcard match for any whole segment, valid patterns are:groupId:artifactId
groupId:artifactId:type
groupId:artifactId:type:version
groupId:artifactId:type:classifier
groupId:artifactId:type:classifier:version
- Since:
- 1.12
-
excludeDependencies
private java.lang.String[] excludeDependencies
A list of artifact patterns to exclude. Patterns can include*
as a wildcard match for any whole segment, valid patterns are:groupId:artifactId
groupId:artifactId:type
groupId:artifactId:type:version
groupId:artifactId:type:classifier
groupId:artifactId:type:classifier:version
- Since:
- 1.12
-
checkTestClasses
private boolean checkTestClasses
Should test classes be checked. //parameter default-value="false"- Since:
- 1.19
-
-
Method Detail
-
execute
public void execute(org.apache.maven.enforcer.rule.api.EnforcerRuleHelper helper) throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
- Specified by:
execute
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule
- Throws:
org.apache.maven.enforcer.rule.api.EnforcerRuleException
-
findMatchingDependency
private static org.apache.maven.model.Dependency findMatchingDependency(Signature signature, java.util.List<org.apache.maven.model.Dependency> dependencies)
-
buildPackageList
private java.util.Set<java.lang.String> buildPackageList(java.io.File outputDirectory, java.io.File testOutputDirectory, org.apache.maven.project.MavenProject project, Logger logger) throws java.io.IOException
List of packages defined in the application.- Parameters:
outputDirectory
-logger
-- Throws:
java.io.IOException
-
apply
private void apply(ClassFileVisitor v, java.io.File outputDirectory, java.io.File testOutputDirectory, org.apache.maven.project.MavenProject project, Logger logger) throws java.io.IOException
- Throws:
java.io.IOException
-
isCacheable
public boolean isCacheable()
- Specified by:
isCacheable
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule
-
isResultValid
public boolean isResultValid(org.apache.maven.enforcer.rule.api.EnforcerRule enforcerRule)
- Specified by:
isResultValid
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule
-
getCacheId
public java.lang.String getCacheId()
- Specified by:
getCacheId
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRule
-
artifactId
private static java.lang.String artifactId(org.apache.maven.artifact.Artifact artifact)
-
buildSourcePathList
private java.util.List<java.io.File> buildSourcePathList(org.apache.maven.project.MavenProject project)
-
-