public class ScopeArtifactFilter extends Object implements ArtifactFilter, StatisticsReportingArtifactFilter
ArtifactFilter
implementation that selects artifacts based on their scopes.
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMissedCriteria() |
boolean |
include(Artifact artifact) |
boolean |
isIncludeCompileScope() |
boolean |
isIncludeProvidedScope() |
boolean |
isIncludeRuntimeScope() |
boolean |
isIncludeSystemScope() |
boolean |
isIncludeTestScope() |
void |
reportFilteredArtifacts(org.codehaus.plexus.logging.Logger logger) |
void |
reportMissedCriteria(org.codehaus.plexus.logging.Logger logger) |
ScopeArtifactFilter |
reset()
Reset hit counts and tracking of filtered artifacts, BUT NOT ENABLED SCOPES.
|
ScopeArtifactFilter |
setIncludeCompileScope(boolean pIncludeCompileScope) |
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 pIncludeProvidedScope) |
ScopeArtifactFilter |
setIncludeRuntimeScope(boolean pIncludeRuntimeScope) |
ScopeArtifactFilter |
setIncludeRuntimeScopeWithImplications(boolean enabled)
Manages the following scopes:
compile
runtime
|
ScopeArtifactFilter |
setIncludeSystemScope(boolean pIncludeSystemScope) |
ScopeArtifactFilter |
setIncludeTestScope(boolean pIncludeTestScope) |
ScopeArtifactFilter |
setIncludeTestScopeWithImplications(boolean enabled)
Manages the following scopes:
system
provided
compile
runtime
test
|
String |
toString() |
public ScopeArtifactFilter()
public ScopeArtifactFilter(String scope)
scope
- the scopepublic boolean include(Artifact artifact)
include
in interface ArtifactFilter
public String toString()
public void reportFilteredArtifacts(org.codehaus.plexus.logging.Logger logger)
reportFilteredArtifacts
in interface StatisticsReportingArtifactFilter
logger
- The logger.public void reportMissedCriteria(org.codehaus.plexus.logging.Logger logger)
reportMissedCriteria
in interface StatisticsReportingArtifactFilter
logger
- The logger.public boolean hasMissedCriteria()
hasMissedCriteria
in interface StatisticsReportingArtifactFilter
true
if missed cireteria false
otherwise.public boolean isIncludeCompileScope()
includeCompileScope
public ScopeArtifactFilter setIncludeCompileScope(boolean pIncludeCompileScope)
pIncludeCompileScope
- true/false.ScopeArtifactFilter
public boolean isIncludeRuntimeScope()
includeRuntimeScope
public ScopeArtifactFilter setIncludeRuntimeScope(boolean pIncludeRuntimeScope)
pIncludeRuntimeScope
- true/falseScopeArtifactFilter
public boolean isIncludeTestScope()
includeTestScope
public ScopeArtifactFilter setIncludeTestScope(boolean pIncludeTestScope)
pIncludeTestScope
- includeTestScope
ScopeArtifactFilter
public boolean isIncludeProvidedScope()
includeProvidedScope
public ScopeArtifactFilter setIncludeProvidedScope(boolean pIncludeProvidedScope)
pIncludeProvidedScope
- yes/no.ScopeArtifactFilter()
public boolean isIncludeSystemScope()
includeSystemScope
public ScopeArtifactFilter setIncludeSystemScope(boolean pIncludeSystemScope)
public ScopeArtifactFilter setIncludeCompileScopeWithImplications(boolean enabled)
enabled
- whether specified scopes should be includedpublic ScopeArtifactFilter setIncludeRuntimeScopeWithImplications(boolean enabled)
enabled
- whether specified scopes should be includedpublic ScopeArtifactFilter setIncludeTestScopeWithImplications(boolean enabled)
enabled
- whether specified scopes should be includedpublic ScopeArtifactFilter setIncludeNullScope(boolean enable)
enable
- whether null-scope should be includedpublic ScopeArtifactFilter reset()
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.