[maven-surefire] branch maven2surefire-jvm-communication updated (fae7bd7 -> a69ad60)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven-surefire] branch maven2surefire-jvm-communication updated (fae7bd7 -> a69ad60)

Tibor Digana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a change to branch maven2surefire-jvm-communication
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.


    from fae7bd7  fixed compilation errors (two tests hang, and see: todo stdOut)
     new 60c0201  skipped tests in CI
     new a69ad60  resolved the previous problems

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml                                        |  2 +-
 Jenkinsfile                                        |  2 +-
 .../maven/plugin/failsafe/IntegrationTestMojo.java | 10 +++
 .../plugin/surefire/AbstractSurefireMojo.java      | 23 +++++--
 .../AbstractClasspathForkConfiguration.java        |  6 +-
 .../surefire/booterclient/BooterSerializer.java    |  5 +-
 .../booterclient/ClasspathForkConfiguration.java   |  6 +-
 .../booterclient/DefaultForkConfiguration.java     | 12 ++--
 .../surefire/booterclient/ForkConfiguration.java   |  4 +-
 .../plugin/surefire/booterclient/ForkStarter.java  | 67 +++++++++---------
 .../booterclient/JarManifestForkConfiguration.java |  6 +-
 .../ModularClasspathForkConfiguration.java         |  6 +-
 .../lazytestprovider/AbstractCommandReader.java    | 19 ++---
 .../lazytestprovider/DefaultCommandReader.java     |  7 +-
 ...nder.java => DefferedChannelCommandSender.java} |  7 +-
 .../booterclient/output/ExecutableCommandline.java | 43 ------------
 .../output/NativeStdErrStreamConsumer.java         |  6 +-
 .../output/NativeStdOutStreamConsumer.java         | 33 +++++----
 .../output/NetworkingProcessExecutor.java          | 53 --------------
 .../output/ThreadedStreamConsumer.java             |  8 ++-
 .../LegacyForkChannel.java}                        | 28 +++++---
 .../surefire/extensions/LegacyForkNodeFactory.java | 25 ++++---
 .../extensions/NetworkingProcessExecutor.java      | 80 ++++++++++++++++++++++
 .../output => extensions}/PipeProcessExecutor.java | 68 +++++++++++-------
 .../plugin/surefire/extensions/StdErrAdapter.java  | 27 +++-----
 .../plugin/surefire/extensions/StdOutAdapter.java  | 27 +++-----
 .../SurefireForkChannel.java}                      | 40 +++++------
 .../extensions/SurefireForkNodeFactory.java        | 25 ++++---
 .../AbstractSurefireMojoJava7PlusTest.java         |  7 ++
 .../plugin/surefire/AbstractSurefireMojoTest.java  |  7 ++
 .../maven/plugin/surefire/MojoMocklessTest.java    |  7 ++
 ...ooterDeserializerProviderConfigurationTest.java |  3 +-
 ...BooterDeserializerStartupConfigurationTest.java |  3 +-
 .../booterclient/DefaultForkConfigurationTest.java | 22 +++---
 .../booterclient/ForkConfigurationTest.java        |  8 +--
 .../TestLessInputStreamBuilderTest.java            |  3 +-
 .../TestProvidingInputStreamTest.java              | 14 ++--
 .../maven/plugin/surefire/SurefirePlugin.java      | 10 +++
 pom.xml                                            |  5 +-
 .../maven/surefire/booter/BooterConstants.java     |  1 +
 .../maven/surefire/booter/BooterDeserializer.java  |  5 ++
 surefire-extensions-api/pom.xml                    |  5 ++
 ...ForkedChannelServer.java => CommandReader.java} | 29 ++++----
 .../maven/surefire/extensions/EventHandler.java    | 15 ++--
 .../surefire/extensions/ExecutableCommandline.java | 28 ++++----
 .../{ForkedChannelServer.java => ForkChannel.java} | 31 ++++-----
 .../maven/surefire/extensions/ForkNodeFactory.java | 17 +++--
 .../maven/surefire/extensions/ForkedChannel.java   | 55 ---------------
 .../surefire/extensions/StdErrStreamLine.java      |  9 ++-
 .../surefire/extensions/StdOutStreamLine.java      |  8 +--
 50 files changed, 461 insertions(+), 476 deletions(-)
 rename maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/{DifferedChannelCommandSender.java => DefferedChannelCommandSender.java} (82%)
 delete mode 100644 maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ExecutableCommandline.java
 copy surefire-its/src/test/resources/pojo-simple/src/test/java/PojoTest.java => maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NativeStdOutStreamConsumer.java (63%)
 delete mode 100644 maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NetworkingProcessExecutor.java
 copy maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/{booterclient/ProviderDetector.java => extensions/LegacyForkChannel.java} (62%)
 copy surefire-its/src/test/resources/surefire-510-testClassPath/src/test/java/surefire510/Test1.java => maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/LegacyForkNodeFactory.java (67%)
 create mode 100644 maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/NetworkingProcessExecutor.java
 rename maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/{booterclient/output => extensions}/PipeProcessExecutor.java (52%)
 copy surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/NullBalancer.java => maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/StdErrAdapter.java (67%)
 copy surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/NullBalancer.java => maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/StdOutAdapter.java (67%)
 copy maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/{report/NullConsoleOutputReceiver.java => extensions/SurefireForkChannel.java} (55%)
 copy surefire-its/src/test/resources/surefire-510-testClassPath/src/test/java/surefire510/Test1.java => maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkNodeFactory.java (67%)
 copy surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/{ForkedChannelServer.java => CommandReader.java} (70%)
 copy surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterException.java => surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/EventHandler.java (69%)
 copy surefire-its/src/test/resources/testng-execute-error/src/test/java/it/BasicTest.java => surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ExecutableCommandline.java (56%)
 rename surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/{ForkedChannelServer.java => ForkChannel.java} (58%)
 rename maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/ExecutableCommandlineFactory.java => surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkNodeFactory.java (70%)
 delete mode 100644 surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannel.java
 rename maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java => surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StdErrStreamLine.java (82%)
 copy surefire-api/src/main/java/org/apache/maven/surefire/util/RunOrderCalculator.java => surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StdOutStreamLine.java (82%)

Reply | Threaded
Open this post in threaded view
|

[maven-surefire] 01/02: skipped tests in CI

Tibor Digana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch maven2surefire-jvm-communication
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 60c0201c55262d37ab1681921d92c217998955ac
Author: tibordigana <[hidden email]>
AuthorDate: Fri Nov 8 12:49:48 2019 +0100

    skipped tests in CI
---
 .travis.yml | 2 +-
 Jenkinsfile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 072c60a..ea8f8ff 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,7 +24,7 @@ cache:
 
 install: true
 jdk: openjdk8
-script: mvn clean package -nsu -DskipITs
+script: mvn clean package -nsu -DskipTests -DskipITs
 
 branches:
   only:
diff --git a/Jenkinsfile b/Jenkinsfile
index 1cee6be..f69bfae 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -35,7 +35,7 @@ final def mavens = env.BRANCH_NAME == 'master' ? ['3.6.x', '3.2.x'] : ['3.6.x']
 // all non-EOL versions and the first EA
 final def jdks = [13, 12, 11, 8, 7]
 
-final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
+final def options = ['-e', '-V', '-B', '-nsu', '-DskipTests', '-DskipITs']
 final def goals = ['clean', 'install']
 final def goalsDepl = ['clean', 'deploy', 'jacoco:report']
 final Map stages = [:]

Reply | Threaded
Open this post in threaded view
|

[maven-surefire] 02/02: resolved the previous problems

Tibor Digana
In reply to this post by Tibor Digana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch maven2surefire-jvm-communication
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit a69ad6099f47e0d7b3103250a05aa870923be360
Author: tibordigana <[hidden email]>
AuthorDate: Fri Nov 8 13:15:19 2019 +0100

    resolved the previous problems
---
 .../maven/plugin/failsafe/IntegrationTestMojo.java | 10 +++
 .../plugin/surefire/AbstractSurefireMojo.java      | 23 +++++--
 .../AbstractClasspathForkConfiguration.java        |  6 +-
 .../surefire/booterclient/BooterSerializer.java    |  5 +-
 .../booterclient/ClasspathForkConfiguration.java   |  6 +-
 .../booterclient/DefaultForkConfiguration.java     | 12 ++--
 .../surefire/booterclient/ForkConfiguration.java   |  4 +-
 .../plugin/surefire/booterclient/ForkStarter.java  | 67 +++++++++---------
 .../booterclient/JarManifestForkConfiguration.java |  6 +-
 .../ModularClasspathForkConfiguration.java         |  6 +-
 .../lazytestprovider/AbstractCommandReader.java    | 19 ++---
 .../lazytestprovider/DefaultCommandReader.java     |  7 +-
 ...nder.java => DefferedChannelCommandSender.java} |  7 +-
 .../booterclient/output/ExecutableCommandline.java | 43 ------------
 .../output/NativeStdErrStreamConsumer.java         |  6 +-
 ...andler.java => NativeStdOutStreamConsumer.java} | 22 ++++--
 .../output/NetworkingProcessExecutor.java          | 53 --------------
 .../output/ThreadedStreamConsumer.java             |  8 ++-
 .../surefire/extensions/LegacyForkChannel.java     | 31 +++++----
 .../LegacyForkNodeFactory.java}                    | 18 +++--
 .../extensions/NetworkingProcessExecutor.java      | 80 ++++++++++++++++++++++
 .../output => extensions}/PipeProcessExecutor.java | 68 +++++++++++-------
 .../StdErrAdapter.java}                            | 21 ++++--
 .../StdOutAdapter.java}                            | 21 ++++--
 .../surefire/extensions/SurefireForkChannel.java   | 36 ++++++----
 .../SurefireForkNodeFactory.java}                  | 18 +++--
 .../AbstractSurefireMojoJava7PlusTest.java         |  7 ++
 .../plugin/surefire/AbstractSurefireMojoTest.java  |  7 ++
 .../maven/plugin/surefire/MojoMocklessTest.java    |  7 ++
 ...ooterDeserializerProviderConfigurationTest.java |  3 +-
 ...BooterDeserializerStartupConfigurationTest.java |  3 +-
 .../booterclient/DefaultForkConfigurationTest.java | 22 +++---
 .../booterclient/ForkConfigurationTest.java        |  8 +--
 .../TestLessInputStreamBuilderTest.java            |  3 +-
 .../TestProvidingInputStreamTest.java              | 14 ++--
 .../maven/plugin/surefire/SurefirePlugin.java      | 10 +++
 pom.xml                                            |  5 +-
 .../maven/surefire/booter/BooterConstants.java     |  1 +
 .../maven/surefire/booter/BooterDeserializer.java  |  5 ++
 surefire-extensions-api/pom.xml                    |  5 ++
 ...ForkedChannelServer.java => CommandReader.java} | 29 ++++----
 .../maven/surefire/extensions}/EventHandler.java   | 11 +--
 ...annelServer.java => ExecutableCommandline.java} | 35 ++++------
 .../{ForkedChannelServer.java => ForkChannel.java} | 31 ++++-----
 .../maven/surefire/extensions/ForkNodeFactory.java | 17 +++--
 .../maven/surefire/extensions/ForkedChannel.java   | 55 ---------------
 .../surefire/extensions/StdErrStreamLine.java      |  9 ++-
 .../surefire/extensions/StdOutStreamLine.java      |  9 ++-
 48 files changed, 478 insertions(+), 421 deletions(-)

