| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| <!-- |
| 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. |
| --> |
| <html> |
| <head> |
| <script type="text/javascript">var xookiConfig = {level: 1};</script> |
| <script type="text/javascript" src="../xooki/xooki.js"></script> |
| </head> |
| <body> |
| <textarea id="xooki-source"> |
| <b>Tag:</b> version-matchers |
| |
| <span class="tagdoc" id="ivysettings.version-matchers">Defines a list of version matchers.</span> <span class="since">since 1.4</span> |
| |
| The child tag used for the version matcher must be equal to a name of a report outputter type (added with the typedef tag). |
| |
| A version matcher is used to evaluate if a dependency version constraint matches a dependency version. |
| |
| <h1>Attributes</h1> |
| <table class="ivy-attributes"> |
| <thead> |
| <tr><th class"ivy-att">Attribute</th><th class="ivy-att-desc">Descrition</th><th class="ivy-att-req">Required</th></tr> |
| </thead> |
| <tbody> |
| <tr><td>usedefaults</td> |
| <td>when set to true, includes the built-in version matchers (Latest, Sub Revision, and Version Ranger Matcher). Exact Revision Matcher is always included</td> |
| <td>No, defaults to false</td> |
| </tr> |
| </tbody> |
| </table> |
| <h1>Child elements</h1> |
| <table class="ivy-children"> |
| <thead> |
| <tr><th class="ivy-chld">Element</th><th class="ivy-chld-desc">Description</th><th class="ivy-chld-card">Cardinality</th></tr> |
| </thead> |
| <tbody> |
| <tr><td>any version matcher</td><td>adds a version matcher to the list of available ones</td> |
| <td>0..n</td></tr> |
| </tbody> |
| </table> |
| |
| <h1>Built-in Version Matchers</h1> |
| <h2>Exact Revesion Matcher</h2> |
| A matcher that matches a dependency revision id to the module revision id using simple string equality. |
| |
| <h2>Sub Revision Matcher</h2> |
| A matcher that matches all revisions starting with a specific prefix. The syntax is: [prefix]+ |
| |
| <table class="ivy-children"> |
| <thead> |
| <tr><th class="ivy-chld">Revision</th><th class="ivy-chld-desc">Matches</th></tr> |
| </thead> |
| <tbody> |
| |
| <tr><td>1.0.+</td><td>all revisions starting with '1.0.', like 1.0.1, 1.0.5, 1.0.a</td></tr> |
| <tr><td>1.1+</td><td>all revisions starting with '1.1', like 1.1, 1.1.5, but also 1.10, 1.11</td></tr> |
| </table> |
| |
| <h2>Latest (Status) Matcher</h2> |
| |
| A matcher that matches versions based on their status. The predefined statuses in Ivy are 'release', 'milestone' and 'integration'. It's possible to define your own statuses, see [[settings/statuses]] for more details. |
| |
| <table class="ivy-children"> |
| <thead> |
| <tr><th class="ivy-chld">Revision</th><th class="ivy-chld-desc">Matches</th></tr> |
| </thead> |
| <tbody> |
| |
| <tr><td>latest.integration</td><td>all versions</td></tr> |
| <tr><td>latest.milestone</td><td>all modules having at least 'milestone' as status</td></tr> |
| <tr><td>latest.release</td><td>all modules having at least 'release' as status</td></tr> |
| <tr><td>latest.[any status]</td><td>all modules having at least the specified status</td></tr> |
| </table> |
| |
| <h2>Version Range Matcher</h2> |
| |
| Range types are exhaustively listed by example in the table below. |
| |
| <table class="ivy-children"> |
| <thead> |
| <tr><th class="ivy-chld">Revision</th><th class="ivy-chld-desc">Matches</th></tr> |
| </thead> |
| <tbody> |
| |
| <tr><td> [1.0,2.0] </td><td> all versions greater or equal to 1.0 and lower or equal to 2.0</td></tr> |
| |
| <tr><td> [1.0,2.0[ </td><td> all versions greater or equal to 1.0 and lower than 2.0</td></tr> |
| |
| <tr><td> ]1.0,2.0] </td><td> all versions greater than 1.0 and lower or equal to 2.0<tr> |
| |
| <tr><td> ]1.0,2.0[ </td><td> all versions greater than 1.0 and lower than 2.0</td></tr> |
| |
| <tr><td> [1.0,) </td><td> all versions greater or equal to 1.0 </td></tr> |
| |
| <tr><td> ]1.0,) </td><td> all versions greater than 1.0</td></tr> |
| |
| <tr><td> (,2.0] </td><td> all versions lower or equal to 2.0</td></tr> |
| |
| <tr><td> (,2.0[ </td><td> all versions lower than 2.0 </td></tr> |
| |
| </tbody> |
| </table> |
| |
| <h2>Version Pattern Matcher</h2> |
| |
| The version pattern matcher allows for more flexibility in pattern matching at the cost of adding a matcher declaration in Ivy settings. A simple example is given below. |
| |
| <h3>Settings.xml</h3> |
| <code type="xml"> |
| <pattern-vm> |
| <match revision="foo" pattern="${major}\.${minor}\.\d+" args="major, minor" matcher="regexp" /> |
| </pattern-vm> |
| </code> |
| |
| <h3>Ivy.xml</h3> |
| <code type="xml"> |
| <dependency org="acme" name="tool" rev="foo(1, 3)" /> |
| </code> |
| |
| The version pattern matcher may contain more than one match element. The matcher will attempt to match a dependency revision against each match in sequence, checking the revision tag (e.g. foo(..)) and then the pattern. |
| Matcher types may be one of "regexp", "exact", "glob", or "exactOrRegexp". Glob pattern matching requires Apache ORO 2.0.8 or higher to be on the classpath.</textarea> |
| <script type="text/javascript">xooki.postProcess();</script> |
| </body> |
| </html> |