maven-release-plugin deploys snapshot to archiva

How can I force mvn release:perform to deploy to my release and not tom my snapshot repository? release:perform always deploys SNAPSHOT versions. Which makes no sense IMHO

I have in my pom.xml

<groupId>com.mydomain</groupId>
<artifactId>MyArtifactName</artifactId>
<version>1.0.6-SNAPSHOT</version>
<packaging>jar</packaging>


<name>MyArtifactName</name>
<url>http://maven.apache.org</url>
 <distributionManagement>
    <repository>
        <id>central</id>
        <url>http://repo.example.com/artifactory/libs-release-local</url>
        <name>libs-release-local</name>
    </repository>
    <snapshotRepository>
        <id>central</id>
        <url>http://repo.example.com/artifactory/libs-snapshot-local</url>
        <name>libs-snapshot-local</name>
    </snapshotRepository>
</distributionManagement>
<scm>
    <tag>HEAD</tag>
    <url>http://git.example.com/someUser/myproject</url>
    <connection>scm:git:git@git.example.com/someUser/myproject.git</connection>
    <developerConnection>scm:git:git@git.example.com/someUser/myproject.git</developerConnection>
</scm>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.4.2</version>
        </plugin>
    </plugins>
</build>

Answers


I found the problem: The problem is, that I needed to update the maven-scm-provider-gitexe dependency, for the maven-release-plugin (version 2.4.2), when using Git as SCM:

<build>
    <plugins>
        ....
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.4.2</version>
            <dependencies>
                <dependency>
                    <groupId>org.apache.maven.scm</groupId>
                    <artifactId>maven-scm-provider-gitexe</artifactId>
                    <version>1.9</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>

I found the solution here: mvn release:prepare not committing changes to pom.xml

You can find a working example here: https://github.com/tarator/releaseplugintest


Need Your Help

XSLT transformation -AIF Dynamics AX

xml xslt xml-parsing axapta dynamics-ax-2012

I am trying to transform the following XML into a different xml format.

NHibernate Linq Provider question

nhibernate linq-to-nhibernate

Can anyone answer me what are the differences of