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 Details

    • signature

      protected Signature signature
      Signature module to use. //required //parameter
    • ignores

      protected String[] ignores
      Class names to ignore signatures for (wildcards accepted). //parameter
    • annotations

      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. //parameter

      See Also:
    • ignoreDependencies

      protected boolean ignoreDependencies
      Should dependencies be ignored. //parameter default-value="true"
    • includeDependencies

      private 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
      //parameter
      Since:
      1.12
    • excludeDependencies

      private 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
      //parameter
      Since:
      1.12
    • checkTestClasses

      private boolean checkTestClasses
      Should 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:
      execute in interface org.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, List<org.apache.maven.model.Dependency> dependencies)
    • 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:
      isCacheable in interface org.apache.maven.enforcer.rule.api.EnforcerRule
    • isResultValid

      public boolean isResultValid(org.apache.maven.enforcer.rule.api.EnforcerRule enforcerRule)
      Specified by:
      isResultValid in interface org.apache.maven.enforcer.rule.api.EnforcerRule
    • getCacheId

      public String getCacheId()
      Specified by:
      getCacheId in interface org.apache.maven.enforcer.rule.api.EnforcerRule
    • artifactId

      private static String artifactId(org.apache.maven.artifact.Artifact artifact)
    • buildSourcePathList

      private List<File> buildSourcePathList(org.apache.maven.project.MavenProject project)