xref: /aosp_15_r20/external/jacoco/jacoco-maven-plugin.test/it/it-dump/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    Charles Honton
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-dump</artifactId>
24
25  <build>
26    <plugins>
27      <plugin>
28        <groupId>@project.groupId@</groupId>
29        <artifactId>jacoco-maven-plugin</artifactId>
30        <executions>
31          <execution>
32            <id>prepare-agent</id>
33            <goals>
34              <goal>prepare-agent</goal>
35            </goals>
36            <configuration>
37              <output>tcpserver</output>
38            </configuration>
39          </execution>
40          <execution>
41            <id>dump</id>
42            <phase>integration-test</phase>
43            <goals>
44              <goal>dump</goal>
45            </goals>
46          </execution>
47          <execution>
48            <id>check</id>
49            <goals>
50              <goal>check</goal>
51            </goals>
52            <configuration>
53              <rules>
54                <rule>
55                  <element>BUNDLE</element>
56                  <limits>
57                    <limit>
58                      <counter>CLASS</counter>
59                      <value>COVEREDCOUNT</value>
60                      <minimum>1</minimum>
61                    </limit>
62                  </limits>
63                </rule>
64              </rules>
65            </configuration>
66          </execution>
67        </executions>
68      </plugin>
69      <plugin>
70        <groupId>org.apache.maven.plugins</groupId>
71        <artifactId>maven-antrun-plugin</artifactId>
72        <version>1.6</version>
73        <executions>
74          <execution>
75            <id>launch-server</id>
76            <phase>pre-integration-test</phase>
77            <goals>
78              <goal>run</goal>
79            </goals>
80            <configuration>
81              <target>
82                <java classname="Server" spawn="true" fork="true">
83                  <classpath refid="maven.runtime.classpath"/>
84                  <jvmarg value="${argLine}"/>
85                  <arg value="${project.build.directory}/term.txt"/>
86                </java>
87              </target>
88            </configuration>
89          </execution>
90          <execution>
91            <id>stop-server</id>
92            <phase>post-integration-test</phase>
93            <goals>
94              <goal>run</goal>
95            </goals>
96            <configuration>
97              <target>
98                <touch file="${project.build.directory}/term.txt" />
99              </target>
100            </configuration>
101          </execution>
102        </executions>
103      </plugin>
104    </plugins>
105  </build>
106</project>
107