xref: /aosp_15_r20/external/jacoco/jacoco-maven-plugin.test/it/it-offline-instrumentation/pom.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  <parent>
18    <groupId>jacoco</groupId>
19    <artifactId>setup-parent</artifactId>
20    <version>1.0-SNAPSHOT</version>
21  </parent>
22
23  <artifactId>it-offline-instrumentation</artifactId>
24  <packaging>pom</packaging>
25
26  <modules>
27    <module>child</module>
28    <module>child-without-main-classes</module>
29  </modules>
30
31  <dependencies>
32    <dependency>
33      <groupId>@project.groupId@</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  <build>
42    <plugins>
43      <plugin>
44        <groupId>@project.groupId@</groupId>
45        <artifactId>jacoco-maven-plugin</artifactId>
46        <executions>
47          <execution>
48            <id>instrument-classes</id>
49            <goals>
50              <goal>instrument</goal>
51            </goals>
52            <configuration>
53              <excludes>
54                <exclude>**/DoNotInstrument.class</exclude>
55              </excludes>
56            </configuration>
57          </execution>
58          <execution>
59            <id>restore-instrumented-classes</id>
60            <goals>
61              <goal>restore-instrumented-classes</goal>
62            </goals>
63          </execution>
64          <execution>
65            <id>report</id>
66            <goals>
67              <goal>report</goal>
68            </goals>
69            <configuration>
70              <dataFile>${project.build.directory}/coverage.exec</dataFile>
71            </configuration>
72          </execution>
73        </executions>
74      </plugin>
75      <plugin>
76        <groupId>org.apache.maven.plugins</groupId>
77        <artifactId>maven-surefire-plugin</artifactId>
78        <configuration>
79          <systemPropertyVariables>
80            <jacoco-agent.destfile>${project.build.directory}/coverage.exec</jacoco-agent.destfile>
81          </systemPropertyVariables>
82        </configuration>
83      </plugin>
84    </plugins>
85  </build>
86</project>
87