Author: jdcasey
Date: Wed Jul 26 14:57:13 2006
New Revision: 425864

URL: http://svn.apache.org/viewvc?rev=425864&view=rev
Log:
[MNG-1562] Updated to reflect the necessity of the <type/> element in 
dependencyManagement references where the dependency artifact is not a jar.

Modified:
    
maven/site/trunk/src/site/apt/guides/introduction/introduction-to-dependency-mechanism.apt

Modified: 
maven/site/trunk/src/site/apt/guides/introduction/introduction-to-dependency-mechanism.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/guides/introduction/introduction-to-dependency-mechanism.apt?rev=425864&r1=425863&r2=425864&view=diff
==============================================================================
--- 
maven/site/trunk/src/site/apt/guides/introduction/introduction-to-dependency-mechanism.apt
 (original)
+++ 
maven/site/trunk/src/site/apt/guides/introduction/introduction-to-dependency-mechanism.apt
 Wed Jul 26 14:57:13 2006
@@ -178,16 +178,19 @@
   <dependencyManagement>
     <dependencies>
       <dependency>
-          <groupId>group-a</groupId>
+        <groupId>group-a</groupId>
         <artifactId>artifact-a</artifactId>
         <version>1.0</version>
-      <exclusions>
+
+        <exclusions>
           <exclusion>
             <groupId>group-c</groupId>
             <artifactId>excluded-artifact</artifactId>
           </exclusion>
         </exclusions>
+
       </dependency>
+
       <dependency>
         <groupId>group-c</groupId>
         <artifactId>artifact-b</artifactId>
@@ -195,6 +198,7 @@
         <type>war</type>
         <scope>runtime</scope>
       </dependency>
+
       <dependency>
         <groupId>group-a</groupId>
         <artifactId>artifact-b</artifactId>
@@ -219,9 +223,12 @@
       <groupId>group-a</groupId>
       <artifactId>artifact-a</artifactId>
     </dependency>
+
     <dependency>
       <groupId>group-a</groupId>
       <artifactId>artifact-b</artifactId>
+      <!-- This is not a jar dependency, so we must specify type. -->
+      <type>bar</type>
     </dependency>
   </dependencies>
 </project>
@@ -236,15 +243,27 @@
     <dependency>
       <groupId>group-c</groupId>
       <artifactId>artifact-b</artifactId>
+      <!-- This is not a jar dependency, so we must specify type. -->
+      <type>war</type>
     </dependency>
+
     <dependency>
       <groupId>group-a</groupId>
       <artifactId>artifact-b</artifactId>
+      <!-- This is not a jar dependency, so we must specify type. -->
+      <type>bar</type>
     </dependency>
   </dependencies>
 </project>
 
 +----+
+
+ <<NOTE:>> In two of these dependency references, we had to specify the 
\<type/\>
+ element. This is because the minimal set of information for matching a 
dependency
+ reference against a dependencyManagement section is actually 
+ <<\{groupId, artifactId, type\}>>. In many cases, these dependencies will 
refer to
+ jar artifacts. This allows us to shorthand the identity set to <<\{groupId, 
artifactId\}>>,
+ since the default for the type field is <<<jar>>>.
 
  The reference information about the dependency management tags is available 
from the
  {{{maven-model/maven.html#class_DependencyManagement}project descriptor 
reference}}.                    -----


Reply via email to