Class BanDuplicateClasses

java.lang.Object
org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
org.codehaus.mojo.extraenforcer.dependencies.BanDuplicateClasses
All Implemented Interfaces:
org.apache.maven.enforcer.rule.api.EnforcerRuleBase

@Named("banDuplicateClasses") public class BanDuplicateClasses extends org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
Bans duplicate classes on the classpath.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    BanDuplicateClasses(org.apache.maven.execution.MavenSession session, org.eclipse.aether.RepositorySystem repositorySystem)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static String
    asRegex(String wildcard)
    Convert a wildcard into a regex.
    void
     
    org.apache.maven.enforcer.rule.api.EnforcerLogger
     
    protected void
    handleArtifacts(Set<org.apache.maven.artifact.Artifact> artifacts)
     
    void
    setLog(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0)
     

    Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule

    getCacheId, getLevel

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BanDuplicateClasses

      @Inject protected BanDuplicateClasses(org.apache.maven.execution.MavenSession session, org.eclipse.aether.RepositorySystem repositorySystem)
  • Method Details

    • handleArtifacts

      protected void handleArtifacts(Set<org.apache.maven.artifact.Artifact> artifacts) throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
      Throws:
      org.apache.maven.enforcer.rule.api.EnforcerRuleException
    • execute

      public void execute() throws org.apache.maven.enforcer.rule.api.EnforcerRuleException
      Specified by:
      execute in class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
      Throws:
      org.apache.maven.enforcer.rule.api.EnforcerRuleException
    • asRegex

      protected static String asRegex(String wildcard)
      Convert a wildcard into a regex.
      Parameters:
      wildcard - the wildcard to convert.
      Returns:
      the equivalent regex.
    • setLog

      public void setLog(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0)
      Specified by:
      setLog in interface org.apache.maven.enforcer.rule.api.EnforcerRuleBase
    • getLog

      public org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()