Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ Communication Channels used between the Maven Process and Surefire Process

* forkNode

The configuration is done by using only one configuration parameter <<<forkNode>>>.
The configuration is done by using only one configuration {{{../test-mojo.html#forkNode}parameter <<<forkNode>>>}}.

* The TCP/IP communication channel

The ${thisPlugin} plugin uses process pipes by default. The implementation class for default configuration
is <<<org.apache.maven.plugin.surefire.extensions.LegacyForkNodeFactory>>> and it does not have to be specified.
The TCP/IP channel can be selected as follows and the implementation class has to be specified:
is {{{../../maven-surefire-common/apidocs/org/apache/maven/plugin/surefire/extensions/LegacyForkNodeFactory.html}<<<org.apache.maven.plugin.surefire.extensions.LegacyForkNodeFactory>>>}}
and it does not have to be specified.
The TCP/IP channel can be selected as follows and the implementation class has to be specified
{{{../../maven-surefire-common/apidocs/org/apache/maven/plugin/surefire/extensions/SurefireForkNodeFactory.html}as <<<SurefireForkNodeFactory>>>}}:

+---+
<project>
Expand All @@ -68,7 +70,7 @@ Communication Channels used between the Maven Process and Surefire Process
* Custom implementation

The custom implementation involves two implementations. The first is used by the Maven process and there you
should implement the interface <<<org.apache.maven.surefire.extensions.ForkNodeFactory>>>, use the implementation
should implement the {{{../../surefire-extensions-api/apidocs/org/apache/maven/surefire/extensions/ForkNodeFactory.html}interface <<<org.apache.maven.surefire.extensions.ForkNodeFactory>>>}}, use the implementation
in a dependency <<<your-extension-api-impl-artifactid>>> declared below the plugin and configuration should
specify fully qualified class name of your custom <<<ForkNodeFactory>>> in the attribute <<<implementation>>>.

Expand Down
10 changes: 6 additions & 4 deletions maven-surefire-plugin/src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
</menu>
<menu name="Examples">
<item name="Java Modularity (JPMS) in Tests" href="examples/jpms.html"/>
<item name="TCP/IP Communication between Forks" href="examples/process-communication.html"/>
<item name="Using TestNG" href="examples/testng.html"/>
<item name="Using JUnit" href="examples/junit.html"/>
<item name="Using JUnit 5 Platform" href="examples/junit-platform.html"/>
Expand All @@ -51,19 +50,22 @@
<item name="Inclusions and Exclusions of Tests" href="examples/inclusion-exclusion.html"/>
<item name="Running a Single Test" href="examples/single-test.html"/>
<item name="Re-run Failing Tests" href="examples/rerun-failing-tests.html"/>
<item name="Class Loading and Forking" href="examples/class-loading.html"/>
<item name="Debugging Tests" href="examples/debugging.html"/>
<item name="Using System Properties" href="examples/system-properties.html"/>
<item name="Configuring the Classpath" href="examples/configuring-classpath.html"/>
<item name="Selecting Providers" href="examples/providers.html"/>
<item name="New Error Summary" href="newerrorsummary.html"/>
<item name="Multi-lined Exception Messages" href="multilineexceptions.html"/>
<item name="Fork Options and Parallel Test Execution" href="examples/fork-options-and-parallel-execution.html"/>
<item name="Using Console Logs" href="examples/logging.html"/>
<item name="Shutdown of Forked JVM" href="examples/shutdown.html"/>
<item name="Run tests with Java 9" href="java9.html"/>
<item name="Run tests in Docker" href="docker.html"/>
<item name="Run tests in a different JVM using toolchains" href="examples/toolchains.html"/>
</menu>
<menu name="Forking">
<item name="TCP/IP Communication between Forks" href="examples/process-communication.html"/>
<item name="Class Loading and Forking" href="examples/class-loading.html"/>
<item name="Fork Options and Parallel Test Execution" href="examples/fork-options-and-parallel-execution.html"/>
<item name="Shutdown of Forked JVM" href="examples/shutdown.html"/>
</menu>
</body>
</site>