ArtifactsFilterpublic class ArtifactTransitivityFilter extends AbstractArtifactsFilter
| Constructor | Description |
|---|---|
ArtifactTransitivityFilter(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.project.ProjectBuildingRequest buildingRequest,
org.apache.maven.project.ProjectBuilder projectBuilder) |
Use
MavenSession.getProjectBuildingRequest() to get the buildingRequest. |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
artifactIsATransitiveDependency(org.apache.maven.artifact.Artifact artifact) |
Compares the artifact to the list of dependencies to see if it is directly included by this project
|
java.util.Set<org.apache.maven.artifact.Artifact> |
filter(java.util.Set<org.apache.maven.artifact.Artifact> artifacts) |
|
protected static boolean |
isMaven31() |
isArtifactIncludedpublic ArtifactTransitivityFilter(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.project.ProjectBuildingRequest buildingRequest,
org.apache.maven.project.ProjectBuilder projectBuilder)
throws org.apache.maven.project.ProjectBuildingException
Use MavenSession.getProjectBuildingRequest() to get the buildingRequest.
The projectBuilder should be resolved with CDI.
// For Mojo @Component private ProjectBuilder projectBuilder; // For Components @Requirement // or @Inject private ProjectBuilder projectBuilder;
artifact - the artifact to resolve the dependencies frombuildingRequest - the buildingRequestprojectBuilder - the projectBuilderorg.apache.maven.project.ProjectBuildingException - if the project descriptor could not be successfully builtprotected static boolean isMaven31()
public java.util.Set<org.apache.maven.artifact.Artifact> filter(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)
artifacts - Artifactpublic boolean artifactIsATransitiveDependency(org.apache.maven.artifact.Artifact artifact)
artifact - representing the item to compare.Copyright © 2018. All rights reserved.