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

    Fields
    Modifier and Type
    Field
    Description
    private 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes Mojo.

    Methods inherited from class org.jacoco.maven.AbstractJacocoMojo

    execute, getProject, skipMojo

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • destFile

      @Parameter(property="jacoco.destFile", defaultValue="${project.build.directory}/jacoco.exec") private File destFile
      Path to the output file for execution data.
    • append

      @Parameter(property="jacoco.append", defaultValue="true") private boolean append
      If 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 dump
      Sets whether execution data should be downloaded from the remote host.
    • reset

      @Parameter(property="jacoco.reset", defaultValue="false") private boolean reset
      Sets whether a reset command should be sent after the execution data has been dumped.
    • address

      @Parameter(property="jacoco.address") private String address
      IP address or hostname to connect to.
    • port

      @Parameter(property="jacoco.port", defaultValue="6300") private int port
      Port 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 retryCount
      Number 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.MojoExecutionException
      Description copied from class: AbstractJacocoMojo
      Executes Mojo.
      Specified by:
      executeMojo in class AbstractJacocoMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if an unexpected problem occurs. Throwing this exception causes a "BUILD ERROR" message to be displayed.