Decimal versions are generated relative to the following project defintion properties. All property values must be integers.
- project.major.version
- project.minor.version
- project.micro.version
Decimal versioning is enabled via the Depot build tool -decimal command-line option. In this example properties from the major, minor and micro values has been added to the index.xml file (see below).
$ build -list -decimal Selection: [3] [1] project:org/acme/plugin/clock-api#1.0.0 [2] project:org/acme/plugin/clock-impl#1.0.2 [3] module:org/acme/plugin#1.0.2 $
The following index.xml is an update from the plugin tutorial example and includes additional properties dealing with major, minor and micro version values. If undefined - a decimal value defaults to zero. Values defined at module level establish the default for subsidiary projects.
<?xml version="1.0" encoding="ISO-8859-1"?> <index xmlns="dpml:library" xmlns:part="dpml:part"> <imports> <import uri="link:module:ant"/> <import uri="link:module:dpml"/> </imports> <module name="org/acme/plugin" basedir="."> <properties> <property name="project.major.version" value="1"/> <property name="project.micro.version" value="2"/> </properties> <types> <type id="module" version="1.0"> </types> <project name="clock-api" basedir="api"> <properties> <property name="project.micro.version" value="0"/> </properties> <types> <type id="jar"/> </types> </project> <project name="clock-impl" basedir="impl"> <types> <type id="jar"/> <part:plugin class="org.acme.impl.SimpleClock"> <part:param value="h:mm"/> <part:param class="java.util.Locale" method="getDefault"/> </part:plugin> </types> <dependencies> <runtime> <include key="clock-api"/> </runtime> <test> <include ref="ant/ant-junit"/> <include ref="dpml/transit/dpml-transit-main"/> </test> </dependencies> </project> </module> </index>
The DPML project makes extensive use of decimal versioning and applies the following convention with respect to major, minor and micro version values:
major | All resources sharing the same major version are deemed as backward compatible. |
minor | A minor version represents a functional extension or enhancement that is compatible within the context of the major version identifier. |
micro | A micro version represents a sequential release identifier relative to the [major].[minor] namespace. |