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