Do not leak tooling into MANIFEST.MF
[odlparent.git] / bnd-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4  Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
5
6  This program and the accompanying materials are made available under the
7  terms of the Eclipse Public License v1.0 which accompanies this distribution,
8  and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12     <modelVersion>4.0.0</modelVersion>
13
14     <parent>
15         <groupId>org.opendaylight.odlparent</groupId>
16         <artifactId>odlparent</artifactId>
17         <version>14.0.0-SNAPSHOT</version>
18         <relativePath>../odlparent</relativePath>
19     </parent>
20
21     <artifactId>bnd-parent</artifactId>
22     <packaging>pom</packaging>
23     <name>ODL :: odlparent :: ${project.artifactId}</name>
24
25     <!-- Annotations processed by bnd-maven-plugin -->
26     <dependencyManagement>
27         <dependencies>
28             <dependency>
29                 <groupId>biz.aQute.bnd</groupId>
30                 <artifactId>biz.aQute.bnd.annotation</artifactId>
31                 <version>7.0.0</version>
32                 <scope>provided</scope>
33             </dependency>
34         </dependencies>
35     </dependencyManagement>
36
37     <dependencies>
38         <dependency>
39             <groupId>org.osgi</groupId>
40             <artifactId>org.osgi.annotation.bundle</artifactId>
41         </dependency>
42         <dependency>
43             <groupId>org.osgi</groupId>
44             <artifactId>org.osgi.annotation.versioning</artifactId>
45         </dependency>
46         <dependency>
47             <groupId>org.osgi</groupId>
48             <artifactId>org.osgi.service.component.annotations</artifactId>
49         </dependency>
50         <dependency>
51             <groupId>org.osgi</groupId>
52             <artifactId>org.osgi.service.metatype.annotations</artifactId>
53         </dependency>
54         <dependency>
55             <groupId>org.osgi</groupId>
56             <artifactId>org.osgi.service.http.whiteboard</artifactId>
57         </dependency>
58     </dependencies>
59
60     <build>
61         <pluginManagement>
62             <plugins>
63                 <plugin>
64                     <groupId>biz.aQute.bnd</groupId>
65                     <artifactId>bnd-maven-plugin</artifactId>
66                     <version>7.0.0</version>
67                     <configuration>
68                         <bnd><![CDATA[
69                             -noextraheaders: true
70                             Bundle-SymbolicName: ${project.groupId}.${project.artifactId}
71                         ]]></bnd>
72                     </configuration>
73                 </plugin>
74             </plugins>
75         </pluginManagement>
76
77         <plugins>
78             <plugin>
79                 <artifactId>maven-javadoc-plugin</artifactId>
80             </plugin>
81             <plugin>
82                 <artifactId>maven-source-plugin</artifactId>
83             </plugin>
84             <plugin>
85                 <groupId>biz.aQute.bnd</groupId>
86                 <artifactId>bnd-maven-plugin</artifactId>
87                 <executions>
88                     <execution>
89                         <goals>
90                             <goal>bnd-process</goal>
91                         </goals>
92                     </execution>
93                 </executions>
94             </plugin>
95             <!--
96                 See https://github.com/bndtools/bnd/tree/master/maven-plugins/bnd-maven-plugin#important-note-about-maven-jarwar-plugin
97                 and https://issues.apache.org/jira/browse/MJAR-193
98             -->
99             <plugin>
100                 <groupId>org.apache.maven.plugins</groupId>
101                 <artifactId>maven-jar-plugin</artifactId>
102                 <configuration>
103                     <archive>
104                         <manifest>
105                             <!-- Do not leak tooling versions -->
106                             <addDefaultEntries>false</addDefaultEntries>
107
108                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
109                             <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
110                         </manifest>
111                         <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
112                     </archive>
113                 </configuration>
114             </plugin>
115         </plugins>
116     </build>
117 </project>