------ Usage ------ Carlos Sanchez Brett Porter John Tolentino ------ September 18, 2006 ~~ 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. Usage The following are some common scenarios in preparing a release. * Use a different username in the SCM server than the one in the operating system Most of the SCMs are simply executed as an external command as the current user on your system. If this username is not the same as the remote username, you may need to set the following option: ------ mvn -Dusername=your_username release:prepare ------ * Set where to tag the files in Subversion This example shows how to set the repository location for all tags to be created in Subversion. Note that it is not needed if you use the standard SVN layout, where the root project is in <<>>, and there is a <<>> directory immediately above it. ------------------- ... ... org.apache.maven.plugins maven-release-plugin https://svn.apache.org/repos/asf/maven/components/releases ... ... ------------------- * Do a Dry Run Since the release plugin performs a number of operations that change the project, it may be wise to do a dry run before a big release or on a new project. To do this, commit all of your files as if you were about to run a full release and run: ------ mvn release:prepare -DdryRun=true ------ This will ask all the same questions, run the same tests, and output a copy of how the POMs will look after transformation. You can check the output and review the POMs, then run: ------ mvn release:clean ------ This will remove all of the files created above, and the project will be ready to execute the proper release. * Run in Batch Mode Sometimes it is desirable to do the commit/tag process on a regular interval (e.g. to produce nightly or integration builds through a build server). To use the default inputs for the versions and tag information and not prompt for any values, use Maven's <<<--batch-mode>>> setting: ------ mvn --batch-mode release:prepare ------