------ Usage ------ Benson Margulies ------ 2012-02-25 ------ ~~ 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 maven-scm-publish-plugin submits modified content to SCM, sites being the most classical case. The standard use for sites is: +-----------+ mvn -Preporting site site:stage mvn scm-publish:publish-scm +-----------+ which will work both for multi-and mono-modules sites. * Usage With Lifecycle (beta) There are two ways you can set this up for site in your POM. ** Use the Custom Lifecycle Unfortunately, a Maven plugin can't define a top-level lifecycle like 'site'. However, it can come close. The plugin includes the goal. This goal does nothing except fork a custom lifecycle, consisting of the following phases: * <<>> * <<>> * <<>> * <<>> * <<>> [] (Again unfortunately, Maven does not allow a custom lifecycle to share phases with some other lifecycle.) With a little configuration in your POM, +---------+ mvn scm-publish:scmpublish +---------+ will do all the work. +------+ org.apache.maven.plugins maven-scm-publish-plugin ${project.version} true scm:svn:https://svn.apache.org/repos/asf/maven/sandbox/bimargulies/site-test-003 +------+ : this is actually not working, the 003-lifecycle IT has been disabled. ** Using the Site Lifecycle The alternative is to attach the necessary activities to the site lifecycle and deactivate maven-site-plugin's site deploy goal. This requires more XML in the POM, but it may be easier to use if you already customize the site lifecycle for other reasons. +-----+ site scm:svn:https://svn.apache.org/repos/asf/maven/sandbox/bimargulies/site-test org.apache.maven.plugins maven-site-plugin true org.apache.maven.plugins maven-site-plugin stage-for-scm-publish post-site stage false org.apache.maven.plugins maven-scm-publish-plugin ${project.version} scm-publish site-deploy publish-scm +-----+