1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 Copyright (c) 2009, 2017 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.7.10-SNAPSHOT</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 <transformers> 71 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> 72 <manifestEntries> 73 <Implementation-Title>${project.description}</Implementation-Title> 74 <Implementation-Vendor>${project.organization.name}</Implementation-Vendor> 75 <Implementation-Version>${project.version}</Implementation-Version> 76 </manifestEntries> 77 </transformer> 78 </transformers> 79 </configuration> 80 </execution> 81 </executions> 82 </plugin> 83 84 <plugin> 85 <groupId>org.apache.felix</groupId> 86 <artifactId>maven-bundle-plugin</artifactId> 87 <executions> 88 <execution> 89 <!-- 90 None of resource tranformers from maven-shade-plugin 91 (including combination of DontIncludeResourceTransformer and ManifestResourceTransformer) 92 does not allow us to leave only desired entries and remove others from META-INF/MANIFEST.MF 93 So we use goal "bundle" instead of "manifest". 94 This introduces some redundant operations, but their cost is negligible. 95 --> 96 <phase>package</phase> 97 <goals> 98 <goal>bundle</goal> 99 </goals> 100 <configuration> 101 <excludeDependencies>true</excludeDependencies> 102 <instructions> 103 <Require-Bundle>org.apache.ant;bundle-version="[1.7.0,2.0.0)"</Require-Bundle> 104 </instructions> 105 </configuration> 106 </execution> 107 </executions> 108 </plugin> 109 </plugins> 110 </build> 111 </project> 112