Class AnalyzeDuplicateMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.dependency.analyze.AnalyzeDuplicateMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="analyze-duplicate",
aggregator=false,
threadSafe=true)
public class AnalyzeDuplicateMojo
extends org.apache.maven.plugin.AbstractMojo
Analyzes the
<dependencies/>
and <dependencyManagement/>
tags in the
pom.xml
and determines the duplicate declared dependencies.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
private org.apache.maven.project.MavenProject
The Maven project to analyze.private boolean
Skip plugin execution completely.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
createMessage
(Set<String> duplicateDependencies, StringBuilder sb, String messageDuplicateDepInDependencies) void
execute()
findDuplicateDependencies
(List<org.apache.maven.model.Dependency> modelDependencies) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
MESSAGE_DUPLICATE_DEP_IN_DEPENDENCIES
- See Also:
-
MESSAGE_DUPLICATE_DEP_IN_DEPMGMT
- See Also:
-
skip
@Parameter(property="mdep.analyze.skip", defaultValue="false") private boolean skipSkip plugin execution completely.- Since:
- 2.7
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) private org.apache.maven.project.MavenProject projectThe Maven project to analyze.
-
-
Constructor Details
-
AnalyzeDuplicateMojo
public AnalyzeDuplicateMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
createMessage
private void createMessage(Set<String> duplicateDependencies, StringBuilder sb, String messageDuplicateDepInDependencies) -
findDuplicateDependencies
-