You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2013/10/18 19:14:13 UTC

svn commit: r1533560 - /maven/site/trunk/content/apt/pom.apt

Author: jvanzyl
Date: Fri Oct 18 17:14:13 2013
New Revision: 1533560

URL: http://svn.apache.org/r1533560
Log:
Add additional documention to the excludes element for clipping transitive dependencies using wildcards.

Modified:
    maven/site/trunk/content/apt/pom.apt

Modified: maven/site/trunk/content/apt/pom.apt
URL: http://svn.apache.org/viewvc/maven/site/trunk/content/apt/pom.apt?rev=1533560&r1=1533559&r2=1533560&view=diff
==============================================================================
--- maven/site/trunk/content/apt/pom.apt (original)
+++ maven/site/trunk/content/apt/pom.apt Fri Oct 18 17:14:13 2013
@@ -418,6 +418,35 @@ mvn install:install-file -Dfile=non-mave
 </project>
 +-----------------------------+
 
+  It is also sometimes useful to clip a dependency's transitive dependencies. A dependency may have incorrectly
+  specified scopes, or dependencies that conflict with other dependencies in your project. Using wildcard excludes makes it easy to exclude all a dependencies
+  transitive dependencies. In the case below you may be working with the maven-embedder and you want to manage
+  the dependencies you use yourself, so you clip all the transitive dependencies:
+
++-----------------------------+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  ...
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-embedder</artifactId>
+      <version>3.1.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    ...
+  </dependencies>
+  ...
+</project>
++-----------------------------+
+
   * <<exclusions>>:
   Exclusions contain one or more <<<exclusion>>> elements, each containing a <<<groupId>>> and
   <<<artifactId>>> denoting a dependency to exclude. Unlike <<<optional>>>, which may or may not