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/21 19:14:55 UTC

svn commit: r578205 - in /maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site: apt/examples/filtering-the-dependency-tree.apt site.xml

Author: markh
Date: Fri Sep 21 10:14:54 2007
New Revision: 578205

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

Added:
    maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/filtering-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/filtering-the-dependency-tree.apt
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/filtering-the-dependency-tree.apt?rev=578205&view=auto
==============================================================================
--- maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/filtering-the-dependency-tree.apt (added)
+++ maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/filtering-the-dependency-tree.apt Fri Sep 21 10:14:54 2007
@@ -0,0 +1,87 @@
+~~ 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.    
+ 
+  ------
+  Filtering the dependency tree
+  ------
+  Mark Hobson
+  ------
+  Sep 2007
+  ------
+
+Filtering the dependency tree
+
+	A project's dependency tree can be filtered to locate specific dependencies.  For example, to find out why Velocity
+	is being used by the Maven Dependency Plugin, we can execute the following in the project's directory:
+
++---+
+mvn dependency:tree -Dincludes=velocity:velocity
++---+
+
+	Which outputs:
+	
++---+
+[INFO] [dependency:tree]
+[INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT
+[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]       \- velocity:velocity:jar:1.4:compile
++---+
+
+	Thus we can see that Velocity is being brought in by Plexus Velocity, which in turn is being brought in by a direct
+	dependency on Doxia Site Renderer.
+
+* Filter pattern syntax
+
+	The syntax for filter patterns is as follows:
+	
++---+
+[groupId]:[artifactId]:[type]:[version]
++---+
+
+	Where each pattern segment is optional and supports full and partial <<<*>>> wildcards.  An empty pattern segment is
+	treated as an implicit wildcard.
+	
+	For example, <<<org.apache.*>>> would match all artifacts whose group id started with <<<org.apache.>>>, and
+	<<<:::*-SNAPSHOT>>> would match all snapshot artifacts.
+
+* Excluding dependencies from the tree
+
+	The dependency tree can also be filtered to remove specific dependencies.  For example, to exclude Plexus
+	dependencies from the tree, we can execute the following:
+	
++---+
+mvn dependency:tree -Dexcludes=org.codehaus.plexus
++---+
+
+* Specifying multiple patterns
+
+	Multiple patterns can be specified when filtering the dependency tree by separating the patterns with commas.  For
+	example, to exclude Maven and Plexus dependencies from the tree, we can execute the following:
+	
++---+
+mvn dependency:tree -Dexcludes=org.apache.maven*,org.codehaus.plexus
++---+
+
+* Including and excluding dependencies from the tree
+
+	Both include and exclude patterns and be specified together to filter the dependency tree.  For example, to locate
+	all non-snapshot Plexus dependencies in the tree, we can execute the following:
+	
++---+
+mvn dependency:tree -Dincludes=org.codehaus.plexus -Dexcludes=:::*-SNAPSHOT
++---+

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

Propchange: maven/plugins/branches/maven-dependency-plugin-MDEP-100/src/site/apt/examples/filtering-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=578205&r1=578204&r2=578205&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 Fri Sep 21 10:14:54 2007
@@ -34,6 +34,7 @@
       <item name="Unpacking specific artifacts" href="examples/unpacking-artifacts.html" />
       <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"/>
     </menu>
     <menu name="Resources">
       <item name="Dependency Mechanism" href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html" />