Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53755

Detect and publish Jacoco reports

XMLWordPrintable

      Detect Jacoco reports

      <mavenExecution>
          <!-- jacoco:prepare-agent -->
          <ExecutionEvent type="MojoStarted" class="org.apache.maven.lifecycle.internal.DefaultExecutionEvent" _time="2018-09-24 18:00:21.408">
              <project baseDir="/path/to/my-webapp" file="/path/to/my-webapp/pom.xml" groupId="com.mycompany.compliance" name="my-webapp" artifactId="my-webapp" packaging="jar" version="0.0.1-SNAPSHOT">
                  <build sourceDirectory="/path/to/my-webapp/src/main/java" directory="/path/to/my-webapp/target"/>
              </project>
              <plugin executionId="default-prepare-agent" goal="prepare-agent" lifecyclePhase="initialize" groupId="org.jacoco" artifactId="jacoco-maven-plugin" version="0.8.2">
                  <address>${jacoco.address}</address>
                  <append>${jacoco.append}</append>
                  <classDumpDir>${jacoco.classDumpDir}</classDumpDir>
                  <destFile>${jacoco.destFile}</destFile>
                  <dumpOnExit>${jacoco.dumpOnExit}</dumpOnExit>
                  <exclClassLoaders>${jacoco.exclClassLoaders}</exclClassLoaders>
                  <inclBootstrapClasses>${jacoco.inclBootstrapClasses}</inclBootstrapClasses>
                  <inclNoLocationClasses>${jacoco.inclNoLocationClasses}</inclNoLocationClasses>
                  <jmx>${jacoco.jmx}</jmx>
                  <output>${jacoco.output}</output>
                  <pluginArtifactMap>${plugin.artifactMap}</pluginArtifactMap>
                  <port>${jacoco.port}</port>
                  <project>${project}</project>
                  <propertyName>${jacoco.propertyName}</propertyName>
                  <sessionId>${jacoco.sessionId}</sessionId>
                  <skip>${jacoco.skip}</skip>
              </plugin>
          </ExecutionEvent>
          <ExecutionEvent type="MojoSucceeded" class="org.apache.maven.lifecycle.internal.DefaultExecutionEvent" _time="2018-09-24 18:00:22.635">
              <project baseDir="/path/to/my-webapp" file="/path/to/my-webapp/pom.xml" groupId="com.mycompany.compliance" name="my-webapp" artifactId="my-webapp" packaging="jar" version="0.0.1-SNAPSHOT">
                  <build sourceDirectory="/path/to/my-webapp/src/main/java" directory="/path/to/my-webapp/target"/>
              </project>
              <plugin executionId="default-prepare-agent" goal="prepare-agent" lifecyclePhase="initialize" groupId="org.jacoco" artifactId="jacoco-maven-plugin" version="0.8.2">
                  <address>${jacoco.address}</address>
                  <append>${jacoco.append}</append>
                  <classDumpDir>${jacoco.classDumpDir}</classDumpDir>
                  <destFile>${jacoco.destFile}</destFile>
                  <dumpOnExit>${jacoco.dumpOnExit}</dumpOnExit>
                  <exclClassLoaders>${jacoco.exclClassLoaders}</exclClassLoaders>
                  <inclBootstrapClasses>${jacoco.inclBootstrapClasses}</inclBootstrapClasses>
                  <inclNoLocationClasses>${jacoco.inclNoLocationClasses}</inclNoLocationClasses>
                  <jmx>${jacoco.jmx}</jmx>
                  <output>${jacoco.output}</output>
                  <pluginArtifactMap>${plugin.artifactMap}</pluginArtifactMap>
                  <port>${jacoco.port}</port>
                  <project>${project}</project>
                  <propertyName>${jacoco.propertyName}</propertyName>
                  <sessionId>${jacoco.sessionId}</sessionId>
                  <skip>${jacoco.skip}</skip>
              </plugin>
          </ExecutionEvent>
      
          <!-- jacoco:report -->
          <ExecutionEvent type="MojoStarted" class="org.apache.maven.lifecycle.internal.DefaultExecutionEvent" _time="2018-09-24 18:00:44.024">
              <project baseDir="/path/to/my-webapp" file="/path/to/my-webapp/pom.xml" groupId="com.mycompany.compliance" name="my-webapp" artifactId="my-webapp" packaging="jar" version="0.0.1-SNAPSHOT">
                  <build sourceDirectory="/path/to/my-webapp/src/main/java" directory="/path/to/my-webapp/target"/>
              </project>
              <plugin executionId="default-report" goal="report" lifecyclePhase="verify" groupId="org.jacoco" artifactId="jacoco-maven-plugin" version="0.8.2">
                  <dataFile>${jacoco.dataFile}</dataFile>
                  <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
                  <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
                  <project>${project}</project>
                  <skip>${jacoco.skip}</skip>
                  <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                  <title>${project.name}</title>
              </plugin>
          </ExecutionEvent>
          <ExecutionEvent type="MojoSucceeded" class="org.apache.maven.lifecycle.internal.DefaultExecutionEvent" _time="2018-09-24 18:00:45.139">
              <project baseDir="/path/to/my-webapp" file="/path/to/my-webapp/pom.xml" groupId="com.mycompany.compliance" name="my-webapp" artifactId="my-webapp" packaging="jar" version="0.0.1-SNAPSHOT">
                  <build sourceDirectory="/path/to/my-webapp/src/main/java" directory="/path/to/my-webapp/target"/>
              </project>
              <plugin executionId="default-report" goal="report" lifecyclePhase="verify" groupId="org.jacoco" artifactId="jacoco-maven-plugin" version="0.8.2">
                  <dataFile>${jacoco.dataFile}</dataFile>
                  <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
                  <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
                  <project>${project}</project>
                  <skip>${jacoco.skip}</skip>
                  <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                  <title>${project.name}</title>
              </plugin>
          </ExecutionEvent>
          <!-- jacoco:check -->
      
          <ExecutionEvent type="MojoStarted" class="org.apache.maven.lifecycle.internal.DefaultExecutionEvent" _time="2018-09-24 18:00:45.14">
              <project baseDir="/path/to/my-webapp" file="/path/to/my-webapp/pom.xml" groupId="com.mycompany.compliance" name="my-webapp" artifactId="my-webapp" packaging="jar" version="0.0.1-SNAPSHOT">
                  <build sourceDirectory="/path/to/my-webapp/src/main/java" directory="/path/to/my-webapp/target"/>
              </project>
              <plugin executionId="default-check" goal="check" lifecyclePhase="verify" groupId="org.jacoco" artifactId="jacoco-maven-plugin" version="0.8.2">
                  <dataFile>${project.build.directory}/jacoco.exec</dataFile>
                  <haltOnFailure>${jacoco.haltOnFailure}</haltOnFailure>
                  <project>${project}</project>
                  <rules>
                      <rule>
                          <element>BUNDLE</element>
                          <limits>
                              <limit>
                                  <counter>COMPLEXITY</counter>
                                  <value>COVEREDRATIO</value>
                                  <minimum>0.30</minimum>
                              </limit>
                          </limits>
                      </rule>
                  </rules>
                  <skip>${jacoco.skip}</skip>
              </plugin>
          </ExecutionEvent>
          <ExecutionEvent type="MojoSucceeded" class="org.apache.maven.lifecycle.internal.DefaultExecutionEvent" _time="2018-09-24 18:00:45.274">
              <project baseDir="/path/to/my-webapp" file="/path/to/my-webapp/pom.xml" groupId="com.mycompany.compliance" name="my-webapp" artifactId="my-webapp" packaging="jar" version="0.0.1-SNAPSHOT">
                  <build sourceDirectory="/path/to/my-webapp/src/main/java" directory="/path/to/my-webapp/target"/>
              </project>
              <plugin executionId="default-check" goal="check" lifecyclePhase="verify" groupId="org.jacoco" artifactId="jacoco-maven-plugin" version="0.8.2">
                  <dataFile>${project.build.directory}/jacoco.exec</dataFile>
                  <haltOnFailure>${jacoco.haltOnFailure}</haltOnFailure>
                  <project>${project}</project>
                  <rules>
                      <rule>
                          <element>BUNDLE</element>
                          <limits>
                              <limit>
                                  <counter>COMPLEXITY</counter>
                                  <value>COVEREDRATIO</value>
                                  <minimum>0.30</minimum>
                              </limit>
                          </limits>
                      </rule>
                  </rules>
                  <skip>${jacoco.skip}</skip>
              </plugin>
          </ExecutionEvent>
      </mavenExecution>
      

            cleclerc Cyrille Le Clerc
            cleclerc Cyrille Le Clerc
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: