All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.jacoco.runtime.JacocoConfig Maven / Gradle / Ivy

There is a newer version: 3.15.0
Show newest version
package io.quarkus.jacoco.runtime;

import java.util.List;
import java.util.Optional;

import io.quarkus.runtime.annotations.ConfigDocDefault;
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;

@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
public class JacocoConfig {

    public static final String JACOCO_QUARKUS_EXEC = "jacoco-quarkus.exec";
    public static final String JACOCO_REPORT = "jacoco-report";
    public static final String TARGET_JACOCO_QUARKUS_EXEC = "target/" + JACOCO_QUARKUS_EXEC;
    public static final String TARGET_JACOCO_REPORT = "target/" + JACOCO_REPORT;

    /**
     * Whether or not the jacoco extension is enabled.
     */
    @ConfigItem(defaultValue = "true")
    public boolean enabled;

    /**
     * The jacoco data file.
     * The path can be relative (to the module) or absolute.
     */
    @ConfigItem
    @ConfigDocDefault(TARGET_JACOCO_QUARKUS_EXEC)
    public Optional dataFile;

    /**
     * Whether to reuse ({@code true}) or delete ({@code false}) the jacoco
     * data file on each run.
     */
    @ConfigItem(defaultValue = "false")
    public boolean reuseDataFile;

    /**
     * If Quarkus should generate the Jacoco report
     */
    @ConfigItem(defaultValue = "true")
    public boolean report;

    /**
     * Encoding of the generated reports.
     */
    @ConfigItem(defaultValue = "UTF-8")
    public String outputEncoding;

    /**
     * Name of the root node HTML report pages.
     */
    @ConfigItem(defaultValue = "${quarkus.application.name}")
    public Optional title;

    /**
     * Footer text used in HTML report pages.
     */
    @ConfigItem
    public Optional footer;

    /**
     * Encoding of the source files.
     */
    @ConfigItem(defaultValue = "UTF-8")
    public String sourceEncoding;

    /**
     * A list of class files to include in the report. May use wildcard
     * characters (* and ?). When not specified everything will be included.
     * 

* For instance: *

    *
  • **/fo/**/* targets all classes under fo and sub packages
  • *
  • **/bar/* targets all classes directly under bar
  • *
  • **/*BAR*.class targets classes that contain BAR in their name regardless of path
  • *
*/ @ConfigItem(defaultValue = "**") public List includes; /** * A list of class files to exclude from the report. May use wildcard * characters (* and ?). When not specified nothing will be excluded. *

* For instance: *

    *
  • **/fo/**/* targets all classes under fo and sub packages
  • *
  • **/bar/* targets all classes directly under bar
  • *
  • **/*BAR*.class targets classes that contain BAR in their name regardless of path
  • *
*/ @ConfigItem public Optional> excludes; /** * The location of the report files. * The path can be relative (to the module) or absolute. */ @ConfigItem @ConfigDocDefault(TARGET_JACOCO_REPORT) public Optional reportLocation; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy