• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3   Copyright (c) 2009, 2019 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      Evgeny Mandrikov - initial API and implementation
11-->
12<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">
13  <modelVersion>4.0.0</modelVersion>
14
15  <parent>
16    <groupId>org.jacoco</groupId>
17    <artifactId>org.jacoco.build</artifactId>
18    <version>0.8.4</version>
19    <relativePath>../org.jacoco.build</relativePath>
20  </parent>
21
22  <artifactId>org.jacoco.ant</artifactId>
23
24  <name>JaCoCo :: Ant</name>
25  <description>JaCoCo Ant Tasks</description>
26
27  <dependencies>
28    <dependency>
29      <groupId>${project.groupId}</groupId>
30      <artifactId>org.jacoco.core</artifactId>
31    </dependency>
32    <dependency>
33      <groupId>${project.groupId}</groupId>
34      <artifactId>org.jacoco.report</artifactId>
35    </dependency>
36    <dependency>
37      <groupId>${project.groupId}</groupId>
38      <artifactId>org.jacoco.agent</artifactId>
39    </dependency>
40    <dependency>
41      <groupId>org.apache.ant</groupId>
42      <artifactId>ant</artifactId>
43      <scope>provided</scope>
44    </dependency>
45  </dependencies>
46
47  <build>
48    <sourceDirectory>src</sourceDirectory>
49
50    <plugins>
51      <plugin>
52        <groupId>org.apache.maven.plugins</groupId>
53        <artifactId>maven-shade-plugin</artifactId>
54        <executions>
55          <execution>
56            <phase>package</phase>
57            <goals>
58              <goal>shade</goal>
59            </goals>
60            <configuration>
61              <shadedArtifactAttached>true</shadedArtifactAttached>
62              <shadedClassifierName>nodeps</shadedClassifierName>
63              <minimizeJar>true</minimizeJar>
64              <relocations>
65                <relocation>
66                  <pattern>org.objectweb.asm</pattern>
67                  <shadedPattern>org.jacoco.asm</shadedPattern>
68                </relocation>
69              </relocations>
70              <filters>
71                <filter>
72                  <artifact>org.ow2.asm:*</artifact>
73                  <excludes>
74                    <exclude>module-info.class</exclude>
75                  </excludes>
76                </filter>
77              </filters>
78              <transformers>
79                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
80                  <manifestEntries>
81                    <Implementation-Title>${project.description}</Implementation-Title>
82                    <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
83                    <Implementation-Version>${project.version}</Implementation-Version>
84                  </manifestEntries>
85                </transformer>
86              </transformers>
87            </configuration>
88          </execution>
89        </executions>
90      </plugin>
91
92      <plugin>
93        <groupId>org.apache.felix</groupId>
94        <artifactId>maven-bundle-plugin</artifactId>
95        <executions>
96          <execution>
97            <!--
98            None of resource tranformers from maven-shade-plugin
99            (including combination of DontIncludeResourceTransformer and ManifestResourceTransformer)
100            does not allow us to leave only desired entries and remove others from META-INF/MANIFEST.MF
101            So we use goal "bundle" instead of "manifest".
102            This introduces some redundant operations, but their cost is negligible.
103            -->
104            <phase>package</phase>
105            <goals>
106              <goal>bundle</goal>
107            </goals>
108            <configuration>
109              <excludeDependencies>true</excludeDependencies>
110              <instructions>
111                <Require-Bundle>org.apache.ant;bundle-version="[1.7.0,2.0.0)"</Require-Bundle>
112              </instructions>
113            </configuration>
114          </execution>
115        </executions>
116      </plugin>
117    </plugins>
118  </build>
119</project>
120