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:42 UTC

[2/5] mina-sshd git commit: [SSHD-817] Using Maven build helper to attach core test code to Netty code

[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>