Package org.jacoco.maven
Class DumpMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.jacoco.maven.AbstractJacocoMojo
org.jacoco.maven.DumpMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="dump",
defaultPhase=POST_INTEGRATION_TEST,
threadSafe=true)
public class DumpMojo
extends AbstractJacocoMojo
Request a dump over TCP/IP from a JaCoCo agent running in
tcpserver
mode.
Note concerning parallel builds: While the dump goal as such is thread safe, it has to be considered that TCP/IP server ports of the agents are a shared resource.
- Since:
- 0.6.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
IP address or hostname to connect to.private boolean
If set to true and the execution data file already exists, coverage data is appended to the existing file.private File
Path to the output file for execution data.private boolean
Sets whether execution data should be downloaded from the remote host.private int
Port number to connect to.private boolean
Sets whether a reset command should be sent after the execution data has been dumped.private int
Number of retries which the goal will attempt to establish a connection.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jacoco.maven.AbstractJacocoMojo
execute, getProject, skipMojo
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
destFile
@Parameter(property="jacoco.destFile", defaultValue="${project.build.directory}/jacoco.exec") private File destFilePath to the output file for execution data. -
append
@Parameter(property="jacoco.append", defaultValue="true") private boolean appendIf set to true and the execution data file already exists, coverage data is appended to the existing file. If set to false, an existing execution data file will be replaced. -
dump
@Parameter(property="jacoco.dump", defaultValue="true") private boolean dumpSets whether execution data should be downloaded from the remote host. -
reset
@Parameter(property="jacoco.reset", defaultValue="false") private boolean resetSets whether a reset command should be sent after the execution data has been dumped. -
address
IP address or hostname to connect to. -
port
@Parameter(property="jacoco.port", defaultValue="6300") private int portPort number to connect to. If multiple JaCoCo agents should run on the same machine, different ports have to be specified for the agents. -
retryCount
@Parameter(property="jacoco.retryCount", defaultValue="10") private int retryCountNumber of retries which the goal will attempt to establish a connection. This can be used to wait until the target JVM is successfully launched.
-
-
Constructor Details
-
DumpMojo
public DumpMojo()
-
-
Method Details
-
executeMojo
public void executeMojo() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractJacocoMojo
Executes Mojo.- Specified by:
executeMojo
in classAbstractJacocoMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
- if an unexpected problem occurs. Throwing this exception causes a "BUILD ERROR" message to be displayed.
-