Version Builds
Decimal Versioning Example
Assigning major, minor and micro properties

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
Using the decimal CLI option

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"

    <import uri="link:module:ant"/>
    <import uri="link:module:dpml"/>

  <module name="org/acme/plugin" basedir=".">
      <property name="project.major.version" value="1"/>
      <property name="project.micro.version" value="2"/>
      <type id="module" version="1.0">
    <project name="clock-api" basedir="api">
        <property name="project.micro.version" value="0"/>
        <type id="jar"/>
    <project name="clock-impl" basedir="impl">
        <type id="jar"/>
        <part:plugin class="org.acme.impl.SimpleClock">
          <part:param value="h:mm"/>
          <part:param class="java.util.Locale" method="getDefault"/>
          <include key="clock-api"/>
          <include ref="ant/ant-junit"/>
          <include ref="dpml/transit/dpml-transit-main"/>

Technical Note

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.