Problems with maven release on git

1k views Asked by At

I've got a very strange problem: Every time I want to release my open source project (hosted on github) maven is uploading a snapshot to my repository instead of the expected release.

I've found out, the problem is that the pom of the release tag (git) contains a snapshot version. It seems means release:prepare doesn't set the correct release version for the release tag.

I'm using maven 3.2.3 and git 2.0.1.

The pom.xml here.

Every hint is welcome.

1

There are 1 answers

2
René Link On BEST ANSWER

I think it is because of https://jira.codehaus.org/browse/MRELEASE-812.

It should be fixed in 2.5. However see the comment

I used this plugin configuration

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.5</version>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.9.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-api</artifactId>
            <version>1.9.1</version>
        </dependency>
    </dependencies>
</plugin>

and it works for me.

PS: Use mvn release:prepare -DpushChanges=false when you test the plugin. The changes are only local than and you can reset them.