diff --git a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
index d900e37..19f9e63 100644
--- a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
+++ b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
@@ -27,6 +27,7 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.apache.maven.surefire.suite.RunResult;
 
 import java.io.File;
@@ -386,6 +387,9 @@ public class IntegrationTestMojo
     @Parameter( property = "failsafe.useModulePath", defaultValue = "true" )
     private boolean useModulePath;
 
+    @Parameter( property = "failsafe.forkNode" )
+    private ForkNodeFactory forkNode;
+
     @Override
     protected int getRerunFailingTestsCount()
     {
@@ -841,6 +845,12 @@ public class IntegrationTestMojo
         return suiteXmlFiles != null && suiteXmlFiles.length != 0;
     }
 
+    @Override
+    protected final ForkNodeFactory getForkNode()
+    {
+        return forkNode;
+    }
+
     static Charset toCharset( String encoding )
     {
         return Charset.forName( Charset.isSupported( encoding ) ? encoding : encoding.toUpperCase( Locale.ROOT ) );
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index ef989b2..f4fea89 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -25,8 +25,8 @@ import org.apache.maven.artifact.DefaultArtifact;
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Dependency;
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter;
+import org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory;
 import org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter;
 import org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter;
 import org.apache.maven.plugins.annotations.Component;
@@ -73,6 +73,7 @@ import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SurefireBooterForkException;
 import org.apache.maven.surefire.booter.SurefireExecutionException;
 import org.apache.maven.surefire.cli.CommandLineOption;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.apache.maven.surefire.providerapi.SurefireProvider;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.suite.RunResult;
@@ -835,6 +836,8 @@ public abstract class AbstractSurefireMojo
 
     protected abstract void setUseModulePath( boolean useModulePath );
 
+    protected abstract ForkNodeFactory getForkNode();
+
     /**
      * This plugin MOJO artifact.
      *
@@ -2253,6 +2256,14 @@ public abstract class AbstractSurefireMojo
                                               getConsoleLogger() );
     }
 
+    // todo this is in separate method and can be better tested than whole method createForkConfiguration()
+    @Nonnull
+    private ForkNodeFactory getForkNodeFactory()
+    {
+        ForkNodeFactory forkNode = getForkNode();
+        return forkNode == null ? new SurefireForkNodeFactory() : forkNode;
+    }
+
     @Nonnull
     private ForkConfiguration createForkConfiguration( Platform platform )
     {
@@ -2262,9 +2273,7 @@ public abstract class AbstractSurefireMojo
 
         Classpath bootClasspath = getArtifactClasspath( shadeFire != null ? shadeFire : surefireBooterArtifact );
 
-        //todo Enrico, here should be implementation for pipes and NettyIO depending on MOJO configuration
-        // todo we will create a new @Parameter with POJO object of complex configuration for TCP/IP
-        ExecutableCommandlineFactory executableCommandlineFactory = null;
+        ForkNodeFactory forkNode = getForkNodeFactory();
 
         if ( canExecuteProviderWithModularPath( platform ) )
         {
@@ -2280,7 +2289,7 @@ public abstract class AbstractSurefireMojo
                     reuseForks,
                     platform,
                     getConsoleLogger(),
-                    executableCommandlineFactory );
+                    forkNode );
         }
         else if ( getClassLoaderConfiguration().isManifestOnlyJarRequestedAndUsable() )
         {
@@ -2296,7 +2305,7 @@ public abstract class AbstractSurefireMojo
                     reuseForks,
                     platform,
                     getConsoleLogger(),
-                    executableCommandlineFactory );
+                    forkNode );
         }
         else
         {
@@ -2312,7 +2321,7 @@ public abstract class AbstractSurefireMojo
                     reuseForks,
                     platform,
                     getConsoleLogger(),
-                    executableCommandlineFactory );
+                    forkNode );
         }
     }
 
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/AbstractClasspathForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/AbstractClasspathForkConfiguration.java
index 8d867cd..1bb6a00 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/AbstractClasspathForkConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/AbstractClasspathForkConfiguration.java
@@ -19,9 +19,9 @@ package org.apache.maven.plugin.surefire.booterclient;
  * under the License.
  */
 
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
 import org.apache.maven.surefire.booter.Classpath;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -50,10 +50,10 @@ abstract class AbstractClasspathForkConfiguration
                                         boolean reuseForks,
                                         @Nonnull Platform pluginPlatform,
                                         @Nonnull ConsoleLogger log,
-                                        @Nonnull ExecutableCommandlineFactory executableCommandlineFactory )
+                                        @Nonnull ForkNodeFactory forkNodeFactory )
     {
         super( bootClasspath, tempDirectory, debugLine, workingDirectory, modelProperties, argLine,
-                environmentVariables, debug, forkCount, reuseForks, pluginPlatform, log, executableCommandlineFactory );
+                environmentVariables, debug, forkCount, reuseForks, pluginPlatform, log, forkNodeFactory );
     }
 
     @Override
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
index fe72fce..d668017 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
@@ -69,6 +69,7 @@ import static org.apache.maven.surefire.booter.BooterConstants.TESTARTIFACT_CLAS
 import static org.apache.maven.surefire.booter.BooterConstants.TESTARTIFACT_VERSION;
 import static org.apache.maven.surefire.booter.BooterConstants.USEMANIFESTONLYJAR;
 import static org.apache.maven.surefire.booter.BooterConstants.USESYSTEMCLASSLOADER;
+import static org.apache.maven.surefire.booter.BooterConstants.FORK_NODE_CONNECTION_STRING;
 import static org.apache.maven.surefire.booter.SystemPropertyManager.writePropertiesFile;
 
 /**
@@ -100,11 +101,11 @@ class BooterSerializer
      */
     File serialize( KeyValueSource sourceProperties, ProviderConfiguration booterConfiguration,
                     StartupConfiguration providerConfiguration, Object testSet, boolean readTestsFromInStream,
-                    Long pid, int forkNumber )
+                    Long pid, int forkNumber, String forkNodeConnectionString )
         throws IOException
     {
         SurefireProperties properties = new SurefireProperties( sourceProperties );
-
+        properties.setProperty( FORK_NODE_CONNECTION_STRING, forkNodeConnectionString );
         properties.setProperty( PLUGIN_PID, pid );
 
         AbstractPathConfiguration cp = providerConfiguration.getClasspathConfiguration();
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java
index 81864f3..13b1dd1 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java
@@ -19,12 +19,12 @@ package org.apache.maven.plugin.surefire.booterclient;
  * under the License.
  */
 
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
 import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -48,10 +48,10 @@ public final class ClasspathForkConfiguration
                                        @Nonnull Map<String, String> environmentVariables, boolean debug, int forkCount,
                                        boolean reuseForks, @Nonnull Platform pluginPlatform,
                                        @Nonnull ConsoleLogger log,
-                                       @Nonnull ExecutableCommandlineFactory executableCommandlineFactory )
+                                       @Nonnull ForkNodeFactory forkNodeFactory )
     {
         super( bootClasspath, tempDirectory, debugLine, workingDirectory, modelProperties, argLine,
-                environmentVariables, debug, forkCount, reuseForks, pluginPlatform, log, executableCommandlineFactory );
+                environmentVariables, debug, forkCount, reuseForks, pluginPlatform, log, forkNodeFactory );
     }
 
     @Override
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
index 1caa71a..c500e2c 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
@@ -20,13 +20,13 @@ package org.apache.maven.plugin.surefire.booterclient;
  */
 
 import org.apache.maven.plugin.surefire.JdkAttributes;
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
 import org.apache.maven.surefire.booter.AbstractPathConfiguration;
 import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.apache.maven.surefire.util.internal.ImmutableMap;
 
 import javax.annotation.Nonnull;
@@ -65,7 +65,7 @@ public abstract class DefaultForkConfiguration
     private final boolean reuseForks;
     @Nonnull private final Platform pluginPlatform;
     @Nonnull private final ConsoleLogger log;
