Package org.apache.maven.surefire.booter
Class BooterDeserializer
- java.lang.Object
-
- org.apache.maven.surefire.booter.BooterDeserializer
-
public class BooterDeserializer extends java.lang.ObjectKnows how to serialize and deserialize the booter configuration.
The internal serialization format is through a properties file. The long-term goal of this class is not to expose this implementation information to its clients. This still leaks somewhat, and there are some cases where properties are being accessed as "Properties" instead of more representative domain objects.- Author:
- Jason van Zyl, Emmanuel Venisse, Kristian Rosenvold
-
-
Constructor Summary
Constructors Constructor Description BooterDeserializer(java.io.InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProviderConfigurationdeserialize()java.lang.StringgetConnectionString()Describes the current connection channel used by the client in the forked JVM in order to connect to the plugin process.java.lang.StringgetDiscoverTestsOutputFile()When set, the fork runs in discovery mode: it just lists the test classes to run (using the provider), writes their names to this file (one per line, UTF-8) and exits without running any test.intgetForkNumber()java.lang.StringgetPluginPid()StartupConfigurationgetStartupConfiguration()
-
-
-
Method Detail
-
getForkNumber
public int getForkNumber()
-
getConnectionString
@Nonnull public java.lang.String getConnectionString()
Describes the current connection channel used by the client in the forked JVM in order to connect to the plugin process.- Returns:
- connection string (must not be null)
-
getPluginPid
public java.lang.String getPluginPid()
- Returns:
- PID of Maven process where plugin is executed; or null if PID could not be determined
-
getDiscoverTestsOutputFile
public java.lang.String getDiscoverTestsOutputFile()
When set, the fork runs in discovery mode: it just lists the test classes to run (using the provider), writes their names to this file (one per line, UTF-8) and exits without running any test. This lets us list the tests inside a JVM that matches the toolchain, for the cases where Maven's own JVM cannot load the test classes (see Issue 2151).- Returns:
- the absolute path of the discovery output file, or
nullfor a normal run
-
deserialize
public ProviderConfiguration deserialize()
-
getStartupConfiguration
public StartupConfiguration getStartupConfiguration()
-
-