diff --git a/src/site/apt/examples/advancing-dependency-versions.apt.vm b/src/site/apt/examples/advancing-dependency-versions.apt.vm deleted file mode 100644 index cf9eeb4f9f..0000000000 --- a/src/site/apt/examples/advancing-dependency-versions.apt.vm +++ /dev/null @@ -1,167 +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. - - ----- - Advancing dependency versions - ----- - Stephen Connolly - ------ - 2009-08-12 - ------ - -Advancing dependency versions - - There are a number of goals which can be used to advance dependency versions: - - * {{{../use-next-releases-mojo.html}versions:use-next-releases}} searches the pom for all non-SNAPSHOT versions which - have been a newer release and replaces them with the next release version. - - * {{{../use-latest-releases-mojo.html}versions:use-latest-releases}} searches the pom for all non-SNAPSHOT versions - which have been a newer release and replaces them with the latest release version. - - * {{{../use-next-snapshots-mojo.html}versions:use-next-snapshots}} searches the pom for all non-SNAPSHOT versions - which have been a newer -SNAPSHOT version and replaces them with the next -SNAPSHOT version. - - * {{{../use-latest-snapshots-mojo.html}versions:use-latest-snapshots}} searches the pom for all non-SNAPSHOT versions - which have been a newer -SNAPSHOT version and replaces them with the latest -SNAPSHOT version. - - * {{{../use-next-versions-mojo.html}versions:use-next-versions}} searches the pom for all versions which - have been a newer version and replaces them with the next version. - - * {{{../use-latest-versions-mojo.html}versions:use-latest-versions}} searches the pom for all versions which - have been a newer version and replaces them with the latest version. - - [] - - All of these goals share a common set of parameters. - -* Deciding which goal to use - - The following matrix should help decide which goal(s) to use: - -*----------------------*-------------------------------*---------------------------------*--------------------*--------------------------*------------*--------------* -| Goal | Modifies Release dependencies | Modifies -SNAPSHOT dependencies | Considers releases | Considers -SNAPSHOTs | Picks Next | Picks Latest | -*----------------------*-------------------------------*---------------------------------*--------------------*--------------------------*------------*--------------* -| use-next-releases | | Yes | Yes | | Yes | | -*----------------------*-------------------------------*---------------------------------*--------------------*--------------------------*------------*--------------* -| use-latest-releases | | Yes | Yes | | | Yes | -*----------------------*-------------------------------*---------------------------------*--------------------*--------------------------*------------*--------------* -| use-next-snapshots | Yes | | | Yes | Yes | | -*----------------------*-------------------------------*---------------------------------*--------------------*--------------------------*------------*--------------* -| use-latest-snapshots | Yes | | | Yes | | Yes | -*----------------------*-------------------------------*---------------------------------*--------------------*--------------------------*------------*--------------* -| use-next-versions | Yes | Yes | Yes | If -DallowSnapshots=true | Yes | | -*----------------------*-------------------------------*---------------------------------*--------------------*--------------------------*------------*--------------* -| use-latest-versions | Yes | Yes | Yes | If -DallowSnapshots=true | | Yes | -*----------------------*-------------------------------*---------------------------------*--------------------*--------------------------*------------*--------------* -Goal Matrix - - The columns in the above goal matrix are as follows: - - * when scanning the <<>> for dependency to update, include those dependencies which - are for release versions (i.e. non-SNAPSHOT versions). - - * when scanning the <<>> for dependency to update, include those dependencies which - are for -SNAPSHOT versions. - - * when building the list of newer versions of a dependency, include release versions (i.e. non-SNAPSHOT - versions) in the list. - - * when building the list of newer versions of a dependency, include -SNAPSHOT versions in the list. - - * when the list of newer versions is sorted in increasing order, pick the first newer version in the list, i.e. - the oldest newer version available, also known as the "next" version. - - * when the list of newer versions is sorted in increasing order, pick the last newer version in the list, i.e. - the newest version available, also known as the "latest" version. - - [] - -* Controlling which dependencies are processed - - You can restrict which dependencies should be processed. For example, - the following will only match dependencies that match the groupId "org.codehaus.plexus" and artifactId - "plexus-utils" - ---- -mvn versions:use-next-releases -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:use-next-releases -Dincludes=org.codehaus.plexus:*,junit:junit ---- - - You can pre-configure defaults for <<>> and <<> in your <<>> if there is a specific - set of dependencies that you need to track on a regular basis, e.g. - ---- - - ... - - ... - - ... - - org.codehaus.mojo - versions-maven-plugin - ${pluginVersion} - - ... - - org.codehaus.plexus:* - junit:junit - - ... - - org.codehaus.plexus:plexus-utils - - ... - - - ... - - ... - - ... - ---- - - 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:use-next-releases -DprocessDependencies=false ---- - - While this example will only process the <<>> section of your pom: - ---- -mvn versions:use-next-releases -DprocessDependencyManagement=false ---- - - - diff --git a/src/site/apt/examples/display-dependency-updates.apt b/src/site/markdown/display-dependency-updates.md similarity index 50% rename from src/site/apt/examples/display-dependency-updates.apt rename to src/site/markdown/display-dependency-updates.md index 5666061a05..a8af766c23 100644 --- a/src/site/apt/examples/display-dependency-updates.apt +++ b/src/site/markdown/display-dependency-updates.md @@ -1,44 +1,40 @@ - ~~ 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. +title: Checking for new dependency updates +author: Stephen Connolly +date: 2008-09-02 - ----- - Checking for new dependency updates - ----- - Stephen Connolly - ------ - 2008-09-02 - ------ + -Checking for new dependency updates +# Checking for new dependency updates - The <<>> goal will check all the dependencies used in your project and display a list - of those dependencies with newer versions available. +The `display-dependency-updates` goal will check all the dependencies used in your project and display a list +of those dependencies with newer versions available. - Here are some examples of what this looks like: +Here are some examples of what this looks like: ---- +```sh svn checkout http://svn.codehaus.org/mojo/trunk/mojo/build-helper-maven-plugin build-helper-maven-plugin cd build-helper-maven-plugin mvn versions:display-dependency-updates ---- +``` - Which produces the following output: +Which produces the following output: ---- +```sh [INFO] ------------------------------------------------------------------------ [INFO] Building Build Helper Maven Plugin [INFO] task-segment: [versions:display-dependency-updates] @@ -58,4 +54,4 @@ mvn versions:display-dependency-updates [INFO] Finished at: Fri Aug 15 10:46:03 IST 2008 [INFO] Final Memory: 10M/167M [INFO] ------------------------------------------------------------------------ ---- +``` diff --git a/src/site/markdown/examples/advancing-dependency-versions.md.vm b/src/site/markdown/examples/advancing-dependency-versions.md.vm new file mode 100644 index 0000000000..6e49008984 --- /dev/null +++ b/src/site/markdown/examples/advancing-dependency-versions.md.vm @@ -0,0 +1,144 @@ +title: Advancing dependency versions +autor: Stephen Connolly +date: 2009-08-12 + + + +Advancing dependency versions +============================= + +There are a number of goals which can be used to advance dependency versions: + +- [versions:use-next-releases](../use-next-releases-mojo.html) searches the pom for all non-SNAPSHOT versions which +have been a newer release and replaces them with the next release version. +- [versions:use-latest-releases](../use-latest-releases-mojo.html) searches the pom for all non-SNAPSHOT versions +which have been a newer release and replaces them with the latest release version. +- [versions:use-next-snapshots](../use-next-snapshots-mojo.html) searches the pom for all non-SNAPSHOT versions +which have been a newer -SNAPSHOT version and replaces them with the next -SNAPSHOT version. +- [versions:use-latest-snapshots](../use-latest-snapshots-mojo.html) searches the pom for all non-SNAPSHOT versions +which have been a newer -SNAPSHOT version and replaces them with the latest -SNAPSHOT version. +- [versions:use-next-versions](../use-next-versions-mojo.html) searches the pom for all versions which +have been a newer version and replaces them with the next version. + [versions:use-latest-versions](../use-latest-versions-mojo.html) searches the pom for all versions which +have been a newer version and replaces them with the latest version. + +All of these goals share a common set of parameters. + +Deciding which goal to use +-------------------------- + +The following matrix should help decide which goal(s) to use: + +| Goal | Modifies Release dependencies | Modifies -SNAPSHOT dependencies | Considers releases | Considers -SNAPSHOTs | Picks Next | Picks Latest | +|----------------------|:-----------------------------:|:-------------------------------:|:------------------:|:------------------------:|:----------:|:------------:| +| use-next-releases | | Yes | Yes | | Yes | | +| use-latest-releases | | Yes | Yes | | | Yes | +| use-next-snapshots | Yes | | | Yes | Yes | | +| use-latest-snapshots | Yes | | | Yes | | Yes | +| use-next-versions | Yes | Yes | Yes | If -DallowSnapshots=true | Yes | | +| use-latest-versions | Yes | Yes | Yes | If -DallowSnapshots=true | | Yes | + +The columns in the above goal matrix are as follows: + +- *Modified Release dependencies* when scanning the `pom.xml` for dependency to update, include those dependencies which +are for release versions (i.e. non-SNAPSHOT versions). +- *Modified -SNAPSHOT dependencies* when scanning the `pom.xml` for dependency to update, include those dependencies which +are for -SNAPSHOT versions. +- *Considers releases* when building the list of newer versions of a dependency, include release versions (i.e. non-SNAPSHOT +versions) in the list. +- *Considers releases* when building the list of newer versions of a dependency, include -SNAPSHOT versions in the list. +- *Picks Next* when the list of newer versions is sorted in increasing order, pick the first newer version in the list, i.e. +the oldest newer version available, also known as the "next" version. +- *Picks Latest* when the list of newer versions is sorted in increasing order, pick the last newer version in the list, i.e. +the newest version available, also known as the "latest" version. + +Controlling which dependencies are processed +-------------------------------------------- + +You can restrict which dependencies should be processed. For example, +the following will only match dependencies that match the groupId "org.codehaus.plexus" and artifactId +"plexus-utils" + +```sh +mvn versions:use-next-releases -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:use-next-releases -Dincludes=org.codehaus.plexus:*,junit:junit +``` + +You can pre-configure defaults for `includes` and `excludes` in your `pom.xml` if there is a specific +set of dependencies that you need to track on a regular basis, e.g. + +```xml + + ... + + ... + + ... + + org.codehaus.mojo + versions-maven-plugin + ${pluginVersion} + + ... + + org.codehaus.plexus:* + junit:junit + + ... + + org.codehaus.plexus:plexus-utils + + ... + + + ... + + ... + + ... + +``` + +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:use-next-releases -DprocessDependencies=false +``` + +While this example will only process the `project/dependencies` section of your pom: + +```sh +mvn versions:use-next-releases -DprocessDependencyManagement=false +``` + + +