<?xml version="1.0"?>
<!-- 
/*
 * Copyright 2001-2004 The Apache Software Foundation.
 * 
 * Licensed 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.
 */
 -->

<document>

  <properties>
    <title>Avalon Versioning Maven Plug-in</title>
    <author email="niclas@apache.org">Niclas Hedhman</author>
  </properties>

  <body>
    <section name="Avalon Versioning Maven Plug-in">
      <p>
        This plugin triggers on dist:deploy and jar:deploy goals, and
        increment the build number when the jar or distro has been uploaded.
        The CVS will also be tagged with the version, for proper maintenance.
      </p>
      <p>
        The plugin will need to initialize the project first, which is done
        with;
      </p>
      <source>
        maven increment:initialize
      </source>
      <p>
        This will create the initial setup and enable the Versioning plugin for
        the project. However, you will need to set the maven.versioning.enable 
        property in the project.properties file to true as well.
      </p>
      <p>
        Initially the version is set to 1.0.dev-0. The 'dev-' part means that
        it is development in-progress. We call this the "phase". There are
        only 3 phases, "dev-", "rc-" and "", where "rc" stands for 
        <strong>release candidate</strong>. The workflow is, when a new Minor
        version is started, the version starts in the "dev-" phase, and any
        deployment will increment the number (digits right of dev-). Once the
        code has stablized, i.e. no more incompatible changes, and 
        community-wide testing to start, the phase is incremented to "rc-".
        This is done by;
      </p>
      <source>
        maven increment:phase
      </source>
      <p>
        That will bring the version from, for instance, "1.0.dev-176" to 
        "1.0.rc-0". Next time the increment:phase goal is called the result
        would become "1.0.0".
      </p>
      <p>
        To increment the <strong>Major</strong> and <strong>Minor</strong>
        parts, you invoke
      </p>
      <source>
        maven increment:minor
        maven increment:major
      </source>
      <p>
        respectively. For a Minor increment, it will be set to "X.y.dev-0" and 
        for a Major increment the version will be set to "X.0.dev-0".
      </p>
    </section>
 </body>
</document>
