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 thepom.xml
and determines the duplicate declared dependencies.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MESSAGE_DUPLICATE_DEP_IN_DEPENDENCIES
static java.lang.String
MESSAGE_DUPLICATE_DEP_IN_DEPMGMT
private org.apache.maven.project.MavenProject
project
The Maven project to analyze.private boolean
skip
Skip plugin execution completely.
-
Constructor Summary
Constructors Constructor Description AnalyzeDuplicateMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
createMessage(java.util.Set<java.lang.String> duplicateDependencies, java.lang.StringBuilder sb, java.lang.String messageDuplicateDepInDependencies)
void
execute()
private java.util.Set<java.lang.String>
findDuplicateDependencies(java.util.List<org.apache.maven.model.Dependency> modelDependencies)
-
-
-
Field Detail
-
MESSAGE_DUPLICATE_DEP_IN_DEPENDENCIES
public static final java.lang.String MESSAGE_DUPLICATE_DEP_IN_DEPENDENCIES
- See Also:
- Constant Field Values
-
MESSAGE_DUPLICATE_DEP_IN_DEPMGMT
public static final java.lang.String MESSAGE_DUPLICATE_DEP_IN_DEPMGMT
- See Also:
- Constant Field Values
-
skip
@Parameter(property="mdep.analyze.skip", defaultValue="false") private boolean skip
Skip plugin execution completely.- Since:
- 2.7
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) private org.apache.maven.project.MavenProject project
The Maven project to analyze.
-
-
Method Detail
-
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(java.util.Set<java.lang.String> duplicateDependencies, java.lang.StringBuilder sb, java.lang.String messageDuplicateDepInDependencies)
-
findDuplicateDependencies
private java.util.Set<java.lang.String> findDuplicateDependencies(java.util.List<org.apache.maven.model.Dependency> modelDependencies)
-
-