[
https://issues.apache.org/jira/browse/WAGON-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16732235#comment-16732235
]
Michael Osipov commented on WAGON-543:
--------------------------------------
I have modified the wagon-maven-plugin to use {{scpexe}} (wagon-ssh-external)
and applied {{no-channels}} to Wagon:
{noformat}
[mosipov@mika-ion ~/Projekte/wagon-maven-plugin/src/test/projects/ssh-it]$
~/apache-maven-3.6.1-SNAPSHOT/bin/mvn -Debug
-Dit-plugin.version=2.0.1-SNAPSHOT -s settings.xml
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< org.codehaus.mojo:wagon-maven-plugin >----------------
[INFO] Building wagon-maven-plugin testing
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- wagon-maven-plugin:2.0.1-SNAPSHOT:sshexec (ssh-exec) @
wagon-maven-plugin ---
[INFO] sshexec: rm -rf /tmp/wagon ...
[INFO] sshexec: mkdir -p /tmp/wagon/empty ...
[INFO] sshexec: touch /tmp/wagon/a.txt ...
[INFO] sshexec: touch /tmp/wagon/b.txt ...
[INFO]
[INFO] --- wagon-maven-plugin:2.0.1-SNAPSHOT:list (ssh-list-1) @
wagon-maven-plugin ---
[INFO] Scanning remote file system: scpexe://localhost ...
[INFO] a.txt
[INFO]
[INFO] --- wagon-maven-plugin:2.0.1-SNAPSHOT:list (ssh-list-2) @
wagon-maven-plugin ---
[INFO] Scanning remote file system: scpexe://localhost ...
[INFO] a.txt
[INFO] b.txt
[INFO]
[INFO] --- wagon-maven-plugin:2.0.1-SNAPSHOT:upload-single (ssh-upload-single)
@ wagon-maven-plugin ---
[INFO] Uploading:
/usr/home/mosipov/Projekte/wagon-maven-plugin/src/test/projects/ssh-it/src/test/data/gt-32k.txt
scpexe://localhost/tmp/wagon/gt-32k.txt
[INFO]
[INFO] --- wagon-maven-plugin:2.0.1-SNAPSHOT:download-single
(ssh-download-single) @ wagon-maven-plugin ---
[INFO] Downloading: scpexe://localhost/tmp/wagon/gt-32k.txt to
/usr/home/mosipov/Projekte/wagon-maven-plugin/src/test/projects/ssh-it/target/gt-32k.txt
[INFO]
[INFO] --- wagon-maven-plugin:2.0.1-SNAPSHOT:sshexec (ssh-exec-wagon-431) @
wagon-maven-plugin ---
[INFO] sshexec: cat /tmp/wagon/gt-32k.txt ...
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.11</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<!--
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<packaging>pom</packaging>
<version>testing</version>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.9-SNAPSHOT</version> <!-- need WAGON-429 fix -->
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>wagon-maven-plugin-ssh-test</serverId>
<url>scp://localhost:2222</url>
</configuration>
<executions>
<execution>
<id>ssh-exec</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>rm -rf /tmp/wagon</command>
<command>mkdir -p /tmp/wagon/empty</command>
<command>touch /tmp/wagon/a.txt</command>
<command>touch /tmp/wagon/b.txt</command>
</commands>
</configuration>
</execution>
<execution>
<id>ssh-list-1</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
<excludes>**/b.txt</excludes>
</configuration>
</execution>
<execution>
<id>ssh-list-2</id>
<phase>package</phase>
<goals>
<goal>list</goal>
</goals>
<configuration>
<fromDir>/tmp/wagon</fromDir>
<includes>**</includes>
</configuration>
</execution>
<execution>
<id>ssh-upload-single</id>
<phase>package</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>pom.xml</fromFile>
<toFile>tmp/wagon/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-download-single</id>
<phase>package</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<fromFile>tmp/wagon/pom.xml</fromFile>
<toFile>${project.build.directory}/pom.xml</toFile>
</configuration>
</execution>
<execution>
<id>ssh-exec-2</id>
<phase>package</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<displayCommandOutputs>true</displayCommandOutputs>
<commands>
<command>cat /tmp/wagon/pom.xml</command>
</commands>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
-->
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.512 s
[INFO] Finished at: 2019-01-02T18:18:04+01:00
[INFO] ------------------------------------------------------------------------
[mosipov@mika-ion ~/Projekte/wagon-maven-plugin/src/test/projects/ssh-it]$
{noformat}
> wagon-ssh download hangs
> ------------------------
>
> Key: WAGON-543
> URL: https://issues.apache.org/jira/browse/WAGON-543
> Project: Maven Wagon
> Issue Type: Bug
> Components: wagon-ssh
> Affects Versions: 3.3.0
> Reporter: Dan Tran
> Assignee: Michael Osipov
> Priority: Major
> Attachments: debugger screenshot.png
>
>
> To reproduce this issue
> 1. checkout https://github.com/mojohaus/wagon-maven-plugin.git
> 2. Locally build maven 3.6.1-SNAPSHOT with wagon 3.3.0 and run it with
> 3. cd src/test/project/ssh-it; mvn -Dit-plugin.version=2.0.0
> Assume your local account can ssh to same host with ssh key
> other notes:
> * No problem with maven 3.6.0
> * I also have internal ssh library wrapper of wagon-ssh to perform
> sshexe/upload/download activities. Seeing the same issue with wagon 3.3.0
> * The root cause likely is from WAGON-537 with changes at AbstractWagon
> which may have side effect on internal JSCH 32K buffer
> Reverting WAGON-537 fixes this issue
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)