-    @Nonnull private final ExecutableCommandlineFactory executableCommandlineFactory;
+    @Nonnull private final ForkNodeFactory forkNodeFactory;
 
     @SuppressWarnings( "checkstyle:parameternumber" )
     protected DefaultForkConfiguration( @Nonnull Classpath booterClasspath,
@@ -80,7 +80,7 @@ public abstract class DefaultForkConfiguration
                                      boolean reuseForks,
                                      @Nonnull Platform pluginPlatform,
                                      @Nonnull ConsoleLogger log,
-                                     @Nonnull ExecutableCommandlineFactory executableCommandlineFactory )
+                                     @Nonnull ForkNodeFactory forkNodeFactory )
     {
         this.booterClasspath = booterClasspath;
         this.tempDirectory = tempDirectory;
@@ -94,7 +94,7 @@ public abstract class DefaultForkConfiguration
         this.reuseForks = reuseForks;
         this.pluginPlatform = pluginPlatform;
         this.log = log;
-        this.executableCommandlineFactory = executableCommandlineFactory;
+        this.forkNodeFactory = forkNodeFactory;
     }
 
     protected abstract void resolveClasspath( @Nonnull OutputStreamFlushableCommandline cli,
@@ -111,9 +111,9 @@ public abstract class DefaultForkConfiguration
 
     @Nonnull
     @Override
-    public final ExecutableCommandlineFactory getExecutableCommandlineFactory()
+    public final ForkNodeFactory getForkNodeFactory()
     {
-        return executableCommandlineFactory;
+        return forkNodeFactory;
     }
 
     /**
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
index 881d542..d10522d 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
@@ -20,12 +20,12 @@ package org.apache.maven.plugin.surefire.booterclient;
  */
 
 import org.apache.maven.plugin.surefire.JdkAttributes;
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
 import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.ForkedBooter;
 import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -40,7 +40,7 @@ public abstract class ForkConfiguration
 {
     static final String DEFAULT_PROVIDER_CLASS = ForkedBooter.class.getName();
 
-    @Nonnull public abstract ExecutableCommandlineFactory getExecutableCommandlineFactory();
+    @Nonnull public abstract ForkNodeFactory getForkNodeFactory();
     @Nonnull public abstract File getTempDirectory();
     @Nullable protected abstract String getDebugLine();
     @Nonnull protected abstract File getWorkingDirectory();
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
index 5c28299..f89c5e7 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
@@ -27,15 +27,13 @@ import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.Notifiable
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStream;
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestProvidingInputStream;
-import org.apache.maven.plugin.surefire.booterclient.output.ExecutableCommandline;
 import org.apache.maven.plugin.surefire.booterclient.output.ForkClient;
 import org.apache.maven.plugin.surefire.booterclient.output.InPluginProcessDumpSingleton;
 import org.apache.maven.plugin.surefire.booterclient.output.NativeStdErrStreamConsumer;
+import org.apache.maven.plugin.surefire.booterclient.output.NativeStdOutStreamConsumer;
 import org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer;
 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
 import org.apache.maven.plugin.surefire.report.DefaultReporterFactory;
-import org.apache.maven.shared.utils.cli.CommandLineCallable;
-import org.apache.maven.shared.utils.cli.CommandLineException;
 import org.apache.maven.surefire.booter.AbstractPathConfiguration;
 import org.apache.maven.surefire.booter.KeyValueSource;
 import org.apache.maven.surefire.booter.PropertiesWrapper;
@@ -45,6 +43,11 @@ import org.apache.maven.surefire.booter.Shutdown;
 import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SurefireBooterForkException;
 import org.apache.maven.surefire.booter.SurefireExecutionException;
+import org.apache.maven.surefire.extensions.ExecutableCommandline;
+import org.apache.maven.surefire.extensions.ForkChannel;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
+import org.apache.maven.surefire.extensions.StdErrStreamLine;
+import org.apache.maven.surefire.extensions.StdOutStreamLine;
 import org.apache.maven.surefire.providerapi.SurefireProvider;
 import org.apache.maven.surefire.report.StackTraceWriter;
 import org.apache.maven.surefire.suite.RunResult;
@@ -85,8 +88,7 @@ import static org.apache.maven.plugin.surefire.SurefireHelper.DUMP_FILE_PREFIX;
 import static org.apache.maven.plugin.surefire.SurefireHelper.replaceForkThreadsInPath;
 import static org.apache.maven.plugin.surefire.booterclient.ForkNumberBucket.drawNumber;
 import static org.apache.maven.plugin.surefire.booterclient.ForkNumberBucket.returnNumber;
-import static org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStream
-                      .TestLessInputStreamBuilder;
+import static org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStream.TestLessInputStreamBuilder;
 import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.addShutDownHook;
 import static org.apache.maven.shared.utils.cli.ShutdownHookUtils.removeShutdownHook;
 import static org.apache.maven.surefire.booter.SystemPropertyManager.writePropertiesFile;
@@ -189,7 +191,7 @@ public class ForkStarter
                 {
                     closeable.close();
                 }
-                catch ( IOException e )
+                catch ( IOException | RuntimeException e )
                 {
                     // This error does not fail a test and does not necessarily mean that the forked JVM std/out stream
                     // was not closed, see ThreadedStreamConsumer. This error means that JVM wrote messages to a native
@@ -209,10 +211,16 @@ public class ForkStarter
         @Override
         public void close()
         {
-            run();
-            if ( inputStreamCloserHook != null )
+            try
+            {
+                run();
+            }
+            finally
             {
-                removeShutdownHook( inputStreamCloserHook );
+                if ( inputStreamCloserHook != null )
+                {
+                    removeShutdownHook( inputStreamCloserHook );
+                }
             }
         }
     }
@@ -280,10 +288,8 @@ public class ForkStarter
             defaultReporterFactories.add( forkedReporterFactory );
             ForkClient forkClient =
                     new ForkClient( forkedReporterFactory, stream, log, new AtomicBoolean(), forkNumber );
-            ExecutableCommandline<String> executableCommandline =
-                    forkConfiguration.getExecutableCommandlineFactory().createExecutableCommandline( stream );
             return fork( null, props, forkClient, effectiveSystemProperties, forkNumber, stream,
-                    executableCommandline, false );
+                    forkConfiguration.getForkNodeFactory(), false );
         }
         finally
         {
@@ -372,12 +378,9 @@ public class ForkStarter
                         Map<String, String> providerProperties = providerConfiguration.getProviderProperties();
                         try
                         {
-                            ExecutableCommandline<String> executableCommandline =
-                                    forkConfiguration.getExecutableCommandlineFactory()
-                                            .createExecutableCommandline( testProvidingInputStream );
                             return fork( null, new PropertiesWrapper( providerProperties ), forkClient,
                                     effectiveSystemProperties, forkNumber, testProvidingInputStream,
-                                    executableCommandline, true );
+                                    forkConfiguration.getForkNodeFactory(), true );
                         }
                         finally
                         {
@@ -449,13 +452,10 @@ public class ForkStarter
                         TestLessInputStream stream = builder.build();
                         try
                         {
-                            ExecutableCommandline<String> executableCommandline =
-                                    forkConfiguration.getExecutableCommandlineFactory()
-                                            .createExecutableCommandline( stream );
                             return fork( testSet,
                                          new PropertiesWrapper( providerConfiguration.getProviderProperties() ),
                                          forkClient, effectiveSystemProperties, forkNumber, stream,
-                                         executableCommandline, false );
+                                         forkConfiguration.getForkNodeFactory(), false );
                         }
                         finally
                         {
@@ -551,24 +551,25 @@ public class ForkStarter
 
     private RunResult fork( Object testSet, KeyValueSource providerProperties, ForkClient forkClient,
                             SurefireProperties effectiveSystemProperties, int forkNumber,
-                            AbstractCommandReader commandSender, ExecutableCommandline<String> executableCommandline,
+                            AbstractCommandReader commandSender, ForkNodeFactory forkNodeFactory,
                             boolean readTestsFromInStream )
         throws SurefireBooterForkException
     {
         final String tempDir;
         final File surefireProperties;
         final File systPropsFile;
+        final ForkChannel forkChannel;
         try
         {
+            forkChannel = forkNodeFactory.createForkChannel();
             tempDir = forkConfiguration.getTempDirectory().getCanonicalPath();
             BooterSerializer booterSerializer = new BooterSerializer( forkConfiguration );
             Long pluginPid = forkConfiguration.getPluginPlatform().getPluginPid();
-
-            // todo Enrico, add the socket config in providerProperties. The fork VM will read it and connect.
-            surefireProperties = booterSerializer.serialize( providerProperties, providerConfiguration,
-                    startupConfiguration, testSet, readTestsFromInStream, pluginPid, forkNumber );
-
             log.debug( "Determined Maven Process ID " + pluginPid );
+            String connectionString = forkChannel.getForkNodeConnectionString();
+            log.debug( "Fork Channel [" + forkNumber + "] connection string " + connectionString );
+            surefireProperties = booterSerializer.serialize( providerProperties, providerConfiguration,
+                    startupConfiguration, testSet, readTestsFromInStream, pluginPid, forkNumber, connectionString );
 
             if ( effectiveSystemProperties != null )
             {
@@ -604,7 +605,7 @@ public class ForkStarter
         }
 
         ThreadedStreamConsumer threadedStreamConsumer = new ThreadedStreamConsumer( forkClient );
-        CloseableCloser closer = new CloseableCloser( forkNumber, threadedStreamConsumer, commandSender );
+        CloseableCloser closer = new CloseableCloser( forkNumber, threadedStreamConsumer, commandSender, forkChannel );
 
         log.debug( "Forking command line: " + cli );
 
@@ -613,11 +614,12 @@ public class ForkStarter
         SurefireBooterForkException booterForkException = null;
         try
         {
-            NativeStdErrStreamConsumer stdErrConsumer =
-                    new NativeStdErrStreamConsumer( forkClient.getDefaultReporterFactory() );
+            StdErrStreamLine stdErrConsumer = new NativeStdErrStreamConsumer( forkClient.getDefaultReporterFactory() );
+            StdOutStreamLine stdOutConsumer = new NativeStdOutStreamConsumer( log );
+            ExecutableCommandline executableCommandline = forkChannel.createExecutableCommandline();
 
-            CommandLineCallable future = executableCommandline.executeCommandLineAsCallable( cli, commandSender,
-                    threadedStreamConsumer, /*todo stdOut*/ null, stdErrConsumer, closer );
+            Callable<Integer> future = executableCommandline.executeCommandLineAsCallable( cli, commandSender,
+                    threadedStreamConsumer, stdOutConsumer, stdErrConsumer, closer );
 
             currentForkClients.add( forkClient );
 
@@ -633,8 +635,9 @@ public class ForkStarter
                         new SurefireBooterForkException( "Error occurred in starting fork, check output in log" );
             }
         }
-        catch ( CommandLineException e )
+        catch ( Exception e )
         {
+            // CommandLineException from pipes and IOException from sockets
             runResult = failure( forkClient.getDefaultReporterFactory().getGlobalRunStatistics().getRunResult(), e );
             String cliErr = e.getLocalizedMessage();
             Throwable cause = e.getCause();
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
index 6c4253f..2f62ab5 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
@@ -19,13 +19,13 @@ package org.apache.maven.plugin.surefire.booterclient;
  * under the License.
  */
 
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
 import org.apache.maven.plugin.surefire.booterclient.output.InPluginProcessDumpSingleton;
 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
 import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -66,10 +66,10 @@ public final class JarManifestForkConfiguration
                                          @Nonnull Map<String, String> environmentVariables, boolean debug,
                                          int forkCount, boolean reuseForks, @Nonnull Platform pluginPlatform,
                                          @Nonnull ConsoleLogger log,
-                                         @Nonnull ExecutableCommandlineFactory executableCommandlineFactory )
+                                         @Nonnull ForkNodeFactory forkNodeFactory )
     {
         super( bootClasspath, tempDirectory, debugLine, workingDirectory, modelProperties, argLine,
-                environmentVariables, debug, forkCount, reuseForks, pluginPlatform, log, executableCommandlineFactory );
+                environmentVariables, debug, forkCount, reuseForks, pluginPlatform, log, forkNodeFactory );
     }
 
     @Override
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
index 29ff3f1..de9135e 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
@@ -19,7 +19,6 @@ package org.apache.maven.plugin.surefire.booterclient;
  * under the License.
  */
 
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
 import org.apache.maven.plugin.surefire.booterclient.output.InPluginProcessDumpSingleton;
 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
