You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-commits@maven.apache.org by sv...@apache.org on 2019/04/12 18:00:21 UTC

svn commit: r1857425 - in /maven/website/content: guides/introduction/introduction-to-dependency-mechanism.html maven-site-1.0-site.jar

Author: svn-site-role
Date: Fri Apr 12 18:00:20 2019
New Revision: 1857425

Log:
Site checkin for project Apache Maven Site

Modified:
    maven/website/content/guides/introduction/introduction-to-dependency-mechanism.html
    maven/website/content/maven-site-1.0-site.jar

Modified: maven/website/content/guides/introduction/introduction-to-dependency-mechanism.html
==============================================================================
--- maven/website/content/guides/introduction/introduction-to-dependency-mechanism.html (original)
+++ maven/website/content/guides/introduction/introduction-to-dependency-mechanism.html Fri Apr 12 18:00:20 2019
@@ -314,7 +314,7 @@ Karl Heinz Marbaise" />
   </dependencyManagement>
 </project>
 </pre></div>
-<p>And then the two child poms would become much simpler:</p>
+<p>Then the two child poms become much simpler:</p>
 <div class="source"><pre class="prettyprint linenums">
 &lt;project&gt;
   ...
@@ -406,6 +406,7 @@ Karl Heinz Marbaise" />
   &lt;packaging&gt;pom&lt;/packaging&gt;
   &lt;name&gt;B&lt;/name&gt;
   &lt;version&gt;1.0&lt;/version&gt;
+
   &lt;dependencyManagement&gt;
     &lt;dependencies&gt;
       &lt;dependency&gt;
@@ -415,6 +416,7 @@ Karl Heinz Marbaise" />
       &lt;/dependency&gt;
     &lt;/dependencies&gt;
   &lt;/dependencyManagement&gt;
+
   &lt;dependencies&gt;
     &lt;dependency&gt;
       &lt;groupId&gt;test&lt;/groupId&gt;
@@ -430,15 +432,15 @@ Karl Heinz Marbaise" />
   &lt;/dependencies&gt;
 &lt;/project&gt;
 </pre></div>
-<p>When maven is run on project B version 1.0 of artifacts a, b, c, and d will be used regardless of the version specified in their pom.</p>
+<p>When maven is run on project B, version 1.0 of artifacts a, b, c, and d will be used regardless of the version specified in their pom.</p>
 <ul>
-<li>a and c both are declared as dependencies of the project so version 1.0 is used due to dependency mediation. Both will also have runtime scope since it is directly specified.</li>
+<li>a and c both are declared as dependencies of the project so version 1.0 is used due to dependency mediation. Both also have runtime scope since it is directly specified.</li>
 <li>b is defined in B's parent's dependency management section and since dependency management takes precedence over dependency mediation for transitive dependencies, version 1.0 will be selected should it be referenced in a or c's pom. b will also have compile scope.</li>
 <li>Finally, since d is specified in B's dependency management section, should d be a dependency (or transitive dependency) of a or c, version 1.0 will be chosen - again because dependency management takes precedence over dependency mediation and also because the current pom's declaration takes precedence over its parent's declaration.</li></ul>
 <p>The reference information about the dependency management tags is available from the <a href="../../ref/current/maven-model/maven.html#class_DependencyManagement">project descriptor reference</a>.</p>
 <div class="section">
 <h4><a name="Importing_Dependencies">Importing Dependencies</a></h4>
-<p>The examples in the previous section describe how to specify managed dependencies through inheritence. However, in larger projects it may be impossible to accomplish this since a project can only inherit from a single parent. To accommodate this, projects can import managed dependencies from other projects. This is accomplished by declaring a pom artifact as a dependency with a scope of &quot;import&quot;.</p>
+<p>The examples in the previous section describe how to specify managed dependencies through inheritance. However, in larger projects it may be impossible to accomplish this since a project can only inherit from a single parent. To accommodate this, projects can import managed dependencies from other projects. This is accomplished by declaring a pom artifact as a dependency with a scope of &quot;import&quot;.</p>
 <p>Project B:</p>
 <div class="source"><pre class="prettyprint linenums">
 &lt;project&gt;
@@ -448,6 +450,7 @@ Karl Heinz Marbaise" />
   &lt;packaging&gt;pom&lt;/packaging&gt;
   &lt;name&gt;B&lt;/name&gt;
   &lt;version&gt;1.0&lt;/version&gt;
+
   &lt;dependencyManagement&gt;
     &lt;dependencies&gt;
       &lt;dependency&gt;
@@ -464,6 +467,7 @@ Karl Heinz Marbaise" />
       &lt;/dependency&gt;
     &lt;/dependencies&gt;
   &lt;/dependencyManagement&gt;
+
   &lt;dependencies&gt;
     &lt;dependency&gt;
       &lt;groupId&gt;test&lt;/groupId&gt;
@@ -489,6 +493,7 @@ Karl Heinz Marbaise" />
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;name&gt;X&lt;/name&gt;
  &lt;version&gt;1.0&lt;/version&gt;
+
  &lt;dependencyManagement&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
@@ -515,6 +520,7 @@ Karl Heinz Marbaise" />
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;name&gt;Y&lt;/name&gt;
  &lt;version&gt;1.0&lt;/version&gt;
+
  &lt;dependencyManagement&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
@@ -541,6 +547,7 @@ Karl Heinz Marbaise" />
   &lt;packaging&gt;pom&lt;/packaging&gt;
   &lt;name&gt;Z&lt;/name&gt;
   &lt;version&gt;1.0&lt;/version&gt;
+ 
   &lt;dependencyManagement&gt;
     &lt;dependencies&gt;
       &lt;dependency&gt;
@@ -577,6 +584,7 @@ Karl Heinz Marbaise" />
     &lt;project1Version&gt;1.0.0&lt;/project1Version&gt;
     &lt;project2Version&gt;1.0.0&lt;/project2Version&gt;
   &lt;/properties&gt;
+ 
   &lt;dependencyManagement&gt;
     &lt;dependencies&gt;
       &lt;dependency&gt;
@@ -591,6 +599,7 @@ Karl Heinz Marbaise" />
       &lt;/dependency&gt;
     &lt;/dependencies&gt;
   &lt;/dependencyManagement&gt;
+ 
   &lt;modules&gt;
     &lt;module&gt;parent&lt;/module&gt;
   &lt;/modules&gt;
@@ -715,7 +724,7 @@ Karl Heinz Marbaise" />
 <li>When referring to artifacts whose poms have transitive dependencies the project will need to specify versions of those artifacts as managed dependencies. Not doing so will result in a build failure since the artifact may not have a version specified. (This should be considered a best practice in any case as it keeps the versions of artifacts from changing from one build to the next).</li></ul></div></div>
 <div class="section">
 <h3><a name="System_Dependencies">System Dependencies</a></h3>
-<p><tt>Important note: This is marked deprecated.</tt></p>
+<p><tt>Important note: This is deprecated.</tt></p>
 <p>Dependencies with the scope <i>system</i> are always available and are not looked up in repository. They are usually used to tell Maven about dependencies which are provided by the JDK or the VM. Thus, system dependencies are especially useful for resolving dependencies on artifacts which are now provided by the JDK, but where available as separate downloads earlier. Typical example are the JDBC standard extensions or the Java Authentication and Authorization Service (JAAS).</p>
 <p>A simple example would be:</p>
 <div class="source"><pre class="prettyprint linenums">

Modified: maven/website/content/maven-site-1.0-site.jar
==============================================================================
Binary files - no diff available.