xref: /aosp_15_r20/external/jacoco/org.jacoco.agent/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.build</artifactId>
19    <version>0.8.7</version>
20    <relativePath>../org.jacoco.build</relativePath>
21  </parent>
22
23  <artifactId>org.jacoco.agent</artifactId>
24
25  <name>JaCoCo :: Agent</name>
26  <description>JaCoCo Agent</description>
27
28  <build>
29    <sourceDirectory>src</sourceDirectory>
30
31    <plugins>
32      <plugin>
33        <groupId>org.apache.maven.plugins</groupId>
34        <artifactId>maven-dependency-plugin</artifactId>
35        <executions>
36          <execution>
37            <phase>prepare-package</phase>
38            <goals>
39              <goal>copy</goal>
40            </goals>
41            <configuration>
42              <artifactItems>
43                <artifactItem>
44                  <groupId>${project.groupId}</groupId>
45                  <artifactId>org.jacoco.agent.rt</artifactId>
46                  <classifier>all</classifier>
47                  <version>${project.version}</version>
48                  <destFileName>jacocoagent.jar</destFileName>
49                </artifactItem>
50              </artifactItems>
51              <outputDirectory>${project.build.directory}/classes</outputDirectory>
52              <overWriteReleases>false</overWriteReleases>
53              <overWriteSnapshots>false</overWriteSnapshots>
54              <overWriteIfNewer>true</overWriteIfNewer>
55            </configuration>
56          </execution>
57        </executions>
58      </plugin>
59
60      <plugin>
61        <groupId>org.codehaus.mojo</groupId>
62        <artifactId>build-helper-maven-plugin</artifactId>
63        <executions>
64          <execution>
65            <id>attach-artifacts</id>
66            <phase>package</phase>
67            <goals>
68              <goal>attach-artifact</goal>
69            </goals>
70            <configuration>
71              <artifacts>
72                <artifact>
73                  <file>${project.build.directory}/classes/jacocoagent.jar</file>
74                  <type>jar</type>
75                  <classifier>runtime</classifier>
76                </artifact>
77              </artifacts>
78            </configuration>
79          </execution>
80        </executions>
81      </plugin>
82
83      <plugin>
84        <groupId>org.apache.felix</groupId>
85        <artifactId>maven-bundle-plugin</artifactId>
86        <executions>
87          <execution>
88            <phase>process-classes</phase>
89            <goals>
90              <goal>manifest</goal>
91            </goals>
92          </execution>
93        </executions>
94      </plugin>
95      <plugin>
96        <groupId>org.apache.maven.plugins</groupId>
97        <artifactId>maven-jar-plugin</artifactId>
98        <configuration>
99          <archive>
100            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
101          </archive>
102        </configuration>
103      </plugin>
104    </plugins>
105  </build>
106</project>
107