xref: /aosp_15_r20/external/jacoco/org.jacoco.examples.test/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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
14  <modelVersion>4.0.0</modelVersion>
15
16  <parent>
17    <groupId>org.jacoco</groupId>
18    <artifactId>org.jacoco.tests</artifactId>
19    <version>0.8.7</version>
20    <relativePath>../org.jacoco.tests</relativePath>
21  </parent>
22
23  <artifactId>org.jacoco.examples.test</artifactId>
24
25  <name>JaCoCo :: Test :: Examples</name>
26
27  <properties>
28    <jacoco.includes>org.jacoco.examples.*</jacoco.includes>
29    <jacoco.excludes>org.jacoco.examples.CoreTutorial$TestTarget</jacoco.excludes>
30  </properties>
31
32  <dependencies>
33    <dependency>
34      <groupId>${project.groupId}</groupId>
35      <artifactId>org.jacoco.examples</artifactId>
36    </dependency>
37    <dependency>
38      <groupId>${project.groupId}</groupId>
39      <artifactId>org.jacoco.agent.rt</artifactId>
40    </dependency>
41    <dependency>
42      <groupId>junit</groupId>
43      <artifactId>junit</artifactId>
44    </dependency>
45  </dependencies>
46  <build>
47    <plugins>
48      <plugin>
49        <groupId>org.apache.maven.plugins</groupId>
50        <artifactId>maven-dependency-plugin</artifactId>
51        <executions>
52          <execution>
53            <id>default-unpack</id>
54            <phase>package</phase>
55            <goals>
56              <goal>unpack</goal>
57            </goals>
58            <configuration>
59              <artifactItems>
60                <artifactItem>
61                  <groupId>${project.groupId}</groupId>
62                  <artifactId>org.jacoco.examples</artifactId>
63                  <version>${project.version}</version>
64                  <type>zip</type>
65                  <overWrite>true</overWrite>
66                  <outputDirectory>${project.build.directory}/build</outputDirectory>
67                </artifactItem>
68              </artifactItems>
69            </configuration>
70          </execution>
71        </executions>
72      </plugin>
73      <plugin>
74        <groupId>org.apache.maven.plugins</groupId>
75        <artifactId>maven-invoker-plugin</artifactId>
76        <executions>
77          <execution>
78            <id>test-pom</id>
79            <goals>
80              <goal>install</goal>
81              <goal>run</goal>
82            </goals>
83            <configuration>
84              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
85              <postBuildHookScript>../../../src/test/resources/verify</postBuildHookScript>
86              <goals>
87                <goal>verify</goal>
88              </goals>
89            </configuration>
90          </execution>
91          <execution>
92            <id>test-pom-it</id>
93            <goals>
94              <goal>install</goal>
95              <goal>run</goal>
96            </goals>
97            <configuration>
98              <cloneProjectsTo>${project.build.directory}/it-it</cloneProjectsTo>
99              <postBuildHookScript>../../../src/test/resources/verify-it</postBuildHookScript>
100              <goals>
101                <!-- this is probably a hack! -->
102                <goal>-f pom-it.xml</goal>
103                <goal>verify</goal>
104              </goals>
105            </configuration>
106          </execution>
107          <execution>
108            <id>test-pom-offline</id>
109            <goals>
110              <goal>install</goal>
111              <goal>run</goal>
112            </goals>
113            <configuration>
114              <cloneProjectsTo>${project.build.directory}/it-offline</cloneProjectsTo>
115              <postBuildHookScript>../../../src/test/resources/verify-offline</postBuildHookScript>
116              <goals>
117                <!-- this is probably a hack! -->
118                <goal>-f pom-offline.xml</goal>
119                <goal>verify</goal>
120              </goals>
121            </configuration>
122          </execution>
123        </executions>
124        <configuration>
125          <projectsDirectory>${project.build.directory}/build/examples</projectsDirectory>
126          <properties>
127            <maven.compiler.source>${maven.compiler.source}</maven.compiler.source>
128            <maven.compiler.target>${maven.compiler.target}</maven.compiler.target>
129          </properties>
130        </configuration>
131      </plugin>
132    </plugins>
133  </build>
134</project>
135