0

Unable do prepare a release for maven project on java.net using OSS

I follow the instructions at

http://java.net/projects/maven2-repository/pages/MigrationAndCleanupRelatedDocumentation#Stage_a_Release

mvn release:clean 

is okay

mvn release:prepare 

seems okay, during the process it asks me for my gpg password which it accepts (I've changed this to password in the output below)

but right at the end it fails with:

svn: OPTIONS of 'https://svn.java.net/svn/jaudiotagger/tags':
 authorization failed: Could not authenticate to server: 
 rejected Basic challenge (https://svn.java.net)

here is a bit more of the output

    GPG Passphrase: *password
*gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
    gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
    gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
    gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
    gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 8 minutes 21 seconds
    [INFO] Finished at: Sat Feb 16 17:48:05 GMT 2013
    [INFO] Final Memory: 42M/282M
    [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\MESH\AppData\Local\Temp\maven-scm-1694916625.commit --targets C:\Users\MESH\AppDat
a\Local\Temp\maven-scm-4871080818615227594-targets"
[INFO] Working directory: c:\Code\jthink\opensrc\jaudiotagger
[INFO] Tagging release with the label 2.0.4...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file C:\Users\MESH\AppData\Local\Temp\maven-scm-1619719744.commit --revision 1106 https://svn.java
.net/svn/jaudiotagger/tags/2.0.4 https://svn.java.net/svn/jaudiotagger/tags/2.0.4"
[INFO] Working directory: c:\code\jthink\opensrc\jaudiotagger
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: OPTIONS of 'https://svn.java.net/svn/jaudiotagger/tags': authorization failed: Could not authenticate to server: rejected Basic challenge (https://svn.java
.net)

Update So reading the comments in the link it was said you could pass username and paramter as a password so I tried using

   mvn release:prepare -Dusername=paultaylor
    -Dpassword=xxxxxx -Dgpg.passphrase=xxxxxx

and the parameters to get passed to the svn command, as can be seen below yet it still fails in the same way.

[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --username paultaylor --password ***** --no-auth-cache --non-interactive commit --file C:\Users\MESH\AppData\Local\Temp\mav
en-scm-264158387.commit --targets C:\Users\MESH\AppData\Local\Temp\maven-scm-6229037003047930707-targets"
[INFO] Working directory: c:\Code\jthink\opensrc\jaudiotagger
[INFO] Tagging release with the label jaudiotagger-2.0.4...
[INFO] Executing: cmd.exe /X /C "svn --username paultaylor --password ***** --no-auth-cache --non-interactive copy --file C:\Users\MESH\AppData\Local\Temp\maven
-scm-617643506.commit --revision 1113 https://svn.java.net/svn/jaudiotagger/tags/jaudiotagger-2.0.4 https://svn.java.net/svn/jaudiotagger/tags/jaudiotagger-2.0.
4"
[INFO] Working directory: c:\code\jthink\opensrc\jaudiotagger
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: OPTIONS of 'https://svn.java.net/svn/jaudiotagger/tags': authorization failed: Could not authenticate to server: rejected Basic challenge (https://svn.java
.net)
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
  • You should allow to store the credential information of SVN. Second you need to give [mvn clean deploy -Dgpg.passphrase=yourpassphrase](https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven) furthermore take care on the tip on the site ** mvn release:perform -Darguments=-Dgpg.passphrase=PASSPHRASE** – khmarbaise Feb 18 '13 at 17:59
  • I missed to mentioned you can use things like this: [scm-credentials](http://stackoverflow.com/questions/1255593/externalising-scm-credentials-with-maven) – khmarbaise Feb 18 '13 at 18:00
  • @khmarbaise Hi I tried passing username and password as parameters as suggested in the link but still fails in the same way – Paul Taylor Mar 01 '13 at 14:50

1 Answers1

1

I found the issue eventually the problem was in my pom

I had

    <connection>scm:svn:http://svn.java.net/svn/jaudiotagger/trunk
    </connection>
    <developerConnection>scm:svn:https://svn.java.net/svn/jaudiotagger
        /trunk</developerConnection>

when I needed

    <connection>scm:svn:http://svn.java.net/svn/jaudiotagger~svn/trunk
    </connection>
    <developerConnection>scm:svn:https://svn.java.net/svn/jaudiotagger~svn
         /trunk</developerConnection>
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
  • The answer (I have a typo in the connection string) in no way bears connection to the question/heading. – Jay Oct 07 '13 at 12:55