diff --git a/src/site/apt/examples/resolve-ranges.apt b/src/site/apt/examples/resolve-ranges.apt deleted file mode 100644 index a1a13127d6..0000000000 --- a/src/site/apt/examples/resolve-ranges.apt +++ /dev/null @@ -1,121 +0,0 @@ - ~~ Licensed to the Apache Software Foundation (ASF) under one - ~~ or more contributor license agreements. See the NOTICE file - ~~ distributed with this work for additional information - ~~ regarding copyright ownership. The ASF licenses this file - ~~ to you under the Apache License, Version 2.0 (the - ~~ "License"); you may not use this file except in compliance - ~~ with the License. You may obtain a copy of the License at - ~~ - ~~ http://www.apache.org/licenses/LICENSE-2.0 - ~~ - ~~ Unless required by applicable law or agreed to in writing, - ~~ software distributed under the License is distributed on an - ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~~ KIND, either express or implied. See the License for the - ~~ specific language governing permissions and limitations - ~~ under the License. - - ----- - Resolve Ranges - ----- - Paul Gier, Stephen Connolly - ------ - 2009-04-20 - ------ - -Resolve ranges - - A pom may specify version ranges for certain dependencies. - -+---+ - - - - org.apache.maven - maven-project - [2.0.7, 2.0.9) - - - - org.codehaus.plexus - plexus-utils - [1.5.0, 1.5.1 ] - - - - junit - junit - [3.0, 3.8.2) - - - -+---+ - - Using the resolve-ranges goal, the version ranges can be set to the specific version - used in the build. - ---- -mvn versions:resolve-ranges ---- - - The pom dependencies are modified to look like the following. - -+---+ - - - - org.apache.maven - maven-project - 2.0.8 - - - - org.codehaus.plexus - plexus-utils - 1.5.1 - - - - junit - junit - 3.8.1 - - - -+---+ - - You can restrict which dependencies should have their ranges collapsed. For example, - the following will only match dependencies that match the groupId "org.codehaus.plexus" and artifactId - "plexus-utils" - ---- -mvn versions:resolve-ranges -Dincludes=org.codehaus.plexus:plexus-utils ---- - - The <<>> and <<>> parameters follow the format <<>>. - Use a comma separated separated list to specify multiple includes. Wildcards (*) can also be used to match - multiple values. - - This example will match anything with the groupId "org.codehaus.plexus" and anything with the groupId and - artifactId matching "junit". - ---- -mvn versions:resolve-ranges -Dincludes=org.codehaus.plexus:*,junit:junit ---- - - By default, both the <<>> and <<>> sections will be processed. - You can use the <<>> and <<>> parameters to control which sections - are processed. - - This example will only process the <<>> section of your pom: - ---- -mvn versions:resolve-ranges -DprocessDependencies=false ---- - - While this example will only process the <<>> section of your pom: - ---- -mvn versions:resolve-ranges -DprocessDependencyManagement=false ---- - diff --git a/src/site/markdown/examples/resolve-ranges.md b/src/site/markdown/examples/resolve-ranges.md new file mode 100644 index 0000000000..78c54ecb8c --- /dev/null +++ b/src/site/markdown/examples/resolve-ranges.md @@ -0,0 +1,116 @@ +title: Resolve Ranges +author: Paul Gier, Stephen Connolly +date: 2009-04-20 + + + +# Resolve ranges + +A pom may specify version ranges for certain dependencies. + +```xml + + + + org.apache.maven + maven-project + [2.0.7, 2.0.9) + + + + org.codehaus.plexus + plexus-utils + [1.5.0, 1.5.1 ] + + + + junit + junit + [3.0, 3.8.2) + + + +``` + +Using the resolve-ranges goal, the version ranges can be set to the specific version +used in the build. + +```sh +mvn versions:resolve-ranges +``` + + The pom dependencies are modified to look like the following. + +```xml + + + + org.apache.maven + maven-project + 2.0.8 + + + + org.codehaus.plexus + plexus-utils + 1.5.1 + + + + junit + junit + 3.8.1 + + + +``` + +You can restrict which dependencies should have their ranges collapsed. For example, +the following will only match dependencies that match the groupId "org.codehaus.plexus" and artifactId +"plexus-utils" + +```sh +mvn versions:resolve-ranges -Dincludes=org.codehaus.plexus:plexus-utils +``` + +The `includes` and `excludes` parameters follow the format `groupId:artifactId:type:classifier`. +Use a comma separated separated list to specify multiple includes. Wildcards (*) can also be used to match +multiple values. + +This example will match anything with the groupId "org.codehaus.plexus" and anything with the groupId and +artifactId matching "junit". + +```sh +mvn versions:resolve-ranges -Dincludes=org.codehaus.plexus:*,junit:junit +``` + +By default, both the `project/dependencyManagment` and `project/dependencies` sections will be processed. +You can use the `processDependencies` and `processDependencyManagement` parameters to control which sections +are processed. + +This example will only process the `project/dependencyManagment` section of your pom: + +```sh +mvn versions:resolve-ranges -DprocessDependencies=false +``` + +While this example will only process the `project/dependencies` section of your pom: + +```sh +mvn versions:resolve-ranges -DprocessDependencyManagement=false +```