------ Various Tips ------ Olivier Lamy ------ 2012-09-04 ------ ~~ 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 Various tips for using this plugin * URLS format You must use a scm url format: +---------------- scm: +---------------- Svn example: scm:svn:https://svn.apache.org/repos/infra/websites/production/maventest/content/plugins/maven-scm-publish-plugin/ And configure is as it: +---------------- org.apache.maven.plugins maven-scm-publish-plugin ${project.version} scmUrl +---------------- <>: with the svn if the remote url doesn't exist it will be created. * Git branch To use git branch (by example: github gh-pages) +---------------- org.apache.maven.plugins maven-scm-publish-plugin ${project.version} gh-pages scm:git:git@github.com:olamy/tomcat-foo-artifact.git +---------------- * Some Tips to improve performance By default, a complete checkout is done, you can configure the plugin to try update rather than a full checkout/clone +---------------- org.apache.maven.plugins maven-scm-publish-plugin ${project.version} true +---------------- By defaut, the scm content is checkout/clone to $\{project.build.directory}/scmpublish-checkout, so when running mvn clean all the content is deleted. You can configure a path to your machine to avoid full checkout. A recommended way is to use a property with a default as it your colleague will be able to override in their settings. +---------------- ... ${user.home} \${siteMainDirectory}/my-site-content-scm ... org.apache.maven.plugins maven-scm-publish-plugin ${project.version} ${scmPubCheckoutDirectory} true +---------------- You can use svnjava rather than svn cli if you use a machine without svn cli. +---------------- org.apache.maven.plugins maven-scm-publish-plugin ${project.version} javasvn com.google.code.maven-scm-provider-svnjava maven-scm-provider-svnjava ${maven-scm-provider-svnjava-version} org.tmatesoft.svnkit svnkit ${svnkit-version} +----------------