Maven Wagon
  1. Maven Wagon
  2. WAGON-311

NPE and CommandExecutionException when creating directory over SSH

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.0-beta-6
    • Fix Version/s: None
    • Component/s: wagon-ssh
    • Labels:
      None
    • Environment:
      launching maven from PC under Windows XP
      remote is under Linux Redhat 4
    • Number of attachments :
      0

      Description

      When deploying site with mvn site:deploy on multi module project, I get really often (about 90%) the following error :
      [INFO] ------------------------------------------------------------------------
      [INFO] Building BANACO - Projet principal (POM)
      [INFO] task-segment: [site:deploy]
      [INFO] ------------------------------------------------------------------------
      [INFO] [site:deploy

      {execution: default-cli}

      ]
      scp://cdxlan025.douane:22/var/jboss/server/archiva/deploy/CID-PORTAIL-DEV.war/site/banaco/1.2.1-SNAPSHOT/ - Session: Opened
      Executing command: mkdir -p /var/jboss/server/archiva/deploy/CID-PORTAIL-DEV.war/site/banaco/1.2.1-SNAPSHOT/.
      scp://cdxlan025.douane:22/var/jboss/server/archiva/deploy/CID-PORTAIL-DEV.war/site/banaco/1.2.1-SNAPSHOT/ - Session: Disconnecting
      scp://cdxlan025.douane:22/var/jboss/server/archiva/deploy/CID-PORTAIL-DEV.war/site/banaco/1.2.1-SNAPSHOT/ - Session: Disconnected
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error uploading site

      Embedded error: Error performing commands for file transfer
      java.lang.NullPointerException
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Error uploading site
      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:348)
      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:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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 uploading site
      at org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:229)
      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.wagon.TransferFailedException: Error performing commands for file transfer
      at org.apache.maven.wagon.providers.ssh.ScpHelper.putDirectory(ScpHelper.java:232)
      at org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.putDirectory(AbstractJschWagon.java:360)
      at org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:215)
      ... 19 more
      Caused by: org.apache.maven.wagon.CommandExecutionException: Cannot execute remote command: mkdir -p /var/jboss/server/archiva/deploy/CID-PORTAIL-DEV.war/site/banaco/1.2.1-SNAPSHOT/.
      at org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.executeCommand(AbstractJschWagon.java:326)
      at org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.executeCommand(AbstractJschWagon.java:379)
      at org.apache.maven.wagon.providers.ssh.ScpHelper.putDirectory(ScpHelper.java:228)
      ... 21 more
      Caused by: com.jcraft.jsch.JSchException: java.lang.NullPointerException
      at com.jcraft.jsch.Channel.connect(Channel.java:205)
      at com.jcraft.jsch.Channel.connect(Channel.java:144)
      at org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.executeCommand(AbstractJschWagon.java:305)
      ... 23 more

      It can happen on the main module (pom) or on other module (jar, war, ...).

      So automatic SNAPSHOT publishing with Hudson can not work as I would like...

      Thanks for any help.

        Activity

        No changes have yet been made on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            David Pilato
          • Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated: