Author: khmarbaise
Date: Fri Jan 24 18:39:34 2014
New Revision: 1561108

URL: http://svn.apache.org/r1561108
Log:
[MENFORCER-179]
  - Added the default of searchTransitive
  - Added an other plugin configuration example.

Modified:
    maven/enforcer/trunk/enforcer-rules/src/site/apt/bannedDependencies.apt.vm

Modified: 
maven/enforcer/trunk/enforcer-rules/src/site/apt/bannedDependencies.apt.vm
URL: 
http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/site/apt/bannedDependencies.apt.vm?rev=1561108&r1=1561107&r2=1561108&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/site/apt/bannedDependencies.apt.vm 
(original)
+++ maven/enforcer/trunk/enforcer-rules/src/site/apt/bannedDependencies.apt.vm 
Fri Jan 24 18:39:34 2014
@@ -30,7 +30,7 @@ Banned Dependencies
 
    The following parameters are supported by this rule:
    
-   * searchTransitive - if transitive dependencies should be checked.
+   * searchTransitive - if transitive dependencies should be checked. Default 
is true.
    
    * excludes - a list of artifacts to ban. The format is 
groupId[:artifactId][:version][:type][:scope][:classifier] where artifactId, 
version, type, scope and classifier are optional. Wildcards may be used to 
replace an entire or just parts of a section.
       Examples:
@@ -102,4 +102,41 @@ Banned Dependencies
   </build>
   [...]
 </project>
-+---+
\ No newline at end of file
++---+
+
+  Example plugin configuration which ignores transitive dependencies:
+
++---+
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>enforce-banned-dependencies</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <bannedDependencies>
+                  <excludes>
+                    <exclude>commons-lang:commons-lang</exclude>
+                  </excludes>
+                  <searchTransitive>false</searchTransitive>
+                </bannedDependencies>
+              </rules>
+              <fail>true</fail>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+


Reply via email to