Maven release fails due to git failure

人盡茶涼 提交于 2019-11-30 13:26:49
HaveAGuess

Just to add to Tobb's excellent original answer..
I noticed that this has been fixed but had issues getting the new version to work.. You have to add it as a plugin (not project) dependency, eg.

<!-- Appengine deploy at end of mvn release:perform -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.2.2</version>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-scm-plugin</artifactId>
            <version>1.8.1</version>
        </dependency>
    </dependencies>
</plugin>

Turned out that this was an error that had been encountered before. This is due to a bug in maven-scm-provider-git, which causes the file-reference to a local repository for checkout to lose its ':' in "C:...". (The bug is described here: http://jira.codehaus.org/browse/SCM-662)

We fixed this by copying a fixed version of the jar into the local maven repository, but I had recently cleared my local repository in order to see if our Nexus repo was behaving correctly, and thus got an unfixed version of the jar in my local repo (doh!)

So, added the fixed version of the jar to my local maven repo, the git clone-command contained a ':' again, and things started working :)

Edit: This bug is fixed in version 2.4 of the maven release plugin.

Could it be a problem with

file://C\Users\torbjornk\nfr\MyProject/

? Can't you just clone using the regular path?

C:\Users\torbjornk\nfr\MyProject/

If not I think it should be:

file:///C:/Users/torbjornk/nfr/MyProject/

If that doesn't work try one of these:

file://localhost/c|/Users/torbjornk/nfr/MyProject/
file:///c|/Users/torbjornk/nfr/MyProject/
file://localhost/c:/Users/torbjornk/nfr/MyProject/
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!