@@ -29,6 +28,7 @@ import org.apache.maven.surefire.booter.ModularClasspath;
 import org.apache.maven.surefire.booter.ModularClasspathConfiguration;
 import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.ClassVisitor;
 import org.objectweb.asm.ModuleVisitor;
@@ -73,10 +73,10 @@ public class ModularClasspathForkConfiguration
                                               boolean reuseForks,
                                               @Nonnull Platform pluginPlatform,
                                               @Nonnull ConsoleLogger log,
-                                              @Nonnull ExecutableCommandlineFactory executableCommandlineFactory )
+                                              @Nonnull ForkNodeFactory forkNodeFactory )
     {
         super( bootClasspath, tempDirectory, debugLine, workingDirectory, modelProperties, argLine,
-                environmentVariables, debug, forkCount, reuseForks, pluginPlatform, log, executableCommandlineFactory );
+                environmentVariables, debug, forkCount, reuseForks, pluginPlatform, log, forkNodeFactory );
     }
 
     @Override
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandReader.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandReader.java
index 9d2c738..a31e9f7 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandReader.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandReader.java
@@ -19,32 +19,24 @@ package org.apache.maven.plugin.surefire.booterclient.lazytestprovider;
  * under the License.
  */
 
+import org.apache.maven.surefire.extensions.CommandReader;
+
 import java.io.IOException;
 
 import static java.util.Objects.requireNonNull;
 
 /**
- * Reader stream sends bytes to the forked jvm std-input-stream.
+ * Stream reader returns bytes which ar finally sent to the forked jvm std-input-stream.
  *
  * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
  * @since 2.19
  */
 public abstract class AbstractCommandReader
-    implements DifferedChannelCommandSender
+        implements CommandReader, DefferedChannelCommandSender
 {
     private volatile FlushReceiverProvider flushReceiverProvider;
 
     /**
-     * Waits for the next command and
-     * reads complete stream of encoded {@link org.apache.maven.surefire.booter.MasterProcessCommand command}.
-     *
-     * @return encoded command, or null if closed
-     */
-    public abstract byte[] readNextCommand() throws IOException;
-    public abstract void close();
-    public abstract boolean isClosed();
-
-    /**
      * @param flushReceiverProvider the provider for a flush receiver.
      */
     @Override
@@ -53,7 +45,8 @@ public abstract class AbstractCommandReader
         this.flushReceiverProvider = requireNonNull( flushReceiverProvider );
     }
 
-    protected void tryFlush()
+    @Override
+    public void tryFlush()
         throws IOException
     {
         if ( flushReceiverProvider != null )
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DefaultCommandReader.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DefaultCommandReader.java
index 1479c48..9aa19c3 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DefaultCommandReader.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DefaultCommandReader.java
@@ -20,7 +20,6 @@ package org.apache.maven.plugin.surefire.booterclient.lazytestprovider;
  */
 
 import org.apache.maven.surefire.booter.Command;
-import org.apache.maven.surefire.booter.MasterProcessCommand;
 
 import java.io.IOException;
 
@@ -63,7 +62,7 @@ public abstract class DefaultCommandReader
      * @throws IOException {@inheritDoc}
      */
     @Override
-    public byte[] readNextCommand()
+    public Command readNextCommand()
         throws IOException
     {
         tryFlush();
@@ -86,8 +85,6 @@ public abstract class DefaultCommandReader
             return null;
         }
 
-        Command cmd = nextCommand();
-        MasterProcessCommand cmdType = cmd.getCommandType();
-        return cmdType.hasDataType() ? cmdType.encode( cmd.getData() ) : cmdType.encode();
+        return nextCommand();
     }
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DifferedChannelCommandSender.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DefferedChannelCommandSender.java
similarity index 82%
rename from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DifferedChannelCommandSender.java
rename to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DefferedChannelCommandSender.java
index 11fd9f3..e489caa 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DifferedChannelCommandSender.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/DefferedChannelCommandSender.java
@@ -19,19 +19,16 @@ package org.apache.maven.plugin.surefire.booterclient.lazytestprovider;
  * under the License.
  */
 
-import org.apache.maven.surefire.extensions.ForkedChannelServer;
-
 import java.io.Closeable;
 
 /**
  * Physical implementation of command sender.<br>
- * Instance of {@link AbstractCommandReader} (namely {@link TestLessInputStream} or {@link TestProvidingInputStream})
- * or the implementation of {@link ForkedChannelServer} (supported by MOJO plugin configuration).
+ * Instance of {@link AbstractCommandReader} (namely {@link TestLessInputStream} or {@link TestProvidingInputStream}).
  *
  * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
  * @since 3.0.0-M4
  */
