• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3   Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors
4   All rights reserved. This program and the accompanying materials
5   are made available under the terms of the Eclipse Public License v1.0
6   which accompanies this distribution, and is available at
7   http://www.eclipse.org/legal/epl-v10.html
8
9   Contributors:
10      Evgeny Mandrikov - initial API and implementation
11-->
12<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
13  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
14  <modelVersion>4.0.0</modelVersion>
15
16  <groupId>org.jacoco</groupId>
17  <artifactId>org.jacoco.examples.maven</artifactId>
18  <version>@project.version@</version>
19  <packaging>jar</packaging>
20
21  <name>JaCoCo Maven plug-in example with Offline Instrumentation</name>
22  <url>http://www.jacoco.org/jacoco</url>
23
24  <dependencies>
25    <dependency>
26      <groupId>junit</groupId>
27      <artifactId>junit</artifactId>
28      <version>4.10</version>
29      <scope>test</scope>
30    </dependency>
31    <dependency>
32      <!-- must be on the classpath -->
33      <groupId>org.jacoco</groupId>
34      <artifactId>org.jacoco.agent</artifactId>
35      <classifier>runtime</classifier>
36      <version>@project.version@</version>
37      <scope>test</scope>
38    </dependency>
39  </dependencies>
40
41  <properties>
42    <maven.compiler.source>1.5</maven.compiler.source>
43    <maven.compiler.target>1.5</maven.compiler.target>
44  </properties>
45
46  <build>
47    <plugins>
48      <plugin>
49        <groupId>org.jacoco</groupId>
50        <artifactId>jacoco-maven-plugin</artifactId>
51        <version>@project.version@</version>
52        <executions>
53          <execution>
54            <id>default-instrument</id>
55            <goals>
56              <goal>instrument</goal>
57            </goals>
58          </execution>
59          <execution>
60            <id>default-restore-instrumented-classes</id>
61            <goals>
62              <goal>restore-instrumented-classes</goal>
63            </goals>
64          </execution>
65          <execution>
66            <id>default-report</id>
67            <phase>prepare-package</phase>
68            <goals>
69              <goal>report</goal>
70            </goals>
71          </execution>
72          <execution>
73            <id>default-check</id>
74            <goals>
75              <goal>check</goal>
76            </goals>
77            <configuration>
78              <rules>
79                <!-- implementation is needed only for Maven 2 -->
80                <rule implementation="org.jacoco.maven.RuleConfiguration">
81                  <element>BUNDLE</element>
82                  <limits>
83                    <!-- implementation is needed only for Maven 2 -->
84                    <limit implementation="org.jacoco.report.check.Limit">
85                      <counter>COMPLEXITY</counter>
86                      <value>COVEREDRATIO</value>
87                      <minimum>0.60</minimum>
88                    </limit>
89                  </limits>
90                </rule>
91              </rules>
92            </configuration>
93          </execution>
94        </executions>
95      </plugin>
96      <plugin>
97        <groupId>org.apache.maven.plugins</groupId>
98        <artifactId>maven-surefire-plugin</artifactId>
99        <version>2.12.2</version>
100        <configuration>
101          <systemPropertyVariables>
102            <jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
103          </systemPropertyVariables>
104        </configuration>
105      </plugin>
106    </plugins>
107  </build>
108
109</project>
110