maven-plugins/scm/xdocs/releasing.xml
2007-03-22 10:39:43 +00:00

81 lines
3.3 KiB
XML

<?xml version="1.0"?>
<!--
/*
* 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.
*/
-->
<document>
<properties>
<title>Making Releases</title>
<author email="brett@apache.org">Brett Porter</author>
</properties>
<!-- TODO: move to main documentation -->
<body>
<section name="Making Releases from SCM">
<p>
The SCM plugin provides some basic functionality for making releases, and updating the SCM accordingly.
A release is performed in 2 steps:
</p>
<ol>
<li>Prepare the release</li>
<li>Perform (deploy) the release</li>
</ol>
<subsection name="Preparing the release">
<p>
Release preparation usually happens on an existing checkout. This checkout should be in such a state that
with the exception of making final updates to the project.xml and changes.xml files, is ready to be
released.
</p>
<p>
Preparing a release performs the following steps:
</p>
<ol>
<li>Verify that there are no uncommitted changes in the checkout</li>
<li>Prompt for a desired version and tag name</li>
<li>Modify project.xml and changes.xml to set the released version and commit the changes</li>
<li>Tag the entire source tree with the new tag name</li>
</ol>
<p>
(Note that you may preview the changes made to project.xml and changes.xml by setting
the <code>maven.scm.testmode</code> property).
When this operation is over, your source control has the released code tagged and ready to deploy.
</p>
</subsection>
<subsection name="Performing the release">
<p>
The release is performed directly from source control. So while you can run it from an existing checkout
to pick up it's SCM URL, it is not necessary and can be run like a checkout:
</p>
<source>maven scm:perform-release -Dmaven.scm.url=scm:cvs:local:/cvs/root:module -Dmaven.scm.tag=RELEASE_1_0</source>
<p>
You will be prompted for the tag and goals if they are not specified. The goals you give are what are
required to deploy the release - the SCM side is all taken care of. For example, you might select to run
the goals:
</p>
<source>jar:deploy,site:deploy</source>
<p>
After prompting, <code>scm:perform-release</code> checks out a clean copy of the code from the tag, and
runs the goals selected on the clean copy.
</p>
</subsection>
</section>
</body>
</document>