mirror of https://github.com/apache/jclouds.git
JCLOUDS-827: Upgrading sshj to 0.12.0 (new group ID too)
Also upgraded jsch.agentproxy.* to 0.0.9 and bouncycastle to 1.51 - required for the sshj change.
This commit is contained in:
parent
e2b6950462
commit
4f649b43f4
|
@ -62,7 +62,7 @@
|
|||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-ext-jdk15on</artifactId>
|
||||
<version>1.49</version>
|
||||
<version>1.51</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -90,12 +90,12 @@
|
|||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch.agentproxy.jsch</artifactId>
|
||||
<version>0.0.8</version>
|
||||
<version>0.0.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch.agentproxy.connector-factory</artifactId>
|
||||
<version>0.0.8</version>
|
||||
<version>0.0.9</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -87,15 +87,9 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.schmizz</groupId>
|
||||
<groupId>com.hierynomus</groupId>
|
||||
<artifactId>sshj</artifactId>
|
||||
<version>0.8.1</version>
|
||||
</dependency>
|
||||
<!-- required by sshj -->
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk15on</artifactId>
|
||||
<version>1.49</version>
|
||||
<version>0.12.0</version>
|
||||
<exclusions>
|
||||
<!-- provided by the jclouds-bouncycastle driver -->
|
||||
<exclusion>
|
||||
|
@ -107,12 +101,19 @@
|
|||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch.agentproxy.sshj</artifactId>
|
||||
<version>0.0.8</version>
|
||||
<version>0.0.9</version>
|
||||
<exclusions>
|
||||
<!-- required due to sshj group ID change -->
|
||||
<exclusion>
|
||||
<groupId>net.schmizz</groupId>
|
||||
<artifactId>sshj</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch.agentproxy.connector-factory</artifactId>
|
||||
<version>0.0.8</version>
|
||||
<version>0.0.9</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ import net.schmizz.sshj.connection.channel.direct.PTYMode;
|
|||
import net.schmizz.sshj.connection.channel.direct.Session;
|
||||
import net.schmizz.sshj.connection.channel.direct.Session.Command;
|
||||
import net.schmizz.sshj.connection.channel.direct.SessionChannel;
|
||||
import net.schmizz.sshj.sftp.RemoteFile;
|
||||
import net.schmizz.sshj.sftp.SFTPClient;
|
||||
import net.schmizz.sshj.sftp.SFTPException;
|
||||
import net.schmizz.sshj.transport.TransportException;
|
||||
|
@ -271,8 +272,18 @@ public class SshjSshClient implements SshClient {
|
|||
@Override
|
||||
public Payload create() throws Exception {
|
||||
sftp = acquire(sftpConnection);
|
||||
return Payloads.newInputStreamPayload(new CloseFtpChannelOnCloseInputStream(sftp.getSFTPEngine().open(path)
|
||||
.getInputStream(), sftp));
|
||||
final RemoteFile remoteFile = sftp.getSFTPEngine().open(path);
|
||||
final InputStream in = remoteFile.new RemoteFileInputStream() {
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
super.close();
|
||||
} finally {
|
||||
remoteFile.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
return Payloads.newInputStreamPayload(new CloseFtpChannelOnCloseInputStream(in, sftp));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -577,12 +577,12 @@
|
|||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch.agentproxy.core</artifactId>
|
||||
<version>0.0.8</version>
|
||||
<version>0.0.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch.agentproxy.connector-factory</artifactId>
|
||||
<version>0.0.8</version>
|
||||
<version>0.0.9</version>
|
||||
</dependency>
|
||||
</conflictingDependencies>
|
||||
<packages>
|
||||
|
|
Loading…
Reference in New Issue