@Mojo(name="analyze-dep-mgt",
requiresDependencyResolution=TEST,
threadSafe=true)
public class AnalyzeDepMgt
extends org.apache.maven.plugin.AbstractMojo
Constructor and Description |
---|
AnalyzeDepMgt() |
Modifier and Type | Method and Description |
---|---|
Map<String,org.apache.maven.model.Exclusion> |
addExclusions(List<org.apache.maven.model.Exclusion> exclusionList)
Returns a map of the exclusions using the Dependency ManagementKey as the
keyset.
|
void |
execute() |
String |
getArtifactManagementKey(org.apache.maven.artifact.Artifact artifact)
This function returns a string comparable with Dependency.GetManagementKey.
|
List<org.apache.maven.artifact.Artifact> |
getExclusionErrors(Map<String,org.apache.maven.model.Exclusion> exclusions,
Set<org.apache.maven.artifact.Artifact> allDependencyArtifacts)
Returns a List of the artifacts that should have been excluded, but were
found in the dependency tree.
|
String |
getExclusionKey(org.apache.maven.artifact.Artifact artifact) |
String |
getExclusionKey(org.apache.maven.model.Exclusion ex) |
Map<org.apache.maven.artifact.Artifact,org.apache.maven.model.Dependency> |
getMismatch(Map<String,org.apache.maven.model.Dependency> depMgtMap,
Set<org.apache.maven.artifact.Artifact> allDependencyArtifacts)
Calculate the mismatches between the DependencyManagement and resolved
artifacts
|
org.apache.maven.project.MavenProject |
getProject() |
boolean |
isFailBuild() |
boolean |
isIgnoreDirect() |
boolean |
isSkip() |
void |
logMismatch(org.apache.maven.artifact.Artifact dependencyArtifact,
org.apache.maven.model.Dependency dependencyFromDepMgt)
This function displays the log to the screen showing the versions and
information about the artifacts that don't match.
|
void |
setFailBuild(boolean theFailBuild) |
void |
setIgnoreDirect(boolean theIgnoreDirect) |
void |
setProject(org.apache.maven.project.MavenProject theProject) |
void |
setSkip(boolean skip) |
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
public Map<String,org.apache.maven.model.Exclusion> addExclusions(List<org.apache.maven.model.Exclusion> exclusionList)
exclusionList
- to be added to the map.public List<org.apache.maven.artifact.Artifact> getExclusionErrors(Map<String,org.apache.maven.model.Exclusion> exclusions, Set<org.apache.maven.artifact.Artifact> allDependencyArtifacts)
exclusions
- a map of the DependencyManagement exclusions, with the
ManagementKey as the key and Dependency as the value.allDependencyArtifacts
- resolved artifacts to be compared.public String getExclusionKey(org.apache.maven.artifact.Artifact artifact)
public String getExclusionKey(org.apache.maven.model.Exclusion ex)
public Map<org.apache.maven.artifact.Artifact,org.apache.maven.model.Dependency> getMismatch(Map<String,org.apache.maven.model.Dependency> depMgtMap, Set<org.apache.maven.artifact.Artifact> allDependencyArtifacts)
depMgtMap
- contains the Dependency.GetManagementKey as the keyset for
quick lookup.allDependencyArtifacts
- contains the set of all artifacts to compare.public void logMismatch(org.apache.maven.artifact.Artifact dependencyArtifact, org.apache.maven.model.Dependency dependencyFromDepMgt) throws org.apache.maven.plugin.MojoExecutionException
dependencyArtifact
- the artifact that was resolved.dependencyFromDepMgt
- the dependency listed in the DependencyManagement section.org.apache.maven.plugin.MojoExecutionException
public String getArtifactManagementKey(org.apache.maven.artifact.Artifact artifact)
artifact
- to gen the key forpublic boolean isFailBuild()
public void setFailBuild(boolean theFailBuild)
theFailBuild
- the failBuild to setpublic org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject theProject)
theProject
- the project to setpublic boolean isIgnoreDirect()
public void setIgnoreDirect(boolean theIgnoreDirect)
theIgnoreDirect
- the ignoreDirect to setpublic boolean isSkip()
public void setSkip(boolean skip)
Copyright © 2002-2015 The Apache Software Foundation. All Rights Reserved.