Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

org.apache.maven.BuildFailureException: No SCM URL was provided to perform the release from

I'm using Maven 2.2.1 and I sucessfully ran:

mvn -B release:clean release:prepare

But get the error message:

No SCM URL was provided to perform the release from

when I run:

mvn release:perform

My pom.xml have the scm tags defined correctly:

<scm>
    <url>file:///C:/tmp/svnrepo/myproj/trunk</url>        
    <connection>scm:svn:file:///C:/tmp/svnrepo/myproj/trunk</connection>
    <developerConnection>scm:svn:file:///C:/tmp/svnrepo/myproj/trunk</developerConnection>        
</scm>
like image 434
DarVar Avatar asked Jul 16 '12 13:07

DarVar


3 Answers

It is possible to rerun a maven release:perform by creating a manually edited release.properties file in the root folder. This file should define these two properties: scm.url and scm.tag. Here a possible example:

scm.url=scm:git:https://github.com/owner/repo.git
scm.tag=v1.0.4

With this file it is possible to redo a release:perform task.

Inspired by this answer.

like image 64
Jmini Avatar answered Oct 18 '22 20:10

Jmini


Looks like I did a mvn -DdryRun=true release:perform and this had deleted the release.properties file from the prepare stage.

So I add the -DconnectionUrl to the command to provide url of the tag

like image 20
DarVar Avatar answered Oct 18 '22 21:10

DarVar


It should work. I had similar problem, but in my case perform failed due to network error and I had to restart it with something like:

mvn release:perform -rf :{ARTIFACT ON WHICH IT FAILED} -DconnectionUrl=scm:svn:{URL TO TAG}
like image 6
Igor Avatar answered Oct 18 '22 21:10

Igor