Author: svn-site-role Date: Fri Aug 24 15:12:27 2018 New Revision: 1838878 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 Aug 24 15:12:27 2018 @@ -169,9 +169,9 @@ Karl Heinz Marbaise" /> <p>There is no limit to the number of levels that dependencies can be gathered from. A problem arises only if a cyclic dependency is discovered.</p> <p>With transitive dependencies, the graph of included libraries can quickly grow quite large. For this reason, there are additional features that limit which dependencies are included:</p> <ul> -<li><i>Dependency mediation</i> - this determines what version of a dependency will be used when multiple versions of an artifact are encountered. Currently, Maven 2.0 only supports using the "nearest definition" which means that it will use the version of the closest dependency to your project in the tree of dependencies. You can always guarantee a version by declaring it explicitly in your project's POM. Note that if two dependency versions are at the same depth in the dependency tree, until Maven 2.0.8 it was not defined which one would win, but since Maven 2.0.9 it's the order in the declaration that counts: the first declaration wins. +<li><i>Dependency mediation</i> - this determines what version of an artifact will be chosen when multiple versions are encountered as dependencies. Maven picks the "nearest definition". That is, it uses the version of the closest dependency to your project in the tree of dependencies. You can always guarantee a version by declaring it explicitly in your project's POM. Note that if two dependency versions are at the same depth in the dependency tree, the first declaration wins. <ul> -<li>"nearest definition" means that the version used will be the closest one to your project in the tree of dependencies, eg. if dependencies for A, B, and C are defined as A -> B -> C -> D 2.0 and A -> E -> D 1.0, then D 1.0 will be used when building A because the path from A to D through E is shorter. You could explicitly add a dependency to D 2.0 in A to force the use of D 2.0</li></ul></li> +<li>"nearest definition" means that the version used will be the closest one to your project in the tree of dependencies. For example, if dependencies for A, B, and C are defined as A -> B -> C -> D 2.0 and A -> E -> D 1.0, then D 1.0 will be used when building A because the path from A to D through E is shorter. You could explicitly add a dependency to D 2.0 in A to force the use of D 2.0.</li></ul></li> <li><i>Dependency management</i> - this allows project authors to directly specify the versions of artifacts to be used when they are encountered in transitive dependencies or in dependencies where no version has been specified. In the example in the preceding section a dependency was directly added to A even though it is not directly used by A. Instead, A can include D as a dependency in its dependencyManagement section and directly control which version of D is used when, or if, it is ever referenced.</li> <li><i>Dependency scope</i> - this allows you to only include dependencies appropriate for the current stage of the build. This is described in more detail below.</li> <li><i>Excluded dependencies</i> - If project X depends on project Y, and project Y depends on project Z, the owner of project X can explicitly exclude project Z as a dependency, using the "exclusion" element.</li> @@ -730,7 +730,7 @@ Karl Heinz Marbaise" /> ... </project> </pre></div> -<p>If your artifact is provided by the JDK's <tt>tools.jar</tt> the system path would be defined as follows:</p> +<p>If your artifact is provided by the JDK's <tt>tools.jar</tt>, the system path would be defined as follows:</p> <div class="source"><pre class="prettyprint linenums"><project> ... <dependencies> Modified: maven/website/content/maven-site-1.0-site.jar ============================================================================== Binary files - no diff available.