Maven Wagon
  1. Maven Wagon
  2. WAGON-310

download from Aix directories or files fails

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0-beta-3
    • Fix Version/s: None
    • Component/s: wagon-ssh
    • Labels:
      None
    • Environment:
      maven 2.0.11/2.2.1 from Linux to Aix power5
    • Number of attachments :
      0

      Description

      Downloading of files or directories fails from Aix power5 system.

      When I try to download files from Aix system (using a ssh tunnel, I don't think this is the problem), files are copied with wildcard "*" in the Linux local server.

      pom.xml:
      ...
      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>wagon-maven-plugin</artifactId>
      <configuration>
      <serverId>ssh</serverId>
      </configuration>

      ...
      <goals>
      <goal>download</goal>
      </goals>
      <configuration>
      <fromDir>tmp/</fromDir>
      <toDir>$

      {project.basedir}

      /target</toDir>
      <includes>t*</includes>
      <url>scp://$

      {target.server.name}

      :$

      {target.server.port}

      </url>
      </configuration>
      ...

      traces:
      -------------------------------------------------------------------------------------
      [INFO] Executed tasks
      [DEBUG] Configuring mojo 'org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:download' -->
      [DEBUG] (f) caseSensitive = true
      [DEBUG] (f) fromDir = tmp/adheygere
      [DEBUG] (f) includes = t*
      [DEBUG] (f) project = MavenProject: com.amabis.www.Amalib:Aix:2.1 @ /fs10/home/adheygere/maven-2.2/CVSROOT/Amalib.new/Aix/pom.xml
      [DEBUG] (f) serverId = ssh
      [DEBUG] (f) settings = org.apache.maven.settings.Settings@1c70315
      [DEBUG] (f) skip = false
      [DEBUG] (f) toDir = /fs10/home/adheygere/maven-2.2/CVSROOT/Amalib.new/Aix/target
      [DEBUG] (f) url = scp://localhost:8182
      [DEBUG] – end configuration –
      [INFO] [wagon:download

      {execution: download}

      ]
      Using private key: /home/adheygere/.ssh/id_rsa
      scp://localhost:8182 - Session: Opened
      [INFO] Scanning remote file system: scp://localhost:8182 ...
      Executing command: ls /tmp/adheygere/toto*/
      Executing command: ls /tmp/adheygere/turlututu*/
      [INFO] Downloading scp://localhost:8182/tmp/adheygere/toto* to /fs10/home/adheygere/maven-2.2/CVSROOT/Amalib.new/Aix/target/toto* ...
      Executing command: scp -p -f /tmp/adheygere/toto*
      Remote file permissions: 0777
      Remote file size: 5
      Remote filename: toto
      attempting to create parent directories for destination: toto*
      Downloading: tmp/adheygere/toto* from scp://localhost:8182

      #
      Transfer finished. 5 bytes copied in 0.157 seconds
      [INFO] Downloading scp://localhost:8182/tmp/adheygere/turlututu* to /fs10/home/adheygere/maven-2.2/CVSROOT/Amalib.new/Aix/target/turlututu* ...
      Executing command: scp -p -f /tmp/adheygere/turlututu*
      Remote file permissions: 0777
      Remote file size: 10
      Remote filename: turlututu
      attempting to create parent directories for destination: turlututu*
      Downloading: tmp/adheygere/turlututu* from scp://localhost:8182

      #
      Transfer finished. 10 bytes copied in 0.155 seconds
      scp://localhost:8182 - Session: Disconnecting
      scp://localhost:8182 - Session: Disconnected

      -------------------------------------------------------------------------------------

      In the pom.xml, when using <includes>**<includes> file path are wrong

      traces:
      ------------------------------------------------------------------------------------
      [INFO] Executed tasks
      [DEBUG] Configuring mojo 'org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:download' -->
      [DEBUG] (f) caseSensitive = true
      [DEBUG] (f) fromDir = tmp/adheygere/maven/Amalib/Aix/target/classes/
      [DEBUG] (f) includes = **
      [DEBUG] (f) project = MavenProject: com.amabis.www.Amalib:Aix:2.1 @ /fs10/home/adheygere/maven-2.2/CVSROOT/Amalib.new/Aix/pom.xml
      [DEBUG] (f) serverId = ssh
      [DEBUG] (f) settings = org.apache.maven.settings.Settings@1453d72
      [DEBUG] (f) skip = false
      [DEBUG] (f) toDir = /fs10/home/adheygere/maven-2.2/CVSROOT/Amalib.new/Aix/target
      [DEBUG] (f) url = scp://localhost:8182
      [DEBUG] – end configuration –
      [INFO] [wagon:download

      {execution: download}

      ]
      Using private key: /home/adheygere/.ssh/id_rsa
      scp://localhost:8182 - Session: Opened
      [INFO] Scanning remote file system: scp://localhost:8182 ...
      Executing command: ls /tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt/
      Executing command: ls /tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt/
      Executing command: ls /tmp/adheygere/maven/Amalib/Aix/target/classes/NOTICE.txt/
      Executing command: ls /tmp/adheygere/maven/Amalib/Aix/target/classes/NOTICE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/NOTICE.txt/
      Executing command: ls /tmp/adheygere/maven/Amalib/Aix/target/classes/README.txt/
      Executing command: ls /tmp/adheygere/maven/Amalib/Aix/target/classes/README.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/README.txt/
      Executing command: ls /tmp/adheygere/maven/Amalib/Aix/target/classes/amalib.ini/
      Executing command: ls /tmp/adheygere/maven/Amalib/Aix/target/classes/amalib.ini//tmp/adheygere/maven/Amalib/Aix/target/classes/amalib.ini/
      [INFO] Downloading scp://localhost:8182/tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt to /fs10/home/adheygere/maven-2.2/CVSROOT/Amalib.new/Aix/target/LICENSE.txt/tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt ...
      Executing command: scp -p -f /tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt
      Transfer error: java.io.IOException: Exit code: 1 - scp: /tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt: Not a directory
      Transfer error: org.apache.maven.wagon.TransferFailedException: Error occurred while downloading 'tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt' from the remote repository:Repository[ssh|scp://localhost:8182]: Exit code: 1 - scp: /tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt: Not a directory
      scp://localhost:8182 - Session: Disconnecting
      scp://localhost:8182 - Session: Disconnected
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error handling resource

      Embedded error: Error occurred while downloading 'tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt' from the remote repository:Repository[ssh|scp://localhost:8182]: Exit code: 1 - scp: /tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt: Not a directory
      [INFO] ------------------------------------------------------------------------
      [DEBUG] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Error handling resource
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
      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:597)
      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 handling resource
      at org.codehaus.mojo.wagon.AbstractSingleWagonMojo.execute(AbstractSingleWagonMojo.java:67)
      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 occurred while downloading 'tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt' from the remote repository:Repository[ssh|scp://localhost:8182]: Exit code: 1 - scp: /tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt: Not a directory
      at org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.handleGetException(AbstractJschWagon.java:348)
      at org.apache.maven.wagon.providers.ssh.jsch.ScpWagon.fillInputData(ScpWagon.java:306)
      at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
      at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
      at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
      at org.codehaus.mojo.wagon.shared.DefaultWagonDownload.download(DefaultWagonDownload.java:82)
      at org.codehaus.mojo.wagon.DownloadMojo.execute(DownloadMojo.java:48)
      at org.codehaus.mojo.wagon.AbstractSingleWagonMojo.execute(AbstractSingleWagonMojo.java:63)
      ... 19 more
      Caused by: java.io.IOException: Exit code: 1 - scp: /tmp/adheygere/maven/Amalib/Aix/target/classes//LICENSE.txt//tmp/adheygere/maven/Amalib/Aix/target/classes/LICENSE.txt: Not a directory
      at org.apache.maven.wagon.providers.ssh.jsch.ScpWagon.fillInputData(ScpWagon.java:267)
      ... 25 more
      -------------------------------------------------------------------------------------

        Activity

        Hide
        alain dheygere added a comment -

        When I use external ssh wagon provider: "scpext://localhost:8182..." (ssh tunnel to my aix server) list of remote files is built using: "ls -lFA" and download fails.
        "-F" option would explain the wildcard '*' character added at the end of files with execution permission...

        When I change the url: "scpext://myLinuxServer" list of remote files is built using "ls" and download succeeds.

        How are "ls" options choosen ?

        Show
        alain dheygere added a comment - When I use external ssh wagon provider: "scpext://localhost:8182..." (ssh tunnel to my aix server) list of remote files is built using: "ls -lFA" and download fails. "-F" option would explain the wildcard '*' character added at the end of files with execution permission... When I change the url: "scpext://myLinuxServer" list of remote files is built using "ls" and download succeeds. How are "ls" options choosen ?
        Hide
        alain dheygere added a comment -

        At the end of my tests: wagon plugin, download goal, DEBUG mode, external provider (url: sshext://server)

        reading log traces

        LINUX:
        ------

        • to get list of files/directories, ls command:
          ls -la ...
          => list of files including entries that begin with a . (dot)
        • to know if it is a file or a directory program puts a slash at the end of the path, ls command:
          ls anyfile/
          => if it is a directory, an error is thrown from the command

        Conclusion:
        Download succeeds (also using internal ssh provider url: scp://linuxServer)

        AIX:


        • to get list of files/directories, ls command:
          ls -lFA ... (not the same as LINUX ?!)
          => list of files except . (dot) and ..(dot-dot) but also put an * (asterisk) if the file can be executed etc.
        • to know if it is a file or a directory program puts a slash at the end of the path, ls command:
          ls anyfile/
          => if it is a directory, directory name is sent (not the same behaviour than from LINUX).

        Conclusion:
        Download fails (also using internal ssh provider url: scp://aixServer).

        "ls" command is different between AIX and LINUX

        Show
        alain dheygere added a comment - At the end of my tests: wagon plugin, download goal, DEBUG mode, external provider (url: sshext://server) reading log traces LINUX: ------ to get list of files/directories, ls command: ls -la ... => list of files including entries that begin with a . (dot) to know if it is a file or a directory program puts a slash at the end of the path, ls command: ls anyfile/ => if it is a directory, an error is thrown from the command Conclusion: Download succeeds (also using internal ssh provider url: scp://linuxServer) AIX: to get list of files/directories, ls command: ls -lFA ... (not the same as LINUX ?!) => list of files except . (dot) and ..(dot-dot) but also put an * (asterisk) if the file can be executed etc. to know if it is a file or a directory program puts a slash at the end of the path, ls command: ls anyfile/ => if it is a directory, directory name is sent (not the same behaviour than from LINUX). Conclusion: Download fails (also using internal ssh provider url: scp://aixServer). "ls" command is different between AIX and LINUX
        Hide
        Michael Osipov added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          People

          • Assignee:
            Unassigned
            Reporter:
            alain dheygere
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: