Class CumulativeScopeArtifactFilter

java.lang.Object
org.apache.maven.shared.artifact.resolver.CumulativeScopeArtifactFilter
All Implemented Interfaces:
org.apache.maven.artifact.resolver.filter.ArtifactFilter

final class CumulativeScopeArtifactFilter extends Object implements org.apache.maven.artifact.resolver.filter.ArtifactFilter
Filter to only retain objects in the given scope or better. This implementation allows the accumulation of multiple scopes and their associated implied scopes, so that the user can filter apply a series of implication rules in a single step. This should be a more efficient implementation of multiple standard ScopeArtifactFilter instances ORed together.
Version:
$Id$
  • Field Details

    • compileScope

      private boolean compileScope
    • runtimeScope

      private boolean runtimeScope
    • testScope

      private boolean testScope
    • providedScope

      private boolean providedScope
    • systemScope

      private boolean systemScope
  • Constructor Details

    • CumulativeScopeArtifactFilter

      CumulativeScopeArtifactFilter()
      Create a new filter with all scopes disabled.
    • CumulativeScopeArtifactFilter

      CumulativeScopeArtifactFilter(String scope)
      Create a new filter with the specified scope and its implied scopes enabled.
      Parameters:
      scope - The scope to enable, along with all implied scopes.
    • CumulativeScopeArtifactFilter

      CumulativeScopeArtifactFilter(Collection<String> scopes)
      Create a new filter with the specified scopes and their implied scopes enabled.
      Parameters:
      scopes - The scopes to enable, along with all implied scopes, may be null.
  • Method Details

    • addScope

      void addScope(String scope)
      Enable a new scope, along with its implied scopes, in this filter.
      Parameters:
      scope - The scope to enable, along with all implied scopes.
    • include

      public boolean include(org.apache.maven.artifact.Artifact artifact)
      Specified by:
      include in interface org.apache.maven.artifact.resolver.filter.ArtifactFilter