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