0

无法使用 OSS 在 java.net 上为 maven 项目准备发布

我按照说明进行操作

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

mvn release:clean 

没关系

mvn release:prepare 

似乎没问题,在此过程中,它会询问我接受的 gpg 密码(我已在下面的输出中将其更改为密码)

但最后它失败了:

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

这是更多的输出

    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)

更新 所以阅读链接中的评论,据说你可以将用户名和参数作为密码传递,所以我尝试使用

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

以及传递给 svn 命令的参数,如下所示,但它仍然以同样的方式失败。

[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)
4

1 回答 1

1

我最终发现了问题,问题出在我的 pom 中

我有

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

当我需要的时候

    <connection>scm:svn:http://svn.java.net/svn/jaudiotagger~svn/trunk
    </connection>
    <developerConnection>scm:svn:https://svn.java.net/svn/jaudiotagger~svn
         /trunk</developerConnection>
于 2013-03-17T10:58:21.460 回答