Author: brianf Date: Sat Mar 17 19:41:12 2007 New Revision: 519525 URL: http://svn.apache.org/viewvc?view=rev&rev=519525 Log: merged in the analyze branch.
Added: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java - copied unchanged from r519524, maven/plugins/branches/maven-dependency-plugin-w-analyzer/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java - copied unchanged from r519524, maven/plugins/branches/maven-dependency-plugin-w-analyzer/src/main/java/org/apache/maven/plugin/dependency/AnalyzeMojo.java Modified: maven/plugins/trunk/maven-dependency-plugin/pom.xml maven/plugins/trunk/maven-dependency-plugin/src/site/apt/index.apt maven/plugins/trunk/maven-dependency-plugin/src/site/apt/usage.apt maven/plugins/trunk/maven-dependency-plugin/src/site/fml/faq.fml Modified: maven/plugins/trunk/maven-dependency-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/pom.xml?view=diff&rev=519525&r1=519524&r2=519525 ============================================================================== --- maven/plugins/trunk/maven-dependency-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-dependency-plugin/pom.xml Sat Mar 17 19:41:12 2007 @@ -165,6 +165,11 @@ <artifactId>plexus-container-default</artifactId> <version>1.0-alpha-9</version> </dependency> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-dependency-analyzer</artifactId> + <version>1.0-alpha-1</version> + </dependency> </dependencies> <!--reporting> <plugins> Modified: maven/plugins/trunk/maven-dependency-plugin/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/site/apt/index.apt?view=diff&rev=519525&r1=519524&r2=519525 ============================================================================== --- maven/plugins/trunk/maven-dependency-plugin/src/site/apt/index.apt (original) +++ maven/plugins/trunk/maven-dependency-plugin/src/site/apt/index.apt Sat Mar 17 19:41:12 2007 @@ -67,9 +67,9 @@ *{{{build-classpath-mojo.html}dependency:build-classpath}} tells Maven to output the path of the dependencies from the local repository in a classpath format to be used in java -cp - ~~*{{{analyze-mojo.html}dependency:analyze}} analyzes your project's dependencies and lists dependencies that should be declared, but are not, and dependencies that are declared but unused. - *Coming soon in 2.0-alpha-3: dependency:analyze analyzes your project's dependencies and lists dependencies that should be declared, but are not, and dependencies that are declared but unused. - + *{{{analyze-mojo.html}dependency:analyze}} analyzes your project's dependencies and lists dependencies that should be declared, but are not, and dependencies that are declared but unused. + + *{{{analyze-dep-mgt-mojo.html}dependency:analyze-dep-mgt}} analyzes your projects dependencies and lists mismatches between resolved dependencies and those listed in your dependencyManagement section. [] * Usage Modified: maven/plugins/trunk/maven-dependency-plugin/src/site/apt/usage.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/site/apt/usage.apt?view=diff&rev=519525&r1=519524&r2=519525 ============================================================================== --- maven/plugins/trunk/maven-dependency-plugin/src/site/apt/usage.apt (original) +++ maven/plugins/trunk/maven-dependency-plugin/src/site/apt/usage.apt Sat Mar 17 19:41:12 2007 @@ -538,13 +538,13 @@ * The <<<dependency:analyze>>> mojo - Coming soon in 2.0-alpha-3: This mojo can be executed from the command line: +---+ mvn dependency:analyze +---+ + This mojo also performs the checks described in the analyze-dep-mht section. Sample output: +---+ @@ -567,4 +567,36 @@ [INFO] None +---+ +* The <<<dependency:analyze-dep-mgt>>> mojo + + This mojo looks at the dependencies after final resolution and looks for mismatches in your dependencyManagement section. + In versions of maven prior to 2.0.6, it was possible to inherit versions that didn't match your dependencyManagement. See {{{http://jira.codehaus.org/browse/MNG-1577}MNG-1577}} for more info. + + If this mojo detects issues, you should attempt to resolve the discrepancies before upgrading to 2.0.6 to avoid any surprises. This can be done by upgrading or downgrading the version in dependencyManagement to match what is actually + 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 can be executed from the command line: + ++---+ +mvn dependency:analyze-dep-mgt ++---+ + + Sample output: + ++---+ +[INFO] Found Resolved Dependency / DependencyManagement mismatches: +[INFO] Dependency: commons-lang:commons-lang:jar +[INFO] DepMgt : 1.0 +[INFO] Resolved: 2.3 +[INFO] Dependency: commons-digester:commons-digester:jar +[INFO] DepMgt : 1.6 +[INFO] Resolved: 1.7 +[INFO] Dependency: javax.servlet:servlet-api:jar +[INFO] DepMgt : 2.3 +[INFO] Resolved: 2.4 +[WARNING] Potential problems found in Dependency Management ++---+ Modified: maven/plugins/trunk/maven-dependency-plugin/src/site/fml/faq.fml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/site/fml/faq.fml?view=diff&rev=519525&r1=519524&r2=519525 ============================================================================== --- maven/plugins/trunk/maven-dependency-plugin/src/site/fml/faq.fml (original) +++ maven/plugins/trunk/maven-dependency-plugin/src/site/fml/faq.fml Sat Mar 17 19:41:12 2007 @@ -46,4 +46,4 @@ </answer> </faq> </part> -</faqs> \ No newline at end of file +</faqs>