Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-294

Make problems with remote deployment explicit

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-6
    • Fix Version/s: 1.0-beta-7
    • Component/s: wagon-ssh
    • Labels:
      None

      Description

      The deployment to a remote repository might lead to some server-side problem - in my case, the utilized SFTP account did not had enough permissions in the repository path. It would be good if the info message:

      — snip —

      [INFO] Error deploying artifact: Error occured while deploying 'j2ee/j2ee/1.4/j2
      ee-1.4.jar' to remote repository: sftp://maven.asg-platform.org/opt/maven/maven2
      /repository

      — snip —

      could say something more about the original problem. The stack trace (maven -e) knows the answer, at the very end:

      — snip —

      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact
      : Error occured while deploying 'j2ee/j2ee/1.4/j2ee-1.4.jar' to remote repositor
      y: sftp://maven.asg-platform.org/opt/maven/maven2/repository
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:559)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
      Goal(DefaultLifecycleExecutor.java:488)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:458)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:306)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:219)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:140)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      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: Error deploying artif
      act: Error occured while deploying 'j2ee/j2ee/1.4/j2ee-1.4.jar' to remote reposi
      tory: sftp://maven.asg-platform.org/opt/maven/maven2/repository
      at org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.
      java:240)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:412)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:534)
      ... 16 more
      Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error
      deploying artifact: Error occured while deploying 'j2ee/j2ee/1.4/j2ee-1.4.jar'
      to remote repository: sftp://maven.asg-platform.org/opt/maven/maven2/repository
      at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Def
      aultArtifactDeployer.java:91)
      at org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.
      java:236)
      ... 18 more
      Caused by: org.apache.maven.wagon.TransferFailedException: Error occured while d
      eploying 'j2ee/j2ee/1.4/j2ee-1.4.jar' to remote repository: sftp://maven.asg-pla
      tform.org/opt/maven/maven2/repository
      at org.apache.maven.wagon.providers.ssh.SftpWagon.put(SftpWagon.java:145
      )
      at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(D
      efaultWagonManager.java:180)
      at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(Def
      aultWagonManager.java:109)
      at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Def
      aultArtifactDeployer.java:77)
      ... 19 more
      Caused by: Permission denied
      at com.jcraft.jsch.ChannelSftp.throwStatusError(Unknown Source)
      at com.jcraft.jsch.ChannelSftp.mkdir(Unknown Source)
      at org.apache.maven.wagon.providers.ssh.SftpWagon.mkdir(SftpWagon.java:2
      20)
      at org.apache.maven.wagon.providers.ssh.SftpWagon.mkdirs(SftpWagon.java:
      200)
      at org.apache.maven.wagon.providers.ssh.SftpWagon.put(SftpWagon.java:96)

      ... 22 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 6 seconds

        Attachments

          Activity

            People

            • Assignee:
              bentmann Benjamin Bentmann
              Reporter:
              troeger Peter Troeger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: