开发者

maven release plugin with github does not work in 2.2.1?

I am a bit confused because during my development i encountered a problem that was only solveable by downgrading the maven release plugin from 2.2.1 down to 2.0-beta-9.

Basically my project was using git on github, so my scm entries in the pom were like

    scm:git:git@github.com/<username>/<projectname>.git

Running release:prepare always failed because upon tagging this command was used:

    git push git@github.com/<username> <tagname>

As you can see the project name was omited.

I looked in the web and eventually i found this link :

That example was using version 2.0-beta-9 and it had one big difference, instead of using the git url it just used origin!

            git push origin <tagname>

And with origin everything works.

Unfortunatly i dont find a tag/attribute for the release plugin to always use origin instead of it@github.com/

Funny thing is : before tagging a push of the modified poms is done (multi module p开发者_运维百科roject). And there the correct url is used.

edit: Basically version 2.2.1 is right in using the scm url instead of "origin" but the tagging operation must not remove the project name from the url.

Regards


I had some similar URL-related problems with Maven 2.2.1 and git. Try some variations of the git URL, like using a ':' instead of a '/' for the separator between username and projectname.

Update: With Maven 2.2.1, I see the push to origin as you described:

git push origin <tagname>

My SCM url is:

<scm>
    <developerConnection>scm:git|ssh://git@github.com/zzantozz/testbed.git</developerConnection>
</scm>

According to mvn help:effective-pom, my release plugin is:

<plugin>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.0</version>
</plugin>

This is with:

$ mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
Java version: 1.6.0_26
Java home: /home/ryan/dev/tools/jdk1.6.0_26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.35-30-generic" arch: "amd64" Family: "unix"
enter code here
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