• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3   Copyright (c) 2009, 2018 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            <goals>
68              <goal>report</goal>
69            </goals>
70          </execution>
71          <execution>
72            <id>default-check</id>
73            <goals>
74              <goal>check</goal>
75            </goals>
76            <configuration>
77              <rules>
78                <!-- implementation is needed only for Maven 2 -->
79                <rule implementation="org.jacoco.maven.RuleConfiguration">
80                  <element>BUNDLE</element>
81                  <limits>
82                    <!-- implementation is needed only for Maven 2 -->
83                    <limit implementation="org.jacoco.report.check.Limit">
84                      <counter>COMPLEXITY</counter>
85                      <value>COVEREDRATIO</value>
86                      <minimum>0.60</minimum>
87                    </limit>
88                  </limits>
89                </rule>
90              </rules>
91            </configuration>
92          </execution>
93        </executions>
94      </plugin>
95      <plugin>
96        <groupId>org.apache.maven.plugins</groupId>
97        <artifactId>maven-surefire-plugin</artifactId>
98        <version>2.12.2</version>
99        <configuration>
100          <systemPropertyVariables>
101            <jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
102          </systemPropertyVariables>
103        </configuration>
104      </plugin>
105    </plugins>
106  </build>
107
108</project>
109