------ Usage ------ Pete Marvin King ------ 2008-08-13 ------ ~~ 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. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Usage The SCM Plugin maps a lot of commands to a variety of scm implementations. But there are only 2 frequently used commands: * checkin - commit the changes to the remote repository ( scm server ). * update - updates the local working copy with the one from the remote repository ( scm server ). [] Configuring SCM Each scm has a different command line invocation to commit the modified sources. Using maven this process is simplified by providing a uniform way to do this by letting maven handle the command line translation to perform the scm task. To configure the scm support for maven you need the scm configuration in your <<>>. +---------+ ... jar 1.0-SNAPSHOT SCM Sample Project http://somecompany.com scm:svn:http://somerepository.com/svn_repo/trunk scm:svn:https://somerepository.com/svn_repo/trunk http://somerepository.com/view.cvs ... +---------+ Maven will use the information embedded in the scm configuration to determine the command mapping for the scm command. The scm configuration url is composed of different information that defines the mapping: +------+ scm:svn:http://somerepository.com/svn_repo/trunk :: +------+ Check the {{{http://maven.apache.org/scm/scms-overview.html}maven scm list}} for the list of supported SCMs. Committing and updating changes through Maven Assuming that SCM has been configured in the <<>> and the project directory is managed by a SCM, invoking the checkin goal in the scm will start the commit process for all configured sources in your <<>>. <> +-----+ mvn -Dmessage="" scm:checkin +-----+ for update +-----+ mvn scm:update +-----+ Specifying the scm connection to use There two possible scm connections that can be used in the <<>>, connection and developerConnection. * connection configuration +-----------+ ... [...] org.apache.maven.plugins maven-scm-plugin ${project.version} connection ... ... +-----------+ * developerConnection configuration +-----------+ ... ... org.apache.maven.plugins maven-scm-plugin ${project.version} developerConnection ... ... +-----------+ Related Links * {{{http://docs.codehaus.org/display/SCM/SCM+Matrix}SCM Plugin Matrix}} []