GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing maven.apache.org — Dependency Convergence – Apache Maven Enforcer Built-In Rules Dependency ConvergenceThis rule requires that dependency versions are the same everywhere in the tree. If a project has two dependencies, A and B, both depending on the same artifact, C, this rule will fail the build if A depends on one version of C and B depends on a different version of C. Here is a concrete example. A project containing these two dependencies does not converge because org.jdom:jdom:1.1.3 depends on Jaxen 1.1.3 and org.org.jenkins-ci.main:jenkins-core:2.492 depends on Jaxen 2.0.0:
This is not obvious from the dependencies themselves. However, if the dependencyConvergence rule is activated in the project, this message will be logged during compilation:
However, if you exclude JDOM's dependency on Jaxen in your own pom, then only one version of Jaxen is added to the classpath and the rule passes:
You can also use the dependencyManagement element or a “bill of materials” (BOM) to uniquely specify a single version for all transitive dependencies with the same group ID, artifact ID, and classifier. For example, this dependencyManagement element pins the project's Jaxen version to 2.0.0, regardless of which versions may appear in transitive dependencies:
Here is how a project should be set up to use this rule: Timestamped VersionBy default, the non-unique versions are matched, which means the Filtering Dependency ErrorsBy default, all dependency convergence errors are reported, and any single error will fail the build. If you want to tune which dependency errors are reported and fail the build, you can add the following optional parameters:
The format for artifacts is groupId[:artifactId][:version][:type][:scope][:classifier] where artifactId, version, type, scope, and classifier are optional. Wildcards may replace an entire section or just parts of a section. This rule uses the Enforcer version range syntax to define allowed versions. |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |