org.apache.maven.shared.artifact.filter
Class ScopeArtifactFilter

java.lang.Object
  extended by org.apache.maven.shared.artifact.filter.ScopeArtifactFilter
All Implemented Interfaces:
ArtifactFilter, StatisticsReportingArtifactFilter

public class ScopeArtifactFilter
extends Object
implements ArtifactFilter, StatisticsReportingArtifactFilter

ArtifactFilter implementation that selects artifacts based on their scopes.
NOTE: None of the fine-grained scopes imply other scopes when enabled; when fine-grained scope control is used, each scope must be enabled separately, UNLESS the corresponding XXXWithImplications() method is used to enable that scope.


Constructor Summary
ScopeArtifactFilter()
          Constructor that is meant to be used with fine-grained manipulation to enable/disable specific scopes using the associated mutator methods.
ScopeArtifactFilter(String scope)
          Constructor that uses the implied nature of Maven scopes to determine which artifacts to include.
 
Method Summary
 boolean hasMissedCriteria()
           
 boolean include(Artifact artifact)
           
 boolean isIncludeCompileScope()
           
 boolean isIncludeProvidedScope()
           
 boolean isIncludeRuntimeScope()
           
 boolean isIncludeSystemScope()
           
 boolean isIncludeTestScope()
           
 void reportFilteredArtifacts(Logger logger)
           
 void reportMissedCriteria(Logger logger)
           
 ScopeArtifactFilter reset()
          Reset hit counts and tracking of filtered artifacts, BUT NOT ENABLED SCOPES.
 ScopeArtifactFilter setIncludeCompileScope(boolean includeCompileScope)
           
 ScopeArtifactFilter setIncludeCompileScopeWithImplications(boolean enabled)
          Manages the following scopes: system provided compile
 ScopeArtifactFilter setIncludeNullScope(boolean enable)
          Determine whether artifacts that have a null scope are included or excluded.
 ScopeArtifactFilter setIncludeProvidedScope(boolean includeProvidedScope)
           
 ScopeArtifactFilter setIncludeRuntimeScope(boolean includeRuntimeScope)
           
 ScopeArtifactFilter setIncludeRuntimeScopeWithImplications(boolean enabled)
          Manages the following scopes: compile runtime
 ScopeArtifactFilter setIncludeSystemScope(boolean includeSystemScope)
           
 ScopeArtifactFilter setIncludeTestScope(boolean includeTestScope)
           
 ScopeArtifactFilter setIncludeTestScopeWithImplications(boolean enabled)
          Manages the following scopes: system provided compile runtime test
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScopeArtifactFilter

public ScopeArtifactFilter()
Constructor that is meant to be used with fine-grained manipulation to enable/disable specific scopes using the associated mutator methods.


ScopeArtifactFilter

public ScopeArtifactFilter(String scope)
Constructor that uses the implied nature of Maven scopes to determine which artifacts to include. For instance, 'test' scope implies compile, provided, and runtime, while 'runtime' scope implies only compile.

Method Detail

include

public boolean include(Artifact artifact)
Specified by:
include in interface ArtifactFilter

toString

public String toString()
Overrides:
toString in class Object

reportFilteredArtifacts

public void reportFilteredArtifacts(Logger logger)
Specified by:
reportFilteredArtifacts in interface StatisticsReportingArtifactFilter

reportMissedCriteria

public void reportMissedCriteria(Logger logger)
Specified by:
reportMissedCriteria in interface StatisticsReportingArtifactFilter

hasMissedCriteria

public boolean hasMissedCriteria()
Specified by:
hasMissedCriteria in interface StatisticsReportingArtifactFilter

isIncludeCompileScope

public boolean isIncludeCompileScope()

setIncludeCompileScope

public ScopeArtifactFilter setIncludeCompileScope(boolean includeCompileScope)

isIncludeRuntimeScope

public boolean isIncludeRuntimeScope()

setIncludeRuntimeScope

public ScopeArtifactFilter setIncludeRuntimeScope(boolean includeRuntimeScope)

isIncludeTestScope

public boolean isIncludeTestScope()

setIncludeTestScope

public ScopeArtifactFilter setIncludeTestScope(boolean includeTestScope)

isIncludeProvidedScope

public boolean isIncludeProvidedScope()

setIncludeProvidedScope

public ScopeArtifactFilter setIncludeProvidedScope(boolean includeProvidedScope)

isIncludeSystemScope

public boolean isIncludeSystemScope()

setIncludeSystemScope

public ScopeArtifactFilter setIncludeSystemScope(boolean includeSystemScope)

setIncludeCompileScopeWithImplications

public ScopeArtifactFilter setIncludeCompileScopeWithImplications(boolean enabled)
Manages the following scopes:


setIncludeRuntimeScopeWithImplications

public ScopeArtifactFilter setIncludeRuntimeScopeWithImplications(boolean enabled)
Manages the following scopes:


setIncludeTestScopeWithImplications

public ScopeArtifactFilter setIncludeTestScopeWithImplications(boolean enabled)
Manages the following scopes:


setIncludeNullScope

public ScopeArtifactFilter setIncludeNullScope(boolean enable)
Determine whether artifacts that have a null scope are included or excluded.


reset

public ScopeArtifactFilter reset()
Reset hit counts and tracking of filtered artifacts, BUT NOT ENABLED SCOPES.



Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.