Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Add ability to stop the build on a TPC threshold for the Maven plugin #7

Closed
vmassol opened this issue Sep 5, 2012 · 2 comments
Closed
Assignees

Comments

@vmassol
Copy link

vmassol commented Sep 5, 2012

Add a Maven Mojo (could be called CheckMojo) that can stop the build if the Test Percentage Coverage (TPC) is below a given value, specified as a configuration in the project's pom.xml.

For example Clover does this:

    <plugins>
      <!-- Fail the build if the test coverage is below a given value. -->
      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>maven-clover2-plugin</artifactId>
        <configuration>
          <!-- Note that the overall TPC when including functional tests for this module is around 78% -->
          <targetPercentage>${xwiki.clover.targetPercentage}%</targetPercentage>
        </configuration>
        <executions>
          <execution>
            <id>clover-check</id>
            <phase>verify</phase>
            <goals>
              <goal>instrument-test</goal>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

That would help a lot...

@Godin
Copy link
Member

Godin commented Sep 5, 2012

Duplicate of jacoco/jacoco#6
Moreover EclEmma project is dedicated to Eclipse plugin.

@Godin Godin closed this as completed Sep 5, 2012
@ghost ghost assigned Godin Sep 5, 2012
@vmassol
Copy link
Author

vmassol commented Sep 5, 2012

Indeed I've used the wrong project (that's why I was surprised to not find an existing issue about this topic!), sorry about that and thanks for referencing the existing issue...

@jacoco jacoco locked and limited conversation to collaborators Jan 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants