public class ScopeArtifactFilter extends Object implements org.apache.maven.artifact.resolver.filter.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()
hasMissedCriteria.
|
boolean |
include(org.apache.maven.artifact.Artifact artifact) |
boolean |
isIncludeCompileScope()
isIncludeCompileScope.
|
boolean |
isIncludeProvidedScope()
isIncludeProvidedScope.
|
boolean |
isIncludeRuntimeScope()
isIncludeRuntimeScope.
|
boolean |
isIncludeSystemScope()
isIncludeSystemScope.
|
boolean |
isIncludeTestScope()
isIncludeTestScope.
|
void |
reportFilteredArtifacts(org.slf4j.Logger logger)
reportFilteredArtifacts.
|
void |
reportMissedCriteria(org.slf4j.Logger logger)
reportMissedCriteria.
|
ScopeArtifactFilter |
reset()
Reset hit counts and tracking of filtered artifacts, BUT NOT ENABLED SCOPES.
|
ScopeArtifactFilter |
setIncludeCompileScope(boolean pIncludeCompileScope)
Setter for the field
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 pIncludeProvidedScope)
Setter for the field
includeProvidedScope. |
ScopeArtifactFilter |
setIncludeRuntimeScope(boolean pIncludeRuntimeScope)
Setter for the field
includeRuntimeScope. |
ScopeArtifactFilter |
setIncludeRuntimeScopeWithImplications(boolean enabled)
Manages the following scopes:
compile
runtime
|
ScopeArtifactFilter |
setIncludeSystemScope(boolean pIncludeSystemScope) |
ScopeArtifactFilter |
setIncludeTestScope(boolean pIncludeTestScope)
Setter for the field
includeTestScope. |
ScopeArtifactFilter |
setIncludeTestScopeWithImplications(boolean enabled)
Manages the following scopes:
system
provided
compile
runtime
test
|
String |
toString()
toString.
|
public ScopeArtifactFilter()
public ScopeArtifactFilter(String scope)
scope - the scopepublic boolean include(org.apache.maven.artifact.Artifact artifact)
include in interface org.apache.maven.artifact.resolver.filter.ArtifactFilterpublic String toString()
toString.
public void reportFilteredArtifacts(org.slf4j.Logger logger)
reportFilteredArtifacts.
reportFilteredArtifacts in interface StatisticsReportingArtifactFilterlogger - the loggerpublic void reportMissedCriteria(org.slf4j.Logger logger)
reportMissedCriteria.
reportMissedCriteria in interface StatisticsReportingArtifactFilterlogger - the loggerpublic boolean hasMissedCriteria()
hasMissedCriteria.
hasMissedCriteria in interface StatisticsReportingArtifactFilterpublic boolean isIncludeCompileScope()
isIncludeCompileScope.
includeCompileScopepublic ScopeArtifactFilter setIncludeCompileScope(boolean pIncludeCompileScope)
Setter for the field includeCompileScope.
pIncludeCompileScope - true/false.ScopeArtifactFilterpublic boolean isIncludeRuntimeScope()
isIncludeRuntimeScope.
includeRuntimeScopepublic ScopeArtifactFilter setIncludeRuntimeScope(boolean pIncludeRuntimeScope)
Setter for the field includeRuntimeScope.
pIncludeRuntimeScope - true/falseScopeArtifactFilterpublic boolean isIncludeTestScope()
isIncludeTestScope.
includeTestScopepublic ScopeArtifactFilter setIncludeTestScope(boolean pIncludeTestScope)
Setter for the field includeTestScope.
pIncludeTestScope - includeTestScopeScopeArtifactFilterpublic boolean isIncludeProvidedScope()
isIncludeProvidedScope.
includeProvidedScopepublic ScopeArtifactFilter setIncludeProvidedScope(boolean pIncludeProvidedScope)
Setter for the field includeProvidedScope.
pIncludeProvidedScope - yes/no.ScopeArtifactFilter()public boolean isIncludeSystemScope()
isIncludeSystemScope.
includeSystemScopepublic ScopeArtifactFilter setIncludeSystemScope(boolean pIncludeSystemScope)
pIncludeSystemScope - a boolean.ScopeArtifactFilter object.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–2022 The Apache Software Foundation. All rights reserved.