Class 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.
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • 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
        //parameter
        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
        //parameter
        Since:
        1.12
      • checkTestClasses

        private boolean checkTestClasses
        Should test classes be checked. //parameter default-value="false"
        Since:
        1.19
    • Constructor Detail

      • CheckSignatureRule

        public CheckSignatureRule()
    • 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 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,
                                                                                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 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 java.lang.String getCacheId()
        Specified by:
        getCacheId in interface org.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)