fixed up analyze-dep-mgt to detect direct overrides.

git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@519530 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java b/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java
index 1835218..d892189 100644
--- a/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java
+++ b/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java
@@ -28,7 +28,6 @@
 import org.apache.maven.artifact.Artifact;

 import org.apache.maven.artifact.versioning.ArtifactVersion;

 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;

-import org.apache.maven.execution.RuntimeInformation;

 import org.apache.maven.model.Dependency;

 import org.apache.maven.model.DependencyManagement;

 import org.apache.maven.plugin.AbstractMojo;

@@ -79,14 +78,6 @@
      */

     private boolean ignoreDirect = true;

 

-    /**

-     * Used to look up Artifacts in the remote repository.

-     * 

-     * @parameter expression="${component.org.apache.maven.execution.RuntimeInformation}"

-     * @required

-     * @readonly

-     */

-    protected RuntimeInformation rti;

 

     // Mojo methods -----------------------------------------------------------

 

@@ -144,6 +135,7 @@
             // depMgt. That's ok.

             if ( this.ignoreDirect )

             {

+                getLog().info( "\tIgnoring Direct Dependencies." );

                 Set directDependencies = project.getDependencyArtifacts();

                 allDependencies.removeAll( directDependencies );

             }

@@ -233,23 +225,6 @@
     }

 

     /**

-     * @return the rti

-     */

-    public RuntimeInformation getRti()

-    {

-        return this.rti;

-    }

-

-    /**

-     * @param theRti

-     *            the rti to set

-     */

-    public void setRti( RuntimeInformation theRti )

-    {

-        this.rti = theRti;

-    }

-

-    /**

      * @return the ignoreDirect

      */

     public boolean isIgnoreDirect()

diff --git a/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java b/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java
index 55f6254..b6f5165 100644
--- a/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java
+++ b/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java
@@ -23,7 +23,6 @@
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.execution.RuntimeInformation;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -74,15 +73,6 @@
     private ProjectDependencyAnalyzer analyzer;
     
     /**
-     * Used to look up Artifacts in the remote repository.
-     * 
-     * @parameter expression="${component.org.apache.maven.execution.RuntimeInformation}"
-     * @required
-     * @readonly
-     */
-    protected RuntimeInformation rti;
-    
-    /**
      * Ignore Direct Dependency Overrides of dependencyManagement section.
      * 
      * @parameter expression="${mdep.analyze.ignore.direct}"
@@ -110,7 +100,6 @@
         adm.setProject( this.project );
         adm.setFailBuild( this.failBuild );
         adm.setPluginContext( this.getPluginContext() );
-        adm.setRti( rti );
         adm.setIgnoreDirect( this.ignoreDirect );
         adm.execute();
     }
diff --git a/src/site/apt/usage.apt b/src/site/apt/usage.apt
index 9b2baa4..be832a9 100644
--- a/src/site/apt/usage.apt
+++ b/src/site/apt/usage.apt
@@ -576,8 +576,8 @@
 	being included at runtime, or you can specify a dependency in your project to override what is being included. You can check the results by rerunning this mojo.
 	If you decide to override by using a dependency, be sure to note it so you can remove it later after upgrading to 2.0.6. You could also use the dependency:analyze mojo to uncover this unused direct dependency.
 	
-	Note: Because Maven 2.0.6 fixes the problems this mojo is meant to detect, it will do nothing in versions of Maven greater than 2.0.5.
-
+	This mojo is also usefull for just detecting projects that override the dependencyManagement directly. Set ignoreDirect to false to detect these otherwise normal conditions.
+	
 	This mojo can be executed from the command line:
 	
 +---+