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
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)
filter.
|
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 builtpublic Set<org.apache.maven.artifact.Artifact> filter(Set<org.apache.maven.artifact.Artifact> artifacts)
filter.
artifacts - Artifactpublic boolean artifactIsATransitiveDependency(org.apache.maven.artifact.Artifact artifact)
artifact - representing the item to compare.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.