------ Bootstrapping a Project Using a POM ------ 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 Bootstrapping a Project Using a POM Using the <<>> a project can be build from a fresh copy of the source in the scm repository. This is a convenient way to distribute a project because the bootstrap pom can be given to a developer to generate the maven build environment for the project. The <<>> should contain a scm configuration for the bootstrap to work. +-----------+ ... 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 ... ... org.apache.maven.plugins maven-scm-plugin ${project.version} install ... ... +-----------+ Assuming the scm configuration has been configured in the <<>>, bootstrapping can be invoked by +---------+ mvn scm:bootstrap +---------+ By default the scm plugin will get the latest version from the trunk and generate it under <<>> and execute the configured goals in it. Configuring Authentication Most public repositories requires developers to authenticate first before they can pull the source from the repository. For repositories requiring authentication, the scm plugin needs to be configured in one of the following ways: * In the <<>> +-----------+ ... ... org.apache.maven.plugins maven-scm-plugin ${project.version} username password ... ... +-----------+ * In the <<>> via a <<>> entry, using the host name from the connection URL as the server id +-----------+ ... hostname username password ... +-----------+ Since version 1.5, the plugin also recognizes {{{http://maven.apache.org/guides/mini/guide-encryption.html}encrypted passwords}}.