Maven 2部署scp错误 - 如何调试

时间:2016-12-28 11:29:32

标签: java maven scp

运行maven release:perform时,通过scp上传到存储库 失败,“SCP以未知错误代码终止。”

我正在寻找调试方法。

我尝试设置javax.net.debug=ssl MAVEN_OPTS环境变量,但是没有显示输出。 我没有尝试mvnDebug,这可能有点矫枉过正。

有人知道Maven 2.2.1使用哪个模块作为ssh的东西,所以我找到了 从中获取一些日志输出的方法是什么?

啊,顺便说一句,平台是Windows XP(不是开玩笑:-)。 maven scp上传工作了这么多年,没有我记得的设置更改。

POM中的分发部分是这样的:

  <distributionManagement>
    <repository>
      <id>UploadRepository</id>
      <url>scp://reposerver:/path/to/maven-repo</url>
    </repository>
  </distributionManagement>

maven -e输出为:

[INFO] [INFO] [deploy:deploy {execution: default-deploy}]
[INFO] Uploading: scp://reposerver:/path/to/maven-repo/com/example/project/arti/2.2/arti-2.2.war
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Error deploying artifact: Error occurred while deploying 'com/example/project/arti/2.2/arti-2.2.war' to remote repository:
scp://reposerver:/path/to/maven-repo: SCP terminated with unknown error code
[INFO]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 13 seconds
[INFO] [INFO] Finished at: Wed Dec 28 12:08:10 CET 2016
[INFO] [INFO] Final Memory: 25M/60M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1'
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution failed, exit code: '1'
        at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:133)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1'
        at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89)
        at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:67)
        at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:334)
        at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:282)
        at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:262)
        at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:129)
        ... 19 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1'
        at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:375)
        at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:393)
        at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81)
        ... 24 more

0 个答案:

没有答案