You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2018/04/17 04:58:28 UTC
[1/4] mina-sshd git commit: [SSHD-806] Added MINA I/O factory testing
for sshd-git module
Repository: mina-sshd
Updated Branches:
refs/heads/master dc5682e6e -> 58569bd10
[SSHD-806] Added MINA I/O factory testing for sshd-git module
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/58569bd1
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/58569bd1
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/58569bd1
Branch: refs/heads/master
Commit: 58569bd10f63b1e76400bb8f29aaa9e72ceaa55c
Parents: 25ba6df
Author: Goldstein Lyor <ly...@c-b4.com>
Authored: Tue Apr 17 07:37:07 2018 +0300
Committer: Goldstein Lyor <ly...@c-b4.com>
Committed: Tue Apr 17 07:58:21 2018 +0300
----------------------------------------------------------------------
sshd-git/pom.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/58569bd1/sshd-git/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-git/pom.xml b/sshd-git/pom.xml
index f9e16a7..abae18f 100644
--- a/sshd-git/pom.xml
+++ b/sshd-git/pom.xml
@@ -111,6 +111,10 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <reportsDirectory>${project.build.directory}/surefire-reports-nio2</reportsDirectory>
+ <systemProperties>
+ <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.nio2.Nio2ServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+ </systemProperties>
</configuration>
</plugin>
<plugin>
@@ -122,4 +126,46 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>test-mina</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.sshd</groupId>
+ <artifactId>sshd-mina</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>mina</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <reportsDirectory>${project.build.directory}/surefire-reports-mina</reportsDirectory>
+ <systemProperties>
+ <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.mina.MinaServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
[3/4] mina-sshd git commit: [SSHD-815] Inverted test dependency
between MINA and SFTP
Posted by lg...@apache.org.
[SSHD-815] Inverted test dependency between MINA and SFTP
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/25ba6df9
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/25ba6df9
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/25ba6df9
Branch: refs/heads/master
Commit: 25ba6df93a8364e4efaa360d0720be0a85d5b6e3
Parents: 84e009a
Author: Goldstein Lyor <ly...@c-b4.com>
Authored: Tue Apr 17 07:32:38 2018 +0300
Committer: Goldstein Lyor <ly...@c-b4.com>
Committed: Tue Apr 17 07:58:21 2018 +0300
----------------------------------------------------------------------
sshd-mina/pom.xml | 9 ---------
sshd-sftp/pom.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/25ba6df9/sshd-mina/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-mina/pom.xml b/sshd-mina/pom.xml
index 0234e85..71ada5a 100644
--- a/sshd-mina/pom.xml
+++ b/sshd-mina/pom.xml
@@ -57,12 +57,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.sshd</groupId>
- <artifactId>sshd-sftp</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>net.i2p.crypto</groupId>
<artifactId>eddsa</artifactId>
<scope>test</scope>
@@ -158,9 +152,6 @@
<resource>
<directory>${projectRoot}/sshd-core/src/test/java</directory>
</resource>
- <resource>
- <directory>${projectRoot}/sshd-sftp/src/test/java</directory>
- </resource>
</resources>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/25ba6df9/sshd-sftp/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-sftp/pom.xml b/sshd-sftp/pom.xml
index e8d3f8d..cc52367 100644
--- a/sshd-sftp/pom.xml
+++ b/sshd-sftp/pom.xml
@@ -96,6 +96,10 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <reportsDirectory>${project.build.directory}/surefire-reports-nio2</reportsDirectory>
+ <systemProperties>
+ <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.nio2.Nio2ServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+ </systemProperties>
</configuration>
</plugin>
<plugin>
@@ -107,4 +111,46 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>test-mina</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.sshd</groupId>
+ <artifactId>sshd-mina</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>mina</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <reportsDirectory>${project.build.directory}/surefire-reports-mina</reportsDirectory>
+ <systemProperties>
+ <org.apache.sshd.common.io.IoServiceFactory>org.apache.sshd.common.io.mina.MinaServiceFactory</org.apache.sshd.common.io.IoServiceFactory>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
[2/4] mina-sshd git commit: [SSHD-815] Fixed README.md text regarding
user-specific SFTP client creation factory
Posted by lg...@apache.org.
[SSHD-815] Fixed README.md text regarding user-specific SFTP client creation factory
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/84e009a6
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/84e009a6
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/84e009a6
Branch: refs/heads/master
Commit: 84e009a64a1dedfddcee8f56b11ac415604ae8f1
Parents: 12548b4
Author: Goldstein Lyor <ly...@c-b4.com>
Authored: Mon Apr 16 16:11:50 2018 +0300
Committer: Goldstein Lyor <ly...@c-b4.com>
Committed: Tue Apr 17 07:58:21 2018 +0300
----------------------------------------------------------------------
README.md | 8 +++-----
.../org/apache/sshd/client/simple/SimpleSftpClientImpl.java | 4 ++--
2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/84e009a6/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 52c5180..ecf2317 100644
--- a/README.md
+++ b/README.md
@@ -596,20 +596,18 @@ configuration key. For more advanced restrictions one needs to sub-class `SftpSu
The code creates `SftpClient`-s and `SftpFileSystem`-s using a default built-in `SftpClientFactory` instance (see
`DefaultSftpClientFactory`). Users may choose to use a custom factory in order to provide their own
-implementations - e.g., in order to override some default behavior. The custom factory may be registered either at
-the client or session level - e.g.:
+implementations - e.g., in order to override some default behavior - e.g.:
```java
SshClient client = ... setup client...
try (ClientSession session = client.connect(user, host, port).verify(timeout).getSession()) {
- // override the default factory with a special one - but only for this session
- session.setSftpClientFactory();
session.addPasswordIdentity(password);
session.auth.verify(timeout);
- try (SftpClient sftp = new SpecialSessionSftpClientFactory().createSftpClient()) {
+ // User-specific factory
+ try (SftpClient sftp = MySpecialSessionSftpClientFactory.INSTANCE.createSftpClient(session)) {
... instance created through SpecialSessionSftpClientFactory ...
}
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/84e009a6/sshd-sftp/src/main/java/org/apache/sshd/client/simple/SimpleSftpClientImpl.java
----------------------------------------------------------------------
diff --git a/sshd-sftp/src/main/java/org/apache/sshd/client/simple/SimpleSftpClientImpl.java b/sshd-sftp/src/main/java/org/apache/sshd/client/simple/SimpleSftpClientImpl.java
index 09a7007..4f47d8a 100644
--- a/sshd-sftp/src/main/java/org/apache/sshd/client/simple/SimpleSftpClientImpl.java
+++ b/sshd-sftp/src/main/java/org/apache/sshd/client/simple/SimpleSftpClientImpl.java
@@ -41,7 +41,7 @@ public class SimpleSftpClientImpl extends AbstractLoggingBean implements SimpleS
public SimpleSftpClientImpl(SimpleClient client, SftpClientFactory sftpClientFactory) {
this.client = client;
- this.sftpClientFactory = sftpClientFactory != null ? sftpClientFactory : SftpClientFactory.instance();
+ setSftpClientFactory(sftpClientFactory);
}
public SimpleClient getClient() {
@@ -57,7 +57,7 @@ public class SimpleSftpClientImpl extends AbstractLoggingBean implements SimpleS
}
public void setSftpClientFactory(SftpClientFactory sftpClientFactory) {
- this.sftpClientFactory = sftpClientFactory;
+ this.sftpClientFactory = (sftpClientFactory != null) ? sftpClientFactory : SftpClientFactory.instance();
}
@Override
[4/4] mina-sshd git commit: [SSHD-815] Split
java.nio.file.spi.FileSystemProvider service file to sshd-sftp artifact
Posted by lg...@apache.org.
[SSHD-815] Split java.nio.file.spi.FileSystemProvider service file to sshd-sftp artifact
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/12548b41
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/12548b41
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/12548b41
Branch: refs/heads/master
Commit: 12548b41645fc279e664425a84fb98567ad6f5c7
Parents: dc5682e
Author: Goldstein Lyor <ly...@c-b4.com>
Authored: Mon Apr 16 16:05:26 2018 +0300
Committer: Goldstein Lyor <ly...@c-b4.com>
Committed: Tue Apr 17 07:58:21 2018 +0300
----------------------------------------------------------------------
.../java.nio.file.spi.FileSystemProvider | 1 -
sshd-sftp/pom.xml | 7 +++++++
.../java.nio.file.spi.FileSystemProvider | 20 ++++++++++++++++++++
3 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/12548b41/sshd-core/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider b/sshd-core/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider
index 7d90d38..8ba8cb4 100644
--- a/sshd-core/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider
+++ b/sshd-core/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider
@@ -17,5 +17,4 @@
## under the License.
##
-org.apache.sshd.client.subsystem.sftp.SftpFileSystemProvider
org.apache.sshd.common.file.root.RootedFileSystemProvider
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/12548b41/sshd-sftp/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-sftp/pom.xml b/sshd-sftp/pom.xml
index 7d4f74a..e8d3f8d 100644
--- a/sshd-sftp/pom.xml
+++ b/sshd-sftp/pom.xml
@@ -83,6 +83,13 @@
</dependencies>
<build>
+ <resources>
+ <resource>
+ <directory>src/main/filtered-resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/12548b41/sshd-sftp/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider
----------------------------------------------------------------------
diff --git a/sshd-sftp/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider b/sshd-sftp/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider
new file mode 100644
index 0000000..75fea68
--- /dev/null
+++ b/sshd-sftp/src/main/filtered-resources/META-INF/services/java.nio.file.spi.FileSystemProvider
@@ -0,0 +1,20 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+org.apache.sshd.client.subsystem.sftp.SftpFileSystemProvider