Release Descriptor

XML structure

The XML structure of an Antmod release descriptor is shown below. You can click any of the elements and attributes to jump directly to the documentation.

Introduction

See also: Creating a release in the User Guide.

Releases are described in release descriptors, which are XML files that are stored in the "releases" module in SCM (configurable using the Antmod configuration).

In the directory ${antmod.checkoutdir}/antmod-releases you can find the release descriptors that your repository currently contains. This is the directory where Antmod checks out the release descriptors all the time, for Antmod's own use and to make it easy for you to add new release descriptors and edit existing ones.

There are two types of release descriptors:

  • <releasename>-dev:
    Development release used to develop the next release.
    This means most modules are referred to using "trunk" as version (the latest and greatest code).

  • <releasename>-M.m.p:
    Production ready release that is the result of (1) the modules in the development release at a certain moment in time, and (2) a set of versions that have been created for those modules.
    This means all modules are referred to using 2-digit (branch) or 3-digit (tag) versions.

Releases can be in one of four states:

  • dev:
    This is described in the "-dev" release description. Most modules are referred to using "trunk" as version.
  • alpha / beta:
    This is described in an "-M.m.p" release descriptor, with one or more modules that are still being fixed. These modules are being referred to using 2-digit versions, with the fixes being committed to those 2-digiti version branches.
  • fcs:
    This is also described in an "-M.m.p" release descriptor, but all modules are refering to 3-digit versions now! This way the same release can be reproduced at a later point in time. It makes making bugfixes a little bit harder when developing though.

XML element: release

The <release> element specifies what it depends on, which modules to use, and what configuration properties it wants to override. This is the root element of the release descriptor. The following table lists the attributes of this element. All child elements are documented after that in other subsections.

Attribute Description
buildtype The type of build files to use. Can be set to java or none. When set to java Antmod will place its out-of-the-box Ant files with build plugins, perfect for handling any Java/J2EE project. When set to none Antmod will not place any Ant files. Other possibilities are under consideration, such as makefile, nant, etcetera
Defaults to java.

XML element: properties

Within the <properties> element, properties can be set that will be available during buildtime of the release. The properties within this element override any other value for the same property. Read the configuration reference for more information.

Example:

    <properties>
      antmod.javac.deprecation=true
      tomcat.port=8080
    </properties>

In this example, javac deprecation messages are turned on by overriding the Antmod property for that. A custom property ${tomcat.port} is introduced which may be reused in a local.build.xml in one of the modules of this release.

XML element: javalib

This element specifies a dependency on a third-party JAR file. Antmod will retrieve it by retrieving the filename specified from the URL specified in the ${antmod.javalib.url} property.

Usually a release descriptor has multiple javalib elements in it.

Example:

    <javalib>axis-1.1.jar</javalib>
    <javalib>commons-collections-3.0.jar</javalib>
    <javalib>log4j-1.2.8.jar</javalib>
  

XML element: module

The <module> element specified one of the modules of this release. A release descriptor usually has multiple module elements in it.

Attribute Description
name The module name, under which the module is committed in SCM.
type The way the module is to be used within this release. Valid values are: main, buildrelease, dist and library. See also Modules reference.

When "ant dist" is issued on release level, Antmod will invoke "ant dist" in each main, buildrelease and dist module, and invoke "ant build" in each library module.
A release always must always have one main module. By default this becomes the buildrelease module as well, which is the usual way of working.
The module with type buildrelease (or if none, the main module) is the module that defines how the release as a whole gets constructed and packaged,
When "ant dist" or "ant package" is issued on release level, Antmod will invoke "ant distrelease" or "ant packagerelease" in the buildrelease module. This module's "local.build.xml" can override these Ant targets, and thus customize this for the release.

Defaults to library
version The version of the module you want to use. Valid values are: trunk, M.m (a branch, so it can still change due to bugfixes) or M.m.p (a tag, so read-only).
Antmod translates this version to a proper CVS or Subversion branch or tag name, depending on the repository provider being used.
repos The name of the repository to be used. A repository named default is usually always configured, you can choose any name you want for other repository names. Each repository name must be configured using a ${antmod.repositories.<name>} property. Read "Configuring Repositories" for more information.