SVN, Archiva and maven-release-plugin configuration

Here is a standard SVN and Maven layout / configuration to perform maven releases with minimal configuration.

Project layout on SVN

SVN SERVER
project-artifactId
branches
tags
trunk

Maven POM configuration

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.ichir.projects</groupId>
    <artifactId>project-artifactId</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <scm>
        <developerConnection>scm:svn:__HTTP_PATH_TO_SVN__/project-artifactId/trunk</developerConnection>
    </scm>
    <distributionManagement>
        <repository>
            <id>internal</id>
            <url>__HTTP_PATH_TO_ARCHIVA__/repository/internal/</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <url>__HTTP_PATH_TO_ARCHIVA__/repository/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagBase>__HTTP_PATH_TO_SVN__/project-artifactId/tags</tagBase>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Perform a release

    mvn release:prepare

then if succeeded

    mvn release:preform
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s