public class ArtifactTransitivityFilter extends AbstractArtifactsFilter
| Constructor and Description |
|---|
ArtifactTransitivityFilter(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.project.ProjectBuildingRequest buildingRequest,
org.apache.maven.project.ProjectBuilder projectBuilder)
Use
org.apache.maven.execution.MavenSession#getProjectBuildingRequest() to get the buildingRequest. |
| Modifier and Type | Method and 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
|
Set<org.apache.maven.artifact.Artifact> |
filter(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 org.apache.maven.execution.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 Set<org.apache.maven.artifact.Artifact> filter(Set<org.apache.maven.artifact.Artifact> artifacts)
artifacts - Artifactpublic boolean artifactIsATransitiveDependency(org.apache.maven.artifact.Artifact artifact)
artifact - representing the item to compare.Copyright © 2002–2019 The Apache Software Foundation. All rights reserved.