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/20 16:12:41 UTC
[1/5] mina-sshd git commit: Using singleton
DefaultIoServiceFactoryFactory instance
Repository: mina-sshd
Updated Branches:
refs/heads/master 6dcc709ee -> 6cd387daa
Using singleton DefaultIoServiceFactoryFactory instance
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/cdec39b5
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/cdec39b5
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/cdec39b5
Branch: refs/heads/master
Commit: cdec39b5b6df668a4418c0efb94d83ee2e690515
Parents: 980a5cc
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Fri Apr 20 19:10:39 2018 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Fri Apr 20 19:16:02 2018 +0300
----------------------------------------------------------------------
.../common/helpers/AbstractFactoryManager.java | 2 +-
.../common/io/DefaultIoServiceFactoryFactory.java | 18 +++++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/cdec39b5/sshd-core/src/main/java/org/apache/sshd/common/helpers/AbstractFactoryManager.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/helpers/AbstractFactoryManager.java b/sshd-core/src/main/java/org/apache/sshd/common/helpers/AbstractFactoryManager.java
index 276f531..a05fe65 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/helpers/AbstractFactoryManager.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/helpers/AbstractFactoryManager.java
@@ -487,7 +487,7 @@ public abstract class AbstractFactoryManager extends AbstractKexFactoryManager i
Objects.requireNonNull(getRandomFactory(), "RandomFactory not set");
if (getIoServiceFactoryFactory() == null) {
- setIoServiceFactoryFactory(new DefaultIoServiceFactoryFactory());
+ setIoServiceFactoryFactory(DefaultIoServiceFactoryFactory.getDefaultIoServiceFactoryFactoryInstance());
}
}
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/cdec39b5/sshd-core/src/main/java/org/apache/sshd/common/io/DefaultIoServiceFactoryFactory.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/io/DefaultIoServiceFactoryFactory.java b/sshd-core/src/main/java/org/apache/sshd/common/io/DefaultIoServiceFactoryFactory.java
index 3f4d2a4..74775ff 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/io/DefaultIoServiceFactoryFactory.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/io/DefaultIoServiceFactoryFactory.java
@@ -36,7 +36,7 @@ public class DefaultIoServiceFactoryFactory extends AbstractIoServiceFactoryFact
private IoServiceFactoryFactory factory;
- public DefaultIoServiceFactoryFactory() {
+ protected DefaultIoServiceFactoryFactory() {
this(null, true);
}
@@ -46,11 +46,14 @@ public class DefaultIoServiceFactoryFactory extends AbstractIoServiceFactoryFact
@Override
public IoServiceFactory create(FactoryManager manager) {
- IoServiceFactoryFactory factoryInstance = getFactory();
+ IoServiceFactoryFactory factoryInstance = getIoServiceProvider();
return factoryInstance.create(manager);
}
- private IoServiceFactoryFactory getFactory() {
+ /**
+ * @return The actual {@link IoServiceFactoryFactory} being delegated
+ */
+ public IoServiceFactoryFactory getIoServiceProvider() {
synchronized (this) {
if (factory == null) {
factory = newInstance(IoServiceFactoryFactory.class);
@@ -136,4 +139,13 @@ public class DefaultIoServiceFactoryFactory extends AbstractIoServiceFactoryFact
}
throw new IllegalStateException("Unable to create instance of class " + factory);
}
+
+ private static class LazyDefaultIoServiceFactoryFactoryHolder {
+ private static final DefaultIoServiceFactoryFactory INSTANCE = new DefaultIoServiceFactoryFactory();
+ }
+
+ @SuppressWarnings("synthetic-access")
+ public static DefaultIoServiceFactoryFactory getDefaultIoServiceFactoryFactoryInstance() {
+ return LazyDefaultIoServiceFactoryFactoryHolder.INSTANCE;
+ }
}
[2/5] mina-sshd git commit: [SSHD-817] Using Maven build helper to
attach core test code to Netty code
Posted by lg...@apache.org.
[SSHD-817] Using Maven build helper to attach core test code to Netty code
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/980a5cc0
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/980a5cc0
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/980a5cc0
Branch: refs/heads/master
Commit: 980a5cc0af1b3687712391084fce668f52847aa7
Parents: 329b043
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Fri Apr 20 18:39:53 2018 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Fri Apr 20 19:16:02 2018 +0300
----------------------------------------------------------------------
sshd-netty/pom.xml | 59 ++++++++++++++++++++++++-------------------------
1 file changed, 29 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/980a5cc0/sshd-netty/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-netty/pom.xml b/sshd-netty/pom.xml
index 0067226..45fce5d 100644
--- a/sshd-netty/pom.xml
+++ b/sshd-netty/pom.xml
@@ -121,56 +121,53 @@
</dependencies>
<build>
- <testSourceDirectory>${project.build.directory}/test-sources</testSourceDirectory>
- <testResources>
- <testResource>
- <directory>${project.build.directory}/test-resources</directory>
- </testResource>
- </testResources>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
- <id>copy-test-resources</id>
- <phase>generate-test-resources</phase>
+ <id>add-test-source</id>
+ <phase>generate-test-sources</phase>
<goals>
- <goal>copy-resources</goal>
+ <goal>add-test-source</goal>
</goals>
<configuration>
- <outputDirectory>${project.build.directory}/test-resources</outputDirectory>
- <resources>
- <resource>
- <directory>${projectRoot}/sshd-core/src/test/resources</directory>
- </resource>
- </resources>
+ <sources>
+ <source>${projectRoot}/sshd-core/src/test/java</source>
+ </sources>
</configuration>
</execution>
<execution>
- <id>copy-test-sources</id>
- <phase>generate-test-sources</phase>
+ <id>add-test-resource</id>
+ <phase>generate-test-resources</phase>
<goals>
- <goal>copy-resources</goal>
+ <goal>add-test-resource</goal>
</goals>
<configuration>
- <outputDirectory>${project.build.directory}/test-sources</outputDirectory>
<resources>
<resource>
- <directory>${projectRoot}/sshd-core/src/test/java</directory>
- <excludes>
- <exclude>**/ProxyTest.java</exclude>
- <exclude>**/PortForwardingTest.java</exclude>
- <exclude>**/PortForwardingLoadTest.java</exclude>
- </excludes>
+ <directory>${projectRoot}/sshd-core/src/test/resources</directory>
+ <targetPath>${project.build.testOutputDirectory}</targetPath>
</resource>
</resources>
</configuration>
- </execution>
+ </execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <testExcludes>
+ <!-- These tests use MINA explicitly -->
+ <testExclude>**/PortForwarding*Test.java</testExclude>
+ <testExclude>**/ProxyTest.java</testExclude>
+ </testExcludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
@@ -179,11 +176,13 @@
<org.apache.sshd.common.io.IoServiceFactoryFactory>org.apache.sshd.netty.NettyIoServiceFactoryFactory</org.apache.sshd.common.io.IoServiceFactoryFactory>
</systemProperties>
<excludes>
- <!-- These tests use NIO explicitly -->
+ <!-- These tests use NIO and/or MINA explicitly -->
<exclude>**/*LoadTest.java</exclude>
+ <exclude>**/PortForwarding*Test.java</exclude>
<exclude>**/ProxyTest.java</exclude>
<exclude>**/Nio2ServiceTest.java</exclude>
- <!-- TODO need some more research as to why this fails on MINA but not on NIO2 -->
+
+ <!-- TODO need some more research as to why this fails on Netty but not on NIO2 -->
<exclude>**/ClientDeadlockTest.java</exclude>
<exclude>**/ApacheServer*Test.java</exclude>
<exclude>**/ClientTest.java</exclude>
[5/5] mina-sshd git commit: [SSHD-817] Added clearer indications as
to failure due to channel closed in ChannelOutputStream
Posted by lg...@apache.org.
[SSHD-817] Added clearer indications as to failure due to channel closed in ChannelOutputStream
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/6cd387da
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/6cd387da
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/6cd387da
Branch: refs/heads/master
Commit: 6cd387daa9cd993bdd043cd897dd8f80cbf1fd89
Parents: 8a4ee99
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Fri Apr 20 19:13:33 2018 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Fri Apr 20 19:16:03 2018 +0300
----------------------------------------------------------------------
.../common/channel/ChannelOutputStream.java | 11 ++++--
.../exception/SshChannelClosedException.java | 39 ++++++++++++++++++++
.../java/org/apache/sshd/client/ClientTest.java | 4 +-
.../sshd/client/subsystem/sftp/SftpTest.java | 5 ++-
4 files changed, 52 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/6cd387da/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java
index ecd2ac1..24c0fa0 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java
@@ -28,6 +28,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.SshException;
+import org.apache.sshd.common.channel.exception.SshChannelClosedException;
import org.apache.sshd.common.io.PacketWriter;
import org.apache.sshd.common.session.Session;
import org.apache.sshd.common.util.ValidateUtils;
@@ -104,11 +105,12 @@ public class ChannelOutputStream extends OutputStream implements java.nio.channe
@Override
public synchronized void write(byte[] buf, int s, int l) throws IOException {
+ Channel channel = getChannel();
if (!isOpen()) {
- throw new SshException("write(" + this + ") len=" + l + " - channel already closed");
+ throw new SshChannelClosedException(channel.getId(),
+ "write(" + this + ") len=" + l + " - channel already closed");
}
- Channel channel = getChannel();
Session session = channel.getSession();
boolean debugEnabled = log.isDebugEnabled();
boolean traceEnabled = log.isTraceEnabled();
@@ -167,12 +169,13 @@ public class ChannelOutputStream extends OutputStream implements java.nio.channe
@Override
public synchronized void flush() throws IOException {
+ AbstractChannel channel = getChannel();
if (!isOpen()) {
- throw new SshException("flush(" + this + ") length=" + bufferLength + " - stream is already closed");
+ throw new SshChannelClosedException(channel.getId(),
+ "flush(" + this + ") length=" + bufferLength + " - stream is already closed");
}
try {
- AbstractChannel channel = getChannel();
Session session = channel.getSession();
boolean traceEnabled = log.isTraceEnabled();
while (bufferLength > 0) {
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/6cd387da/sshd-core/src/main/java/org/apache/sshd/common/channel/exception/SshChannelClosedException.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/exception/SshChannelClosedException.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/exception/SshChannelClosedException.java
new file mode 100644
index 0000000..ee4b6ff
--- /dev/null
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/exception/SshChannelClosedException.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+package org.apache.sshd.common.channel.exception;
+
+/**
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ */
+public class SshChannelClosedException extends SshChannelException {
+ private static final long serialVersionUID = 4201656251593797929L;
+
+ public SshChannelClosedException(int channelId, String message) {
+ this(channelId, message, null);
+ }
+
+ public SshChannelClosedException(int channelId, Throwable cause) {
+ this(channelId, cause.getMessage(), cause);
+ }
+
+ public SshChannelClosedException(int channelId, String message, Throwable cause) {
+ super(channelId, message, cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/6cd387da/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java b/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
index 67a5f57..0ae2f11 100644
--- a/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
@@ -75,6 +75,7 @@ import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.SshException;
import org.apache.sshd.common.channel.Channel;
import org.apache.sshd.common.channel.ChannelListener;
+import org.apache.sshd.common.channel.exception.SshChannelClosedException;
import org.apache.sshd.common.config.keys.KeyUtils;
import org.apache.sshd.common.future.CloseFuture;
import org.apache.sshd.common.future.SshFutureListener;
@@ -606,8 +607,9 @@ public class ClientTest extends BaseTestSupport {
invertedStream.write(data);
invertedStream.flush();
}
- } catch (SshException e) {
+ } catch (SshException | SshChannelClosedException e) {
// That's ok, the channel is being closed by the other side
+ outputDebugMessage("%s - ignore %s: %s", getCurrentTestName(), e.getClass().getSimpleName(), e.getMessage());
}
Collection<ClientChannelEvent> mask = EnumSet.of(ClientChannelEvent.CLOSED);
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/6cd387da/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpTest.java
----------------------------------------------------------------------
diff --git a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpTest.java b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpTest.java
index 408fed2..476a18f 100644
--- a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpTest.java
+++ b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpTest.java
@@ -73,6 +73,7 @@ import org.apache.sshd.common.NamedFactory;
import org.apache.sshd.common.OptionalFeature;
import org.apache.sshd.common.PropertyResolverUtils;
import org.apache.sshd.common.channel.WindowClosedException;
+import org.apache.sshd.common.channel.exception.SshChannelClosedException;
import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
import org.apache.sshd.common.random.Random;
import org.apache.sshd.common.subsystem.sftp.SftpConstants;
@@ -1205,10 +1206,10 @@ public class SftpTest extends AbstractSftpClientTestSupport {
session.addPasswordIdentity(getCurrentTestName());
session.auth().verify(5L, TimeUnit.SECONDS);
- PropertyResolverUtils.updateProperty(session, SftpClient.SFTP_CHANNEL_OPEN_TIMEOUT, TimeUnit.SECONDS.toMillis(4L));
+ PropertyResolverUtils.updateProperty(session, SftpClient.SFTP_CHANNEL_OPEN_TIMEOUT, TimeUnit.SECONDS.toMillis(7L));
try (SftpClient sftp = createSftpClient(session)) {
fail("Unexpected SFTP client creation success");
- } catch (SocketTimeoutException | EOFException | WindowClosedException e) {
+ } catch (SocketTimeoutException | EOFException | WindowClosedException | SshChannelClosedException e) {
// expected - ignored
} finally {
PropertyResolverUtils.updateProperty(session, SftpClient.SFTP_CHANNEL_OPEN_TIMEOUT, SftpClient.DEFAULT_CHANNEL_OPEN_TIMEOUT);
[4/5] mina-sshd git commit: [SSHD-817] Expose
BaseTestSupport#getIoServiceProvider method for optional tests exclusions
based on the I/O service provider
Posted by lg...@apache.org.
[SSHD-817] Expose BaseTestSupport#getIoServiceProvider method for optional tests exclusions based on the I/O service provider
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/8a4ee995
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/8a4ee995
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/8a4ee995
Branch: refs/heads/master
Commit: 8a4ee9957baf2158c362ee73f8d6fdc030b776f6
Parents: cdec39b
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Fri Apr 20 19:11:55 2018 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Fri Apr 20 19:16:03 2018 +0300
----------------------------------------------------------------------
.../org/apache/sshd/util/test/BaseTestSupport.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/8a4ee995/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java b/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java
index 87dd4e6..911328a 100644
--- a/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java
+++ b/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java
@@ -99,7 +99,8 @@ public abstract class BaseTestSupport extends Assert {
protected void starting(Description description) {
System.out.println("\nStarting " + description.getClassName() + ":" + description.getMethodName() + "...");
try {
- System.out.println("Using provider: " + DefaultIoServiceFactoryFactory.newInstance(IoServiceFactoryFactory.class).getClass().getName());
+ IoServiceFactoryFactory ioProvider = getIoServiceProvider();
+ System.out.println("Using default provider: " + ioProvider.getClass().getName());
} catch (Throwable t) {
// Ignore
}
@@ -115,7 +116,7 @@ public abstract class BaseTestSupport extends Assert {
};
@Rule
- public final TestName testNameHilder = new TestName();
+ public final TestName testNameHolder = new TestName();
private Path targetFolder;
private Path tempFolder;
@@ -124,7 +125,7 @@ public abstract class BaseTestSupport extends Assert {
}
public final String getCurrentTestName() {
- return testNameHilder.getMethodName();
+ return testNameHolder.getMethodName();
}
protected SshServer setupTestServer() {
@@ -594,4 +595,10 @@ public abstract class BaseTestSupport extends Assert {
System.out.append("===[DEBUG]=== ").println(message);
}
}
+
+ public static IoServiceFactoryFactory getIoServiceProvider() {
+ DefaultIoServiceFactoryFactory factory =
+ DefaultIoServiceFactoryFactory.getDefaultIoServiceFactoryFactoryInstance();
+ return factory.getIoServiceProvider();
+ }
}
[3/5] mina-sshd git commit: [SSHD-806] Using maven build helper
plugin to run core test code
Posted by lg...@apache.org.
[SSHD-806] Using maven build helper plugin to run core test code
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/329b0433
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/329b0433
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/329b0433
Branch: refs/heads/master
Commit: 329b0433f80f3c9929cfb1f1baa0fc3cdb259120
Parents: 6dcc709
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Fri Apr 20 18:16:54 2018 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Fri Apr 20 19:16:02 2018 +0300
----------------------------------------------------------------------
pom.xml | 2 +-
sshd-mina/pom.xml | 39 +++++++++++++++------------------------
2 files changed, 16 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/329b0433/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a7a9457..273b4d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -968,7 +968,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
- <version>1.12</version>
+ <version>3.0.0</version>
<executions>
<execution>
<id>remove-previous-artifact</id>
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/329b0433/sshd-mina/pom.xml
----------------------------------------------------------------------
diff --git a/sshd-mina/pom.xml b/sshd-mina/pom.xml
index 4eca6d2..88df02a 100644
--- a/sshd-mina/pom.xml
+++ b/sshd-mina/pom.xml
@@ -114,47 +114,38 @@
</dependencies>
<build>
- <testSourceDirectory>${project.build.directory}/test-sources</testSourceDirectory>
- <testResources>
- <testResource>
- <directory>${project.build.directory}/test-resources</directory>
- </testResource>
- </testResources>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
- <id>copy-test-resources</id>
- <phase>generate-test-resources</phase>
+ <id>add-test-source</id>
+ <phase>generate-test-sources</phase>
<goals>
- <goal>copy-resources</goal>
+ <goal>add-test-source</goal>
</goals>
<configuration>
- <outputDirectory>${project.build.directory}/test-resources</outputDirectory>
- <resources>
- <resource>
- <directory>${projectRoot}/sshd-core/src/test/resources</directory>
- </resource>
- </resources>
+ <sources>
+ <source>${projectRoot}/sshd-core/src/test/java</source>
+ </sources>
</configuration>
</execution>
<execution>
- <id>copy-test-sources</id>
- <phase>generate-test-sources</phase>
+ <id>add-test-resource</id>
+ <phase>generate-test-resources</phase>
<goals>
- <goal>copy-resources</goal>
+ <goal>add-test-resource</goal>
</goals>
<configuration>
- <outputDirectory>${project.build.directory}/test-sources</outputDirectory>
<resources>
<resource>
- <directory>${projectRoot}/sshd-core/src/test/java</directory>
+ <directory>${projectRoot}/sshd-core/src/test/resources</directory>
+ <targetPath>${project.build.testOutputDirectory}</targetPath>
</resource>
</resources>
</configuration>
- </execution>
+ </execution>
</executions>
</plugin>
<plugin>