blob: 3fedf62939e40cebc91aeebc3240acf300a2e470 [file] [log] [blame]
------
Maven SCM Plugin - bootstrapping using a pom
------
Pete Marvin King
------
20 July 2006
------
Bootstrapping a project using a pom file
Using the <<<scm:bootstrap>>> 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 <<<pom.xml>>> should contain a scm configuration for the bootstrap to work.
+-----------+
<project>
[...]
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>SCM Sample Project</name>
<url>http://somecompany.com</url>
<scm>
<connection>scm:svn:http://somerepository.com/svn_repo/trunk</connection>
<developerConnection>scm:svn:https://somerepository.com/svn_repo/trunk</developerConnection>
<url>http://somerepository.com/view.cvs</url>
<scm>
[...]
<build>
[...]
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<goals>install</goals>
</configuration>
</plugin>
</plugins>
[...]
</build>
[...]
</project>
+-----------+
Assuming the scm configuration has been configured in the <<<pom.xml>>>, 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 <<<target/checkout>>> 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 repository requiring authentication, the scm plugin needs to be configured in the <<<pom.xml>>>
* specifying the username and password for svn and starteam
+-----------+
[...]
<build>
[...]
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<username>username</username>
<password>password</password>
</configuration>
</plugin>
</plugins>
[...]
</build>
[...]
+-----------+