Class 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

      Fields 
      Modifier and Type Field Description
      private org.apache.maven.project.MavenProject project
      The Maven project to analyze.
      private boolean skip
      Skip plugin execution completely.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      private java.util.Set<java.lang.String> findDuplicateDependencies​(java.util.List<org.apache.maven.model.Dependency> modelDependencies)  
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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.
    • Constructor Detail

      • AnalyzeDuplicateMojo

        public AnalyzeDuplicateMojo()
    • 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
      • findDuplicateDependencies

        private java.util.Set<java.lang.String> findDuplicateDependencies​(java.util.List<org.apache.maven.model.Dependency> modelDependencies)