maven 发布插件 - wagon 因 ssh 身份验证失败,但 snapshort 和发布部署工作 - 嗯?

发布于 2024-09-18 14:54:19 字数 2942 浏览 3 评论 0 原文

我很困惑,非常感谢任何帮助。我的构建机器无法再使用 Maven 发布插件。当我尝试在从标签部署期间进行身份验证时失败。但是,这台机器可以使用标准部署方法来快照和发布存储库(它们位于以 Nexus 作为中介的同一台机器上)。

  • release:perform 在我的桌面上工作
  • release:perform 在我的构建计算机上失败,并出现身份验证错误
  • 部署到快照或发布存储库 在桌面和构建计算机上工作
  • release:perform 在我的构建计算机上失败,并出现以下错误:

部署工件时出错:身份验证失败:无法连接。原因:身份验证取消

两台机器都是 Windows,我认为 ssh 没问题,因为快照和正常部署都可以工作。我看过以下内容,但没有运气。任何建议都将受到欢迎。谢谢

Peter

检查的东西

  • setting.xml(相同)
  • 路径(不同,但当我制作相同时没有影响)
  • 本地存储库(尝试清除每个存储库以查看是否是它 - 没有影响)
  • maven安装 - 相同

< strong>命令 - 通常由 hudson 运行,但也可以手动运行

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>

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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遗心遗梦遗幸福 2024-09-25 14:54:20

一些建议/想法:

  • 仔细检查 ssh 部分是否正确
    • ~/.ssh 目录
    • known_hosts 文件
  • 使用最新版本的maven发布插件,即2.0
  • 尝试使用-X运行来看看是否获得更多有用的信息

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文