Skip to content

Commit

Permalink
Merge branch 'master' into issue-424
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed Jan 10, 2019
2 parents 135e12a + db5fefe commit 69cfd1f
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 50 deletions.
6 changes: 2 additions & 4 deletions jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml
Expand Up @@ -40,15 +40,13 @@
</goals>
<configuration>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<rule>
<element>CLASS</element>
<includes>
<include>Example</include>
</includes>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>METHOD</counter>
<value>MISSEDCOUNT</value>
<maximum>0</maximum>
Expand Down
6 changes: 2 additions & 4 deletions jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml
Expand Up @@ -41,12 +41,10 @@
<configuration>
<haltOnFailure>false</haltOnFailure>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<rule>
<element>BUNDLE</element>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>METHOD</counter>
<value>MISSEDCOUNT</value>
<maximum>0</maximum>
Expand Down
9 changes: 3 additions & 6 deletions jacoco-maven-plugin.test/it/it-check-passes/pom.xml
Expand Up @@ -40,18 +40,15 @@
</goals>
<configuration>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<rule>
<element>BUNDLE</element>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.90</minimum>
</limit>
<!-- implmentation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>CLASS</counter>
<value>MISSEDCOUNT</value>
<maximum>0</maximum>
Expand Down
6 changes: 2 additions & 4 deletions jacoco-maven-plugin.test/it/it-dump/pom.xml
Expand Up @@ -50,12 +50,10 @@
</goals>
<configuration>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<rule>
<element>BUNDLE</element>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>CLASS</counter>
<value>COVEREDCOUNT</value>
<minimum>1</minimum>
Expand Down
6 changes: 2 additions & 4 deletions jacoco-maven-plugin.test/it/it-java9/pom.xml
Expand Up @@ -49,11 +49,9 @@
</goals>
<configuration>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<rule>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDCOUNT</value>
<minimum>8</minimum>
Expand Down
4 changes: 2 additions & 2 deletions jacoco-maven-plugin/pom.xml
Expand Up @@ -27,7 +27,7 @@
<description>The JaCoCo Maven Plugin provides the JaCoCo runtime agent to your tests and allows basic report creation.</description>

<prerequisites>
<maven>2.2.1</maven>
<maven>3.0</maven>
</prerequisites>

<dependencyManagement>
Expand All @@ -54,7 +54,7 @@
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<artifactId>maven-core</artifactId>
<version>${project.prerequisites.maven}</version>
</dependency>
<dependency>
Expand Down
12 changes: 3 additions & 9 deletions jacoco-maven-plugin/src/org/jacoco/maven/CheckMojo.java
Expand Up @@ -64,28 +64,22 @@ public class CheckMojo extends AbstractJacocoMojo implements IViolationsOutput {
* </ul>
*
* <p>
* Note that you <b>must</b> use <tt>implementation</tt> hints for
* <tt>rule</tt> and <tt>limit</tt> when using Maven 2, with Maven 3 you do
* not need to specify the attributes.
* </p>
*
* <p>
* This example requires an overall instruction coverage of 80% and no class
* must be missed:
* </p>
*
* <pre>
* {@code
* <rules>
* <rule implementation="org.jacoco.maven.RuleConfiguration">
* <rule>
* <element>BUNDLE</element>
* <limits>
* <limit implementation="org.jacoco.report.check.Limit">
* <limit>
* <counter>INSTRUCTION</counter>
* <value>COVEREDRATIO</value>
* <minimum>0.80</minimum>
* </limit>
* <limit implementation="org.jacoco.report.check.Limit">
* <limit>
* <counter>CLASS</counter>
* <value>MISSEDCOUNT</value>
* <maximum>0</maximum>
Expand Down
5 changes: 1 addition & 4 deletions jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java
Expand Up @@ -43,13 +43,10 @@ public class MergeMojo extends AbstractJacocoMojo {
/**
* This mojo accepts any number of execution data file sets.
*
* Note that you need an <tt>implementation</tt> hint on <tt>fileset</tt>
* with Maven 2 (not needed with Maven 3):
*
* <pre>
* <code>
* &lt;fileSets&gt;
* &lt;fileSet implementation="org.apache.maven.shared.model.fileset.FileSet"&gt;
* &lt;fileSet&gt;
* &lt;directory&gt;${project.build.directory}&lt;/directory&gt;
* &lt;includes&gt;
* &lt;include&gt;*.exec&lt;/include&gt;
Expand Down
2 changes: 2 additions & 0 deletions org.jacoco.doc/docroot/doc/changes.html
Expand Up @@ -22,6 +22,8 @@ <h2>Snapshot Build @qualified.bundle.version@ (@build.date@)</h2>

<h3>New Features</h3>
<ul>
<li>jacoco-maven-plugin now requires at least Maven 3.0
(GitHub <a href="https://github.com/jacoco/jacoco/issues/821">#821</a>).</li>
<li>JaCoCo now officially supports Java 11
(GitHub <a href="https://github.com/jacoco/jacoco/issues/760">#760</a>).</li>
<li>Branch added by the Kotlin compiler for "unsafe" cast operator is filtered
Expand Down
2 changes: 1 addition & 1 deletion org.jacoco.doc/docroot/doc/maven.html
Expand Up @@ -73,7 +73,7 @@ <h2>Prerequisites</h2>
</p>

<ul>
<li>Maven 2.1.0 or higher and</li>
<li>Maven 3.0 or higher and</li>
<li>Java 1.5 or higher (for both, the Maven runtime and the test executor).</li>
</ul>

Expand Down
6 changes: 2 additions & 4 deletions org.jacoco.examples/build/pom-it.xml
Expand Up @@ -74,12 +74,10 @@
</goals>
<configuration>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<rule>
<element>BUNDLE</element>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.60</minimum>
Expand Down
6 changes: 2 additions & 4 deletions org.jacoco.examples/build/pom-offline.xml
Expand Up @@ -75,12 +75,10 @@
</goals>
<configuration>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<rule>
<element>BUNDLE</element>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.60</minimum>
Expand Down
6 changes: 2 additions & 4 deletions org.jacoco.examples/build/pom.xml
Expand Up @@ -62,12 +62,10 @@
</goals>
<configuration>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<rule>
<element>BUNDLE</element>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.60</minimum>
Expand Down

0 comments on commit 69cfd1f

Please sign in to comment.