You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ma...@apache.org on 2007/09/24 13:32:40 UTC

svn commit: r578766 - in /maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site: apt/examples/resolving-conflicts-using-the-dependency-tree.apt site.xml

Author: markh
Date: Mon Sep 24 04:32:38 2007
New Revision: 578766

URL: http://svn.apache.org/viewvc?rev=578766&view=rev
Log:
Added an example of resolving conflicts using the dependency tree to the site.

Added:
    maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/resolving-conflicts-using-the-dependency-tree.apt   (with props)
Modified:
    maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/site.xml

Added: maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/resolving-conflicts-using-the-dependency-tree.apt
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/resolving-conflicts-using-the-dependency-tree.apt?rev=578766&view=auto
==============================================================================
--- maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/resolving-conflicts-using-the-dependency-tree.apt (added)
+++ maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/resolving-conflicts-using-the-dependency-tree.apt Mon Sep 24 04:32:38 2007
@@ -0,0 +1,55 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.    
+ 
+  ------
+  Resolving conflicts using the dependency tree
+  ------
+  Mark Hobson
+  ------
+  Sep 2007
+  ------
+
+Resolving conflicts using the dependency tree
+
+	A project's dependency tree can be expanded to display dependency conflicts.  For example, to find out why Commons
+	Collections 2.0 is being used by the Maven Dependency Plugin, we can execute the following in the project's
+	directory:
+
++---+
+mvn dependency:tree -Dverbose -Dincludes=commons-collections
++---+
+
+	The <<<verbose>>> flag instructs the dependency tree to display conflicting dependencies that were omitted from the
+	resolved dependency tree.  In this case, the goal outputs:
+	
++---+
+[INFO] [dependency:tree]
+[INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT
+[INFO] +- org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4:compile
+[INFO] |  \- commons-validator:commons-validator:jar:1.2.0:compile
+[INFO] |     \- commons-digester:commons-digester:jar:1.6:compile
+[INFO] |        \- (commons-collections:commons-collections:jar:2.1:compile - omitted for conflict with 2.0)
+[INFO] \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha-8:compile
+[INFO]    \- org.codehaus.plexus:plexus-velocity:jar:1.1.3:compile
+[INFO]       \- commons-collections:commons-collections:jar:2.0:compile
++---+
+
+	Thus we can see that Commons Collections 2.0 was chosen over 2.1 since it is nearer, and by default Maven resolves
+	version conflicts with a nearest-wins strategy.
+
+	More specifically, in verbose mode the dependency tree shows dependencies that were omitted for: being a duplicate
+	of another; conflicting with another's version and/or scope; and introducing a cycle into the dependency tree. 
\ No newline at end of file

Propchange: maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/resolving-conflicts-using-the-dependency-tree.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/resolving-conflicts-using-the-dependency-tree.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/site.xml?rev=578766&r1=578765&r2=578766&view=diff
==============================================================================
--- maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/site.xml (original)
+++ maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/site.xml Mon Sep 24 04:32:38 2007
@@ -35,6 +35,7 @@
       <item name="Unpacking the project dependencies" href="examples/unpacking-project-dependencies.html" />
    	  <item name="Failing the build on dependency analysis warnings" href="examples/failing-the-build-on-dependency-analysis-warnings.html"/>
    	  <item name="Filtering the dependency tree" href="examples/filtering-the-dependency-tree.html"/>
+   	  <item name="Resolving conflicts using the dependency tree" href="examples/resolving-conflicts-using-the-dependency-tree.html"/>
     </menu>
     <menu name="Resources">
       <item name="Dependency Mechanism" href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html" />