Two Common Issues With Maven-Release-Plugin

Recently, when working with maven-release-plugin (used in some old, long forgotten codebase) we encountered few issues. This post explains two of them.

No connector available

INFO ERROR Failed to execute goal org.apache.maven.plugins
:maven-deploy-plugin:2.5:deploy (default-deploy) on project my-project:
Failed to deploy artifacts/metadata: No connector available to access repository
my-repo (scp://repository.server/path/to/repo) of type default using the
available factories WagonRepositoryConnectorFactory -> Help 1

Reason: probably you do not have wagon plugin defined in your pom.xml.

Remember, wagon is a extension, not a normal plugin! See http://maven.apache.org/wagon/wagon-providers/index.html for detailed information on how to use it. It should be something like this:

<build>
    ....
    <extensions>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
    <artifactId>wagon-ssh</artifactId>
            <version>some version here</version>
        </extension>
    </extensions>

Unable to tag SCM

ERROR Failed to execute goal org.apache.maven.plugins
  :maven-release-plugin:2.2.1:prepare (default-cli) on project
  my-project: Unable to tag SCM
ERROR Provider message:
ERROR The svn tag command failed.
ERROR Command output:
ERROR svn: Path 'user@svn.server/path/to/svn/project' does not exist in
  revision 1234
ERROR -> Help 1

This one is rather obvious - your SVN path given in pom.xml scm / developerConnection section does not exist. Sometimes, it might be because your IDE reformatted pom.xml and inserted a new line break splitting your SVN path like this:

<scm>
<developerConnection>scm:svn://user@svn.server/path/to
/svn/project</developerConnection>
</scm>

In such case, you need to simply fix it by hand and rerun the release process.

This is NOT the End

There is much more to discuss about the maven-release-plugin. In short, read documentation, be careful what you are doing and have luck. :)

 
 
 
This used to be my blog. I moved to http://tomek.kaczanowscy.pl long time ago.

 
 
 

Please comment using