-public interface DifferedChannelCommandSender
+public interface DefferedChannelCommandSender
     extends NotifiableTestStream, Closeable
 {
     void setFlushReceiverProvider( FlushReceiverProvider flushReceiverProvider );
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ExecutableCommandline.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ExecutableCommandline.java
deleted file mode 100644
index 7694cda..0000000
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ExecutableCommandline.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandReader;
-import org.apache.maven.shared.utils.cli.CommandLineCallable;
-import org.apache.maven.shared.utils.cli.CommandLineException;
-import org.apache.maven.shared.utils.cli.Commandline;
-import org.apache.maven.shared.utils.cli.StreamConsumer;
-
-import javax.annotation.Nonnull;
-
-/**
- * todo add javadoc
- * @param <T> type of event
- */
-public interface ExecutableCommandline<T>
-{
-    @Nonnull CommandLineCallable executeCommandLineAsCallable( @Nonnull Commandline cli,
-                                                               @Nonnull AbstractCommandReader commands,
-                                                               @Nonnull EventHandler<T> events,
-                                                               StreamConsumer stdOut,
-                                                               StreamConsumer stdErr,
-                                                               @Nonnull Runnable runAfterProcessTermination )
-            throws CommandLineException;
-}
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NativeStdErrStreamConsumer.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NativeStdErrStreamConsumer.java
index ace4f8a..d5ff714 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NativeStdErrStreamConsumer.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NativeStdErrStreamConsumer.java
@@ -20,7 +20,7 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  */
 
 import org.apache.maven.plugin.surefire.report.DefaultReporterFactory;
-import org.apache.maven.shared.utils.cli.StreamConsumer;
+import org.apache.maven.surefire.extensions.StdErrStreamLine;
 
 /**
  * Used by forked JMV, see {@link org.apache.maven.plugin.surefire.booterclient.ForkStarter}.
@@ -30,7 +30,7 @@ import org.apache.maven.shared.utils.cli.StreamConsumer;
  * @see org.apache.maven.plugin.surefire.booterclient.ForkStarter
  */
 public final class NativeStdErrStreamConsumer
-    implements StreamConsumer
+        implements StdErrStreamLine
 {
     private final DefaultReporterFactory defaultReporterFactory;
 
@@ -40,7 +40,7 @@ public final class NativeStdErrStreamConsumer
     }
 
     @Override
-    public void consumeLine( String line )
+    public void handleLine( String line )
     {
         InPluginProcessDumpSingleton.getSingleton()
                 .dumpStreamText( line, defaultReporterFactory.getReportsDirectory() );
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NativeStdOutStreamConsumer.java
similarity index 62%
copy from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
copy to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NativeStdOutStreamConsumer.java
index b503ae9..1f915ae 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NativeStdOutStreamConsumer.java
@@ -9,7 +9,7 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  * "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
+ *   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
@@ -19,11 +19,25 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  * under the License.
  */
 
+import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
+import org.apache.maven.surefire.extensions.StdOutStreamLine;
+
 /**
  *
- * @param <T> type of event
  */
-interface EventHandler<T>
+public class NativeStdOutStreamConsumer
+        implements StdOutStreamLine
 {
-    void handleEvent( T event );
+    private final ConsoleLogger logger;
+
+    public NativeStdOutStreamConsumer( ConsoleLogger logger )
+    {
+        this.logger = logger;
+    }
+
+    @Override
+    public void handleLine( String line )
+    {
+        logger.info( line );
+    }
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NetworkingProcessExecutor.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NetworkingProcessExecutor.java
deleted file mode 100644
index f424980..0000000
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/NetworkingProcessExecutor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandReader;
-import org.apache.maven.shared.utils.cli.CommandLineCallable;
-import org.apache.maven.shared.utils.cli.CommandLineException;
-import org.apache.maven.shared.utils.cli.CommandLineUtils;
-import org.apache.maven.shared.utils.cli.Commandline;
-import org.apache.maven.shared.utils.cli.StreamConsumer;
-
-import javax.annotation.Nonnull;
-
-import static java.nio.charset.StandardCharsets.ISO_8859_1;
-
-/**
- * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
- * @since 3.0.0-M4
- */
-final class NetworkingProcessExecutor
-        implements ExecutableCommandline
-{
-    @Nonnull
-    @Override
-    public CommandLineCallable executeCommandLineAsCallable( @Nonnull Commandline cli,
-                                                             @Nonnull AbstractCommandReader commands,
-                                                             @Nonnull EventHandler events,
-                                                             StreamConsumer stdOut,
-                                                             StreamConsumer stdErr,
-                                                             @Nonnull Runnable runAfterProcessTermination )
-            throws CommandLineException
-    {
-        return CommandLineUtils.executeCommandLineAsCallable( cli, null, stdOut, stdErr,
-                0, runAfterProcessTermination, ISO_8859_1 );
-    }
-}
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
index 96723d1..7288969 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
@@ -20,8 +20,10 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  */
 
 import org.apache.maven.shared.utils.cli.StreamConsumer;
+import org.apache.maven.surefire.extensions.EventHandler;
 import org.apache.maven.surefire.util.internal.DaemonThreadFactory;
 
+import javax.annotation.Nonnull;
 import java.io.Closeable;
 import java.io.IOException;
 import java.util.concurrent.ArrayBlockingQueue;
@@ -36,7 +38,7 @@ import static java.lang.Thread.currentThread;
  * @author Kristian Rosenvold
  */
 public final class ThreadedStreamConsumer
-        implements StreamConsumer, EventHandler<String>, Closeable
+        implements EventHandler, StreamConsumer, Closeable
 {
     private static final String END_ITEM = "";
 
@@ -113,13 +115,13 @@ public final class ThreadedStreamConsumer
     }
 
     @Override
-    public void handleEvent( String event )
+    public void handleEvent( @Nonnull String event )
     {
         consumeLine( event );
     }
 
     @Override
-    public void consumeLine( String s )
+    public void consumeLine( @Nonnull String s )
     {
         if ( stop.get() && !thread.isAlive() )
         {
diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/LegacyForkChannel.java
similarity index 60%
copy from surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
copy to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/LegacyForkChannel.java
index b65dab7..28cad5a 100644
--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/LegacyForkChannel.java
@@ -1,4 +1,4 @@
-package org.apache.maven.surefire.extensions;
+package org.apache.maven.plugin.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,31 +19,32 @@ package org.apache.maven.surefire.extensions;
  * under the License.
  */
 
-import org.apache.maven.surefire.booter.Command;
+import org.apache.maven.surefire.extensions.ExecutableCommandline;
+import org.apache.maven.surefire.extensions.ForkChannel;
 
+import javax.annotation.Nonnull;
 import java.io.IOException;
 
 /**
- * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
- * @since 3.0.0-M4
+ *
  */
-public abstract class ForkedChannelServer
-    implements AutoCloseable
+final class LegacyForkChannel implements ForkChannel
 {
-    private final String channelConfig;
-
-    public ForkedChannelServer( String channelConfig )
+    @Override
+    public String getForkNodeConnectionString()
     {
-        this.channelConfig = channelConfig;
+        return "pipe://";
     }
 
-    public String getChannelConfig()
+    @Nonnull
+    @Override
+    public ExecutableCommandline createExecutableCommandline() throws IOException
     {
-        return channelConfig;
+        return new PipeProcessExecutor();
     }
 
-    public abstract void send( Command command ) throws IOException;
-
     @Override
-    public abstract void close() throws IOException;
+    public void close() throws IOException
+    {
+    }
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/LegacyForkNodeFactory.java
similarity index 65%
copy from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
copy to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/LegacyForkNodeFactory.java
index b503ae9..7231d00 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/LegacyForkNodeFactory.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
+package org.apache.maven.plugin.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,11 +19,21 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  * under the License.
  */
 
+import org.apache.maven.surefire.extensions.ForkChannel;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
+
+import javax.annotation.Nonnull;
+import java.io.IOException;
+
 /**
  *
- * @param <T> type of event
  */
-interface EventHandler<T>
+public class LegacyForkNodeFactory implements ForkNodeFactory
 {
-    void handleEvent( T event );
+    @Nonnull
+    @Override
+    public ForkChannel createForkChannel() throws IOException
+    {
+        return new LegacyForkChannel();
+    }
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/NetworkingProcessExecutor.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/NetworkingProcessExecutor.java
new file mode 100644
index 0000000..d640e02
--- /dev/null
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/NetworkingProcessExecutor.java
@@ -0,0 +1,80 @@
+package org.apache.maven.plugin.surefire.extensions;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.shared.utils.cli.CommandLineUtils;
+import org.apache.maven.shared.utils.cli.Commandline;
+import org.apache.maven.surefire.extensions.CommandReader;
+import org.apache.maven.surefire.extensions.EventHandler;
+import org.apache.maven.surefire.extensions.ExecutableCommandline;
+import org.apache.maven.surefire.extensions.StdErrStreamLine;
+import org.apache.maven.surefire.extensions.StdOutStreamLine;
+
+import javax.annotation.Nonnull;
+import java.net.ServerSocket;
+import java.util.concurrent.Callable;
+
+import static java.nio.charset.StandardCharsets.US_ASCII;
+
+/**
+ * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
+ * @since 3.0.0-M4
+ */
+final class NetworkingProcessExecutor implements ExecutableCommandline
+{
+    private final ServerSocket ss;
+
+    NetworkingProcessExecutor( ServerSocket ss )
+    {
+        this.ss = ss;
+    }
+
+    @Nonnull
+    @Override
+    public <T> Callable<Integer> executeCommandLineAsCallable( @Nonnull T cli,
+                                                               @Nonnull CommandReader commands,
+                                                               @Nonnull EventHandler events,
+                                                               StdOutStreamLine stdOut,
+                                                               StdErrStreamLine stdErr,
+                                                               @Nonnull Runnable runAfterProcessTermination )
+            throws Exception
+    {
+        /*
+        Call in Threads:
+
+        Socket s = ss.accept();
+
+        for ( Scanner scanner = new Scanner( s.getInputStream(), "ASCII" ); scanner.hasNextLine(); )
+        {
+            events.handleEvent( scanner.nextLine() );
+        }
+
+        Command cmd = commands.readNextCommand();
+        if ( cmd != null )
+        {
+            MasterProcessCommand cmdType = cmd.getCommandType();
+            s.getOutputStream()
+                    .write( cmdType.hasDataType() ? cmdType.encode( cmd.getData() ) : cmdType.encode() );
+        }*/
+
+        return CommandLineUtils.executeCommandLineAsCallable( (Commandline) cli, null,
+                new StdOutAdapter( stdOut ), new StdErrAdapter( stdErr ), 0, runAfterProcessTermination, US_ASCII );
+    }
+}
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/PipeProcessExecutor.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/PipeProcessExecutor.java
similarity index 52%
rename from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/PipeProcessExecutor.java
rename to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/PipeProcessExecutor.java
index fb0b9e8..562a350 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/PipeProcessExecutor.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/PipeProcessExecutor.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
+package org.apache.maven.plugin.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,46 +19,64 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  * under the License.
  */
 
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandReader;
-import org.apache.maven.shared.utils.cli.CommandLineCallable;
-import org.apache.maven.shared.utils.cli.CommandLineException;
-import org.apache.maven.shared.utils.cli.Commandline;
 import org.apache.maven.shared.utils.cli.CommandLineUtils;
+import org.apache.maven.shared.utils.cli.Commandline;
 import org.apache.maven.shared.utils.cli.StreamConsumer;
+import org.apache.maven.surefire.booter.Command;
+import org.apache.maven.surefire.booter.MasterProcessCommand;
+import org.apache.maven.surefire.extensions.CommandReader;
+import org.apache.maven.surefire.extensions.EventHandler;
+import org.apache.maven.surefire.extensions.ExecutableCommandline;
+import org.apache.maven.surefire.extensions.StdErrStreamLine;
+import org.apache.maven.surefire.extensions.StdOutStreamLine;
 
 import javax.annotation.Nonnull;
-
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.concurrent.Callable;
 
-import static java.nio.charset.StandardCharsets.ISO_8859_1;
+import static java.nio.charset.StandardCharsets.US_ASCII;
 
 /**
+ * Commands which are sent from plugin to the forked jvm.
+ * <br>
+ * Events are received from the forked jvm.
+ * <br>
+ * <br>
+ * magic number : opcode [: opcode specific data]*
+ * <br>
+ * or data encoded with Base64
+ * <br>
+ * magic number : opcode [: Base64(opcode specific data)]*
+ *
+ * The command and event must be finished by the character ':' and New Line.
+ *
  * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
  * @since 3.0.0-M4
  */
 final class PipeProcessExecutor
-    implements ExecutableCommandline<String>
+        implements ExecutableCommandline
 {
     @Override
     @Nonnull
-    public CommandLineCallable executeCommandLineAsCallable( @Nonnull Commandline cli,
-                                                             @Nonnull AbstractCommandReader commands,
-                                                             @Nonnull EventHandler<String> events,
-                                                             StreamConsumer stdOut,
-                                                             StreamConsumer stdErr,
-                                                             @Nonnull Runnable runAfterProcessTermination )
-            throws CommandLineException
+    public <T> Callable<Integer> executeCommandLineAsCallable( @Nonnull T cli,
+                                                               @Nonnull CommandReader commands,
+                                                               @Nonnull EventHandler events,
+                                                               StdOutStreamLine stdOut,
+                                                               StdErrStreamLine stdErr,
+                                                               @Nonnull Runnable runAfterProcessTermination )
+            throws Exception
     {
-        return CommandLineUtils.executeCommandLineAsCallable( cli, new CommandReaderAdapter( commands ),
-                new EventHandlerAdapter( events ), stdErr, 0, runAfterProcessTermination, ISO_8859_1 );
+        return CommandLineUtils.executeCommandLineAsCallable( (Commandline) cli, new CommandReaderAdapter( commands ),
+                new EventHandlerAdapter( events ), new StdErrAdapter( stdErr ),
+                0, runAfterProcessTermination, US_ASCII );
     }
 
     private static class EventHandlerAdapter implements StreamConsumer
     {
-        private final EventHandler<String> events;
+        private final EventHandler events;
 
-        private EventHandlerAdapter( EventHandler<String> events )
+        private EventHandlerAdapter( EventHandler events )
         {
             this.events = events;
         }
@@ -72,13 +90,12 @@ final class PipeProcessExecutor
 
     private static class CommandReaderAdapter extends InputStream
     {
-        private final AbstractCommandReader commands;
-
+        private final CommandReader commands;
         private byte[] currentBuffer;
         private int currentPos;
         private volatile boolean closed;
 
-        CommandReaderAdapter( AbstractCommandReader commands )
+        CommandReaderAdapter( CommandReader commands )
         {
             this.commands = commands;
         }
@@ -98,11 +115,14 @@ final class PipeProcessExecutor
 
             if ( currentBuffer == null )
             {
-                currentBuffer = commands.readNextCommand();
-                if ( currentBuffer == null )
+                Command cmd = commands.readNextCommand();
+                if ( cmd == null )
                 {
+                    currentPos = 0;
                     return -1;
                 }
+                MasterProcessCommand cmdType = cmd.getCommandType();
+                currentBuffer = cmdType.hasDataType() ? cmdType.encode( cmd.getData() ) : cmdType.encode();
             }
 
             @SuppressWarnings( "checkstyle:magicnumber" )
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/StdErrAdapter.java
similarity index 64%
copy from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
copy to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/StdErrAdapter.java
index b503ae9..cfe4292 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/StdErrAdapter.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
+package org.apache.maven.plugin.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,11 +19,24 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  * under the License.
  */
 
+import org.apache.maven.shared.utils.cli.StreamConsumer;
+import org.apache.maven.surefire.extensions.StdErrStreamLine;
+
 /**
  *
- * @param <T> type of event
  */
-interface EventHandler<T>
+final class StdErrAdapter implements StreamConsumer
 {
-    void handleEvent( T event );
+    private final StdErrStreamLine stdErr;
+
+    StdErrAdapter( StdErrStreamLine stdErr )
+    {
+        this.stdErr = stdErr;
+    }
+
+    @Override
+    public void consumeLine( String line )
+    {
+        stdErr.handleLine( line );
+    }
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/StdOutAdapter.java
similarity index 64%
copy from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
copy to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/StdOutAdapter.java
index b503ae9..0ded7fa 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/StdOutAdapter.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
+package org.apache.maven.plugin.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,11 +19,24 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  * under the License.
  */
 
+import org.apache.maven.shared.utils.cli.StreamConsumer;
+import org.apache.maven.surefire.extensions.StdOutStreamLine;
+
 /**
  *
- * @param <T> type of event
  */
-interface EventHandler<T>
+final class StdOutAdapter implements StreamConsumer
 {
-    void handleEvent( T event );
+    private final StdOutStreamLine stdOut;
+
+    StdOutAdapter( StdOutStreamLine stdOut )
+    {
+        this.stdOut = stdOut;
+    }
+
+    @Override
+    public void consumeLine( String line )
+    {
+        stdOut.handleLine( line );
+    }
 }
diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
similarity index 53%
copy from surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
copy to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
index b65dab7..da35ac4 100644
--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
@@ -1,4 +1,4 @@
-package org.apache.maven.surefire.extensions;
+package org.apache.maven.plugin.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,31 +19,41 @@ package org.apache.maven.surefire.extensions;
  * under the License.
  */
 
-import org.apache.maven.surefire.booter.Command;
+import org.apache.maven.surefire.extensions.ExecutableCommandline;
+import org.apache.maven.surefire.extensions.ForkChannel;
 
+import javax.annotation.Nonnull;
 import java.io.IOException;
+import java.net.ServerSocket;
 
 /**
- * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
- * @since 3.0.0-M4
+ *
  */
-public abstract class ForkedChannelServer
-    implements AutoCloseable
+final class SurefireForkChannel implements ForkChannel
 {
-    private final String channelConfig;
+    private final ServerSocket ss;
 
-    public ForkedChannelServer( String channelConfig )
+    SurefireForkChannel() throws IOException
     {
-        this.channelConfig = channelConfig;
+        ss = new ServerSocket( 0 );
     }
 
-    public String getChannelConfig()
+    @Override
+    public String getForkNodeConnectionString()
     {
-        return channelConfig;
+        return "tcp://127.0.0.1:" + ss.getLocalPort();
     }
 
-    public abstract void send( Command command ) throws IOException;
+    @Nonnull
+    @Override
+    public ExecutableCommandline createExecutableCommandline() throws IOException
+    {
+        return new NetworkingProcessExecutor( ss );
+    }
 
     @Override
-    public abstract void close() throws IOException;
+    public void close() throws IOException
+    {
+        ss.close();
+    }
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkNodeFactory.java
similarity index 65%
copy from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
copy to maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkNodeFactory.java
index b503ae9..c483619 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkNodeFactory.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
+package org.apache.maven.plugin.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,11 +19,21 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  * under the License.
  */
 
+import org.apache.maven.surefire.extensions.ForkChannel;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
+
+import javax.annotation.Nonnull;
+import java.io.IOException;
+
 /**
  *
- * @param <T> type of event
  */
-interface EventHandler<T>
+public class SurefireForkNodeFactory implements ForkNodeFactory
 {
-    void handleEvent( T event );
+    @Nonnull
+    @Override
+    public ForkChannel createForkChannel() throws IOException
+    {
+        return new SurefireForkChannel();
+    }
 }
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java
index b178d64..44621c5 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoJava7PlusTest.java
@@ -28,6 +28,7 @@ import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
 import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.ModularClasspathConfiguration;
 import org.apache.maven.surefire.booter.StartupConfiguration;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.apache.maven.surefire.suite.RunResult;
 import org.apache.maven.surefire.util.DefaultScanResult;
 import org.codehaus.plexus.languages.java.jpms.LocationManager;
@@ -605,6 +606,12 @@ public class AbstractSurefireMojoJava7PlusTest
         }
 
         @Override
+        protected ForkNodeFactory getForkNode()
+        {
+            return null;
+        }
+
+        @Override
         protected Artifact getMojoArtifact()
         {
             return null;
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
index bd77143..637aea3 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
@@ -41,6 +41,7 @@ import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver;
 import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
 import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.StartupConfiguration;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.apache.maven.surefire.suite.RunResult;
 import org.codehaus.plexus.logging.Logger;
 import org.junit.Test;
@@ -2026,6 +2027,12 @@ public class AbstractSurefireMojoTest
         }
 
         @Override
+        protected ForkNodeFactory getForkNode()
+        {
+            return null;
+        }
+
+        @Override
         protected Artifact getMojoArtifact()
         {
             return new DefaultArtifact( "org.apache.maven.surefire", "maven-surefire-plugin", createFromVersion( "1" ),
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/MojoMocklessTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/MojoMocklessTest.java
index 4371638..c96d789 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/MojoMocklessTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/MojoMocklessTest.java
@@ -28,6 +28,7 @@ import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter;
 import org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter;
 import org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.apache.maven.surefire.suite.RunResult;
 import org.apache.maven.surefire.util.DefaultScanResult;
 import org.apache.maven.toolchain.Toolchain;
@@ -741,6 +742,12 @@ public class MojoMocklessTest
         }
 
         @Override
+        protected ForkNodeFactory getForkNode()
+        {
+            return null;
+        }
+
+        @Override
         protected Artifact getMojoArtifact()
         {
             return null;
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java
index 3869911..ce6e215 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerProviderConfigurationTest.java
@@ -242,9 +242,10 @@ public class BooterDeserializerProviderConfigurationTest
             test = "aTest";
         }
         final File propsTest = booterSerializer.serialize( props, booterConfiguration, testProviderConfiguration, test,
-                                                           readTestsFromInStream, 51L, 1 );
+                                                           readTestsFromInStream, 51L, 1, "pipe://" );
         BooterDeserializer booterDeserializer = new BooterDeserializer( new FileInputStream( propsTest ) );
         assertEquals( 51L, (Object) booterDeserializer.getPluginPid() );
+        assertEquals( "pipe://", booterDeserializer.getForkNodeConnectionString() );
         return booterDeserializer.deserialize();
     }
 
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
index 49c7146..bbfc20f 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
@@ -149,9 +149,10 @@ public class BooterDeserializerStartupConfigurationTest
         BooterSerializer booterSerializer = new BooterSerializer( forkConfiguration );
         String aTest = "aTest";
         File propsTest = booterSerializer.serialize( props, getProviderConfiguration(), startupConfiguration, aTest,
-                false, null, 1 );
+                false, null, 1, null );
         BooterDeserializer booterDeserializer = new BooterDeserializer( new FileInputStream( propsTest ) );
         assertNull( booterDeserializer.getPluginPid() );
+        assertNull( booterDeserializer.getForkNodeConnectionString() );
         return booterDeserializer.getStartupConfiguration();
     }
 
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
index 451d8a4..7246136 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
@@ -19,7 +19,6 @@ package org.apache.maven.plugin.surefire.booterclient;
  * under the License.
  */
 
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
 import org.apache.maven.plugin.surefire.util.Relocator;
@@ -28,6 +27,7 @@ import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.ClasspathConfiguration;
 import org.apache.maven.surefire.booter.ForkedBooter;
 import org.apache.maven.surefire.booter.StartupConfiguration;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -74,7 +74,7 @@ public class DefaultForkConfigurationTest
     private boolean reuseForks;
     private Platform pluginPlatform;
     private ConsoleLogger log;
-    private ExecutableCommandlineFactory executableCommandlineFactory;
+    private ForkNodeFactory forkNodeFactory;
 
     @Before
     public void setup()
@@ -91,7 +91,7 @@ public class DefaultForkConfigurationTest
         reuseForks = true;
         pluginPlatform = new Platform();
         log = mock( ConsoleLogger.class );
-        executableCommandlineFactory = mock( ExecutableCommandlineFactory.class );
+        forkNodeFactory = mock( ForkNodeFactory.class );
     }
 
     @Test
@@ -99,7 +99,7 @@ public class DefaultForkConfigurationTest
     {
         DefaultForkConfiguration config = new DefaultForkConfiguration( booterClasspath, tempDirectory, debugLine,
                 workingDirectory, modelProperties, argLine, environmentVariables, debug, forkCount, reuseForks,
-                pluginPlatform, log, executableCommandlineFactory )
+                pluginPlatform, log, forkNodeFactory )
         {
 
             @Override
@@ -124,7 +124,7 @@ public class DefaultForkConfigurationTest
         argLine = "";
         DefaultForkConfiguration config = new DefaultForkConfiguration( booterClasspath, tempDirectory, debugLine,
                 workingDirectory, modelProperties, argLine, environmentVariables, debug, forkCount, reuseForks,
-                pluginPlatform, log, executableCommandlineFactory )
+                pluginPlatform, log, forkNodeFactory )
         {
 
             @Override
@@ -149,7 +149,7 @@ public class DefaultForkConfigurationTest
         argLine = "\n\r";
         DefaultForkConfiguration config = new DefaultForkConfiguration( booterClasspath, tempDirectory, debugLine,
                 workingDirectory, modelProperties, argLine, environmentVariables, debug, forkCount, reuseForks,
-                pluginPlatform, log, executableCommandlineFactory )
+                pluginPlatform, log, forkNodeFactory )
         {
 
             @Override
@@ -174,7 +174,7 @@ public class DefaultForkConfigurationTest
         argLine = "-Dfile.encoding=UTF-8";
         DefaultForkConfiguration config = new DefaultForkConfiguration( booterClasspath, tempDirectory, debugLine,
                 workingDirectory, modelProperties, argLine, environmentVariables, debug, forkCount, reuseForks,
-                pluginPlatform, log, executableCommandlineFactory )
+                pluginPlatform, log, forkNodeFactory )
         {
 
             @Override
@@ -200,7 +200,7 @@ public class DefaultForkConfigurationTest
         argLine = "-Dfile.encoding=@{encoding}";
         DefaultForkConfiguration config = new DefaultForkConfiguration( booterClasspath, tempDirectory, debugLine,
                 workingDirectory, modelProperties, argLine, environmentVariables, debug, forkCount, reuseForks,
-                pluginPlatform, log, executableCommandlineFactory )
+                pluginPlatform, log, forkNodeFactory )
         {
 
             @Override
@@ -225,7 +225,7 @@ public class DefaultForkConfigurationTest
         argLine = "a\n\rb";
         DefaultForkConfiguration config = new DefaultForkConfiguration( booterClasspath, tempDirectory, debugLine,
                 workingDirectory, modelProperties, argLine, environmentVariables, debug, forkCount, reuseForks,
-                pluginPlatform, log, executableCommandlineFactory )
+                pluginPlatform, log, forkNodeFactory )
         {
 
             @Override
@@ -250,7 +250,7 @@ public class DefaultForkConfigurationTest
         argLine = "-Dthread=${surefire.threadNumber}";
         DefaultForkConfiguration config = new DefaultForkConfiguration( booterClasspath, tempDirectory, debugLine,
                 workingDirectory, modelProperties, argLine, environmentVariables, debug, forkCount, reuseForks,
-                pluginPlatform, log, executableCommandlineFactory )
+                pluginPlatform, log, forkNodeFactory )
         {
 
             @Override
@@ -275,7 +275,7 @@ public class DefaultForkConfigurationTest
         argLine = "-Dthread=${surefire.forkNumber}";
         DefaultForkConfiguration config = new DefaultForkConfiguration( booterClasspath, tempDirectory, debugLine,
                 workingDirectory, modelProperties, argLine, environmentVariables, debug, forkCount, reuseForks,
-                pluginPlatform, log, executableCommandlineFactory )
+                pluginPlatform, log, forkNodeFactory )
         {
 
             @Override
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
index f21f619..2afbf4f 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
@@ -22,7 +22,6 @@ package org.apache.maven.plugin.surefire.booterclient;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.SystemUtils;
 import org.apache.maven.plugin.surefire.JdkAttributes;
-import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.ExecutableCommandlineFactory;
 import org.apache.maven.plugin.surefire.log.api.NullConsoleLogger;
 import org.apache.maven.shared.utils.StringUtils;
 import org.apache.maven.shared.utils.cli.Commandline;
@@ -31,6 +30,7 @@ import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.ClasspathConfiguration;
 import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -44,9 +44,7 @@ import java.util.Properties;
 import static java.util.Collections.singletonList;
 import static org.apache.maven.surefire.booter.Classpath.emptyClasspath;
 import static org.fest.util.Files.temporaryFolder;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 import static org.mockito.Mockito.mock;
 
 public class ForkConfigurationTest
@@ -220,7 +218,7 @@ public class ForkConfigurationTest
         assertTrue( tmpDir.mkdirs() );
         return new JarManifestForkConfiguration( emptyClasspath(), tmpDir, null,
                 cwd, new Properties(), argLine, Collections.<String, String>emptyMap(), false, 1, false,
-                platform, new NullConsoleLogger(), mock(ExecutableCommandlineFactory.class) );
+                platform, new NullConsoleLogger(), mock( ForkNodeFactory.class ) );
     }
 
     // based on http://stackoverflow.com/questions/2591083/getting-version-of-java-in-runtime
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestLessInputStreamBuilderTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestLessInputStreamBuilderTest.java
index e9b1b3a..f5669cc 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestLessInputStreamBuilderTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestLessInputStreamBuilderTest.java
@@ -150,7 +150,8 @@ public class TestLessInputStreamBuilderTest
                 if ( buffer == null )
                 {
                     idx = 0;
-                    buffer = pluginIs.readNextCommand();
+                    Command cmd = pluginIs.readNextCommand();
+                    buffer = cmd == null ? null : cmd.getCommandType().encode();
                 }
 
                 if ( buffer != null )
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestProvidingInputStreamTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestProvidingInputStreamTest.java
index 78c637f..80bba38 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestProvidingInputStreamTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/TestProvidingInputStreamTest.java
@@ -27,7 +27,6 @@ import org.junit.Test;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.Thread.State;
-import java.nio.charset.StandardCharsets;
 import java.util.ArrayDeque;
 import java.util.Queue;
 import java.util.concurrent.Callable;
@@ -35,6 +34,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.TimeUnit;
 
+import static java.nio.charset.StandardCharsets.US_ASCII;
 import static org.apache.maven.surefire.booter.MasterProcessCommand.BYE_ACK;
 import static org.apache.maven.surefire.booter.MasterProcessCommand.NOOP;
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -103,7 +103,9 @@ public class TestProvidingInputStreamTest
         StringBuilder stream = new StringBuilder();
         for ( int i = 0; i < 82; i++ )
         {
-            stream.append( new String( is.readNextCommand(), StandardCharsets.US_ASCII ) );
+            Command cmd = is.readNextCommand();
+            assertThat( cmd.getData(), is( nullValue() ) );
+            stream.append( new String( cmd.getCommandType().encode(), US_ASCII ) );
         }
         assertThat( stream.toString(),
                 is( ":maven-surefire-std-out:testset-finished::maven-surefire-std-out:testset-finished:" ) );
@@ -134,7 +136,9 @@ public class TestProvidingInputStreamTest
         StringBuilder stream = new StringBuilder();
         for ( int i = 0; i < 43; i++ )
         {
-            stream.append( new String( is.readNextCommand(), StandardCharsets.US_ASCII ) );
+            Command cmd = is.readNextCommand();
+            assertThat( cmd.getData(), is( nullValue() ) );
+            stream.append( new String( is.readNextCommand().getCommandType().encode(), US_ASCII ) );
         }
         assertThat( stream.toString(),
                 is( ":maven-surefire-std-out:run-testclass:Test:" ) );
@@ -158,7 +162,8 @@ public class TestProvidingInputStreamTest
                 if ( buffer == null )
                 {
                     idx = 0;
-                    buffer = pluginIs.readNextCommand();
+                    Command cmd = pluginIs.readNextCommand();
+                    buffer = cmd == null ? null : cmd.getCommandType().encode();
                 }
 
                 if ( buffer != null )
@@ -211,7 +216,6 @@ public class TestProvidingInputStreamTest
             {
                 try
                 {
-                    //noinspection ResultOfMethodCallIgnored
                     is.readNextCommand();
                 }
                 catch ( IOException e )
diff --git a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
index 37bf3cf..1c4c089 100644
--- a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
+++ b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
@@ -29,6 +29,7 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.surefire.extensions.ForkNodeFactory;
 import org.apache.maven.surefire.suite.RunResult;
 
 import static org.apache.maven.plugin.surefire.SurefireHelper.reportExecution;
@@ -365,6 +366,9 @@ public class SurefirePlugin
     @Parameter( property = "surefire.useModulePath", defaultValue = "true" )
     private boolean useModulePath;
 
+    @Parameter( property = "surefire.forkNode" )
+    private ForkNodeFactory forkNode;
+
     @Override
     protected int getRerunFailingTestsCount()
     {
@@ -741,4 +745,10 @@ public class SurefirePlugin
     {
         return suiteXmlFiles != null && suiteXmlFiles.length != 0;
     }
+
+    @Override
+    protected final ForkNodeFactory getForkNode()
+    {
+        return forkNode;
+    }
 }
diff --git a/pom.xml b/pom.xml
index a8f3cf5..7609c0a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -458,10 +458,8 @@
               </goals>
               <configuration>
                 <includes>
-                  <include>org/apache/maven/shared/utils/logging/*.java</include>
                   <include>HelpMojo.java</include>
                   <include>**/HelpMojo.java</include>
-                  <include>org/apache/maven/plugin/failsafe/xmlsummary/*.java</include>
                 </includes>
                 <compilerArgs>
                   <!-- FIXME: maven-plugin-plugin therefore used -syntax or none due to HelpMojo -->
@@ -477,14 +475,13 @@
               </goals>
               <configuration>
                 <excludes>
-                  <exclude>org/apache/maven/shared/utils/logging/*.java</exclude>
                   <exclude>HelpMojo.java</exclude>
                   <exclude>**/HelpMojo.java</exclude>
-                  <exclude>org/apache/maven/plugin/failsafe/xmlsummary/*.java</exclude>
                 </excludes>
                 <compilerArgs>
                   <arg>-Xdoclint:all</arg>
                 </compilerArgs>
+                <verbose>true</verbose>
               </configuration>
             </execution>
           </executions>
diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java
index 3551910..d7267bc 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterConstants.java
@@ -57,4 +57,5 @@ public final class BooterConstants
     public static final String SHUTDOWN = "shutdown";
     public static final String SYSTEM_EXIT_TIMEOUT = "systemExitTimeout";
     public static final String PLUGIN_PID = "pluginPid";
+    public static final String FORK_NODE_CONNECTION_STRING = "forkNodeConnectionString";
 }
diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java
index 6bc3cae..c0edfba 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java
@@ -58,6 +58,11 @@ public class BooterDeserializer
         properties = SystemPropertyManager.loadProperties( inputStream );
     }
 
+    public String getForkNodeConnectionString()
+    {
+        return properties.getProperty( FORK_NODE_CONNECTION_STRING );
+    }
+
     /**
      * @return PID of Maven process where plugin is executed; or null if PID could not be determined.
      */
diff --git a/surefire-extensions-api/pom.xml b/surefire-extensions-api/pom.xml
index 2ba61de..2b98e60 100644
--- a/surefire-extensions-api/pom.xml
+++ b/surefire-extensions-api/pom.xml
@@ -40,6 +40,11 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.jacoco</groupId>
             <artifactId>org.jacoco.agent</artifactId>
             <classifier>runtime</classifier>
diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/CommandReader.java
similarity index 70%
copy from surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
copy to surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/CommandReader.java
index b65dab7..eb15d8e 100644
--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
+++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/CommandReader.java
@@ -24,26 +24,21 @@ import org.apache.maven.surefire.booter.Command;
 import java.io.IOException;
 
 /**
+ * Stream reader returns bytes which ar finally sent to the forked jvm.
+ *
  * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
  * @since 3.0.0-M4
  */
-public abstract class ForkedChannelServer
-    implements AutoCloseable
+public interface CommandReader
 {
-    private final String channelConfig;
-
-    public ForkedChannelServer( String channelConfig )
-    {
-        this.channelConfig = channelConfig;
-    }
-
-    public String getChannelConfig()
-    {
-        return channelConfig;
-    }
-
-    public abstract void send( Command command ) throws IOException;
 
-    @Override
-    public abstract void close() throws IOException;
+    /**
+     * Waits for the next command and reads complete stream of encoded command.
+     *
+     * @return encoded command, or null if closed
+     */
+    Command readNextCommand() throws IOException;
+    void close();
+    boolean isClosed();
+    void tryFlush() throws IOException;
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/EventHandler.java
similarity index 68%
copy from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
copy to surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/EventHandler.java
index b503ae9..bcb6c81 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
+++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/EventHandler.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
+package org.apache.maven.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,11 +19,14 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  * under the License.
  */
 
+import javax.annotation.Nonnull;
+
 /**
  *
- * @param <T> type of event
  */
-interface EventHandler<T>
+public interface EventHandler
 {
-    void handleEvent( T event );
+    // todo here should be Event object as POJO which separates physical stream representation from the independent
+    // todo Event parser in ForkClient. So the parser should be part of ForkChannel implementation.
+    void handleEvent( @Nonnull String event );
 }
diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ExecutableCommandline.java
similarity index 55%
copy from surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
copy to surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ExecutableCommandline.java
index b65dab7..b373002 100644
--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
+++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ExecutableCommandline.java
@@ -19,31 +19,20 @@ package org.apache.maven.surefire.extensions;
  * under the License.
  */
 
-import org.apache.maven.surefire.booter.Command;
-
-import java.io.IOException;
+import javax.annotation.Nonnull;
+import java.util.concurrent.Callable;
 
 /**
- * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
- * @since 3.0.0-M4
+ * todo add javadoc
  */
-public abstract class ForkedChannelServer
-    implements AutoCloseable
+public interface ExecutableCommandline
 {
-    private final String channelConfig;
-
-    public ForkedChannelServer( String channelConfig )
-    {
-        this.channelConfig = channelConfig;
-    }
-
-    public String getChannelConfig()
-    {
-        return channelConfig;
-    }
-
-    public abstract void send( Command command ) throws IOException;
-
-    @Override
-    public abstract void close() throws IOException;
+    @Nonnull
+    <T> Callable<Integer> executeCommandLineAsCallable( @Nonnull T cli,
+                                                        @Nonnull CommandReader commands,
+                                                        @Nonnull EventHandler events,
+                                                        StdOutStreamLine stdOut,
+                                                        StdErrStreamLine stdErr,
+                                                        @Nonnull Runnable runAfterProcessTermination )
+            throws Exception;
 }
diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkChannel.java
similarity index 58%
rename from surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
rename to surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkChannel.java
index b65dab7..62ef9bf 100644
--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannelServer.java
+++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkChannel.java
@@ -19,31 +19,24 @@ package org.apache.maven.surefire.extensions;
  * under the License.
  */
 
-import org.apache.maven.surefire.booter.Command;
-
+import javax.annotation.Nonnull;
+import java.io.Closeable;
 import java.io.IOException;
 
 /**
- * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
- * @since 3.0.0-M4
+ * The constructor prepares I/O or throws {@link IOException}. Open channel can be closed and closes all streams.
+ * <br>
+ * The forked JVM uses the {@link #createExecutableCommandline() connection string}.
+ * The executable CLI {@link #createExecutableCommandline()} is using the streams. This method and constructor should
+ * not be blocked while establishing the connection.
  */
-public abstract class ForkedChannelServer
-    implements AutoCloseable
+public interface ForkChannel extends Closeable
 {
-    private final String channelConfig;
-
-    public ForkedChannelServer( String channelConfig )
-    {
-        this.channelConfig = channelConfig;
-    }
-
-    public String getChannelConfig()
-    {
-        return channelConfig;
-    }
+    String getForkNodeConnectionString();
 
-    public abstract void send( Command command ) throws IOException;
+    @Nonnull
+    ExecutableCommandline createExecutableCommandline() throws IOException;
 
     @Override
-    public abstract void close() throws IOException;
+    void close() throws IOException;
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/ExecutableCommandlineFactory.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkNodeFactory.java
similarity index 70%
rename from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/ExecutableCommandlineFactory.java
rename to surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkNodeFactory.java
index e36f3a8..c054776 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/ExecutableCommandlineFactory.java
+++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkNodeFactory.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.lazytestprovider;
+package org.apache.maven.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,17 +19,20 @@ package org.apache.maven.plugin.surefire.booterclient.lazytestprovider;
  * under the License.
  */
 
-import org.apache.maven.plugin.surefire.booterclient.output.ExecutableCommandline;
-
 import javax.annotation.Nonnull;
+import java.io.IOException;
 
 /**
  * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
  * @since 3.0.0-M4
  */
-public interface ExecutableCommandlineFactory
+public interface ForkNodeFactory
 {
-    //todo Enrico, the parameter is not needed in Pipes. It is needed in TCP/IP
-    @Nonnull
-    ExecutableCommandline<String> createExecutableCommandline( AbstractCommandReader forkInputStream );
+    /**
+     * Opens and closes the channel.
+     *
+     * @return specific implementation of the communication channel
+     * @throws IOException if cannot open the channel
+     */
+    @Nonnull ForkChannel createForkChannel() throws IOException;
 }
diff --git a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannel.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannel.java
deleted file mode 100644
index ee6ee2f..0000000
--- a/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/ForkedChannel.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.apache.maven.surefire.extensions;
-
-/*
- * 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.
- */
-
-import org.apache.maven.surefire.booter.MasterProcessCommand;
-
-/**
- * Commands which are sent from plugin to the forked jvm.
- * <br>
- * <br>
- * magic number : opcode [: opcode specific data]*
- * <br>
- * or data encoded with Base64
- * <br>
- * magic number : opcode [: Base64(opcode specific data)]*
- *
- * The command must be finished by New Line or the character ':'.
- *
- * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
- * @since 3.0.0-M4
- */
-public abstract class ForkedChannel
-{
-    private volatile String channelConfig;
-
-    public String getChannelConfig()
-    {
-        return channelConfig;
-    }
-
-    public void setChannelConfig( String channelConfig )
-    {
-        this.channelConfig = channelConfig;
-    }
-
-    public abstract byte[] encode( MasterProcessCommand command );
-    public abstract byte[] encode( MasterProcessCommand command, String data );
-}
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StdErrStreamLine.java
similarity index 82%
copy from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
copy to surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StdErrStreamLine.java
index b503ae9..be444ae 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
+++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StdErrStreamLine.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
+package org.apache.maven.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,10 +20,9 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  */
 
 /**
- *
- * @param <T> type of event
+ * The line handler of forked process standard-error.
  */
-interface EventHandler<T>
+public interface StdErrStreamLine
 {
-    void handleEvent( T event );
+    void handleLine( String line );
 }
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StdOutStreamLine.java
similarity index 82%
rename from maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
rename to surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StdOutStreamLine.java
index b503ae9..f615764 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/EventHandler.java
+++ b/surefire-extensions-api/src/main/java/org/apache/maven/surefire/extensions/StdOutStreamLine.java
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.surefire.booterclient.output;
+package org.apache.maven.surefire.extensions;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,10 +20,9 @@ package org.apache.maven.plugin.surefire.booterclient.output;
  */
 
 /**
- *
- * @param <T> type of event
+ * The line handler of forked process standard-output.
  */
-interface EventHandler<T>
+public interface StdOutStreamLine
 {
-    void handleEvent( T event );
+    void handleLine( String line );
 }