maven release plugin - wagon fails with ssh auth but snapshort and release deploy works - eh?

2.2k views Asked by At

I'm baffled and would appreciate any help. My build machine can no longer use the maven release plugin. When I try it fails on auth during the deployment from the tag. However, this machine can release using the standard deploy method to snapshot and release repositories (which are on the same machine with nexus as intermediary).

  • release:perform works from my desktop
  • release:perform fails on my build machine with auth error
  • deploy to a snapshot or release repository works from desktop and build machine
  • release:perform fails from my build machine with the following:

Error deploying artifact: Authentication failed: Cannot connect. Reason: Auth cancel

Both machines are windows and I presume ssh is OK because snapshot and normal deploy works. I have looked at the following with no luck. Any suggestions would be welcome. Thanks

Peter

Things Checked

  • setting.xml (identical)
  • Path (different, but no impact when I made identical)
  • Local Repositories (tried clearing each to see if that was it - no impact)
  • maven installations - same

Commands - usually run by hudson but run by hand as well

mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:clean clean --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:prepare --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 deploy --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:perform --batch-mode

POM

    <groupId>com.releng.experiment</groupId>
      <artifactId>simplejar</artifactId>
      <packaging>jar</packaging>
      <version>1.0.16-SNAPSHOT</version>
      <name>simplejar</name>
      <url>http://maven.apache.org</url>
    ...
      <scm>
        <url>http://svn-da/svn/darepos/users/pkahn/simplejar/trunk</url>
        <developerConnection>scm:svn:http://svn-da/svn/darepos/users/pkahn/simplejar/trunk</developerConnection>
      </scm>

      <build>
        <finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName> 
        <plugins>
                <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <releaseProfiles>release</releaseProfiles>
                        <goals>deploy</goals>
                    </configuration>        
                </plugin>    
            </plugins>
      </build>
    <distributionManagement>
      <repository>
        <id>daeng</id>
        <name>DA Engineering</name>
        <url>scp://mavenrepo/opt/sonatype-work/nexus/storage/daeng/</url>
      </repository>
      <snapshotRepository>
        <id>daeng-snap</id>
        <name>DA Engineering</name>
        <url>scp://mavenrepo/opt/sonatype-work/nexus/storage/daeng-snap/</url>
      </snapshotRepository>
    </distributionManagement>
</project>
1

There are 1 answers

0
Pascal Thivent On

Some suggestions/ideas:

  • double check that the ssh part is correct
    • the ~/.ssh directory
    • the known_hosts file
  • use the latest version of the maven release plugin i.e. <version>2.0</version>
  • try to run with -X to see if you get more useful information