public class ScopeArtifactFilter extends java.lang.Object implements org.apache.maven.artifact.resolver.filter.ArtifactFilter, StatisticsReportingArtifactFilter
ArtifactFilter
implementation that selects artifacts based on their scopes.
Modifier and Type | Field and Description |
---|---|
private boolean |
compileScopeHit |
private java.util.List<java.lang.String> |
filteredArtifactIds |
private boolean |
includeCompileScope |
private boolean |
includeNullScope |
private boolean |
includeProvidedScope |
private boolean |
includeRuntimeScope |
private boolean |
includeSystemScope |
private boolean |
includeTestScope |
private boolean |
nullScopeHit |
private boolean |
providedScopeHit |
private boolean |
runtimeScopeHit |
private boolean |
systemScopeHit |
private boolean |
testScopeHit |
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(java.lang.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(org.apache.maven.artifact.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
|
java.lang.String |
toString() |
private boolean includeCompileScope
private boolean includeRuntimeScope
private boolean includeTestScope
private boolean includeProvidedScope
private boolean includeSystemScope
private boolean includeNullScope
private boolean nullScopeHit
private boolean compileScopeHit
private boolean runtimeScopeHit
private boolean testScopeHit
private boolean providedScopeHit
private boolean systemScopeHit
private java.util.List<java.lang.String> filteredArtifactIds
public ScopeArtifactFilter()
public ScopeArtifactFilter(java.lang.String scope)
scope
- the scopepublic boolean include(org.apache.maven.artifact.Artifact artifact)
include
in interface org.apache.maven.artifact.resolver.filter.ArtifactFilter
public java.lang.String toString()
toString
in class java.lang.Object
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()