Skip to content

Commit 171679b

Browse files
jonahgrahamceki
authored andcommitted
SLF4J-574: Add full OSGi headers, especially "uses" clauses
Fixes: https://jira.qos.ch/browse/SLF4J-574 This uses the BND tool, via org.apache.felix to generate the MANIFEST.MF to be fully compliant with OSGi. Compared to using just the maven-jar-plugin to create the MANIFEST.MF the uses clauses are added to the Export-Package Signed-off-by: Jonah Graham <[email protected]>
1 parent 921b5b3 commit 171679b

File tree

2 files changed

+40
-9
lines changed

2 files changed

+40
-9
lines changed

pom.xml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,22 +228,39 @@
228228
</goals>
229229
<configuration>
230230
<archive>
231-
<manifestEntries>
232-
<Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>
233-
<Bundle-Description>${project.description}</Bundle-Description>
234-
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
235-
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
236-
<Implementation-Version>${project.version}</Implementation-Version>
237-
<Multi-Release>true</Multi-Release>
238-
</manifestEntries>
239231
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
240232
</archive>
241233
<skipIfEmpty>true</skipIfEmpty>
242234
</configuration>
243235
</execution>
244236
</executions>
245237
</plugin>
246-
238+
239+
<plugin>
240+
<groupId>org.apache.felix</groupId>
241+
<artifactId>maven-bundle-plugin</artifactId>
242+
<executions>
243+
<execution>
244+
<id>bundle-manifest</id>
245+
<phase>process-classes</phase>
246+
<goals>
247+
<goal>manifest</goal>
248+
</goals>
249+
<configuration>
250+
<unpackBundle>true</unpackBundle>
251+
<instructions>
252+
<Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>
253+
<Bundle-Description>${project.description}</Bundle-Description>
254+
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
255+
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
256+
<Implementation-Version>${project.version}</Implementation-Version>
257+
<Multi-Release>true</Multi-Release>
258+
</instructions>
259+
</configuration>
260+
</execution>
261+
</executions>
262+
</plugin>
263+
247264
<plugin>
248265
<groupId>org.apache.maven.plugins</groupId>
249266
<artifactId>maven-surefire-plugin</artifactId>

slf4j-api/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@
5252
</execution>
5353
</executions>
5454
</plugin>
55+
56+
<plugin>
57+
<groupId>org.apache.felix</groupId>
58+
<artifactId>maven-bundle-plugin</artifactId>
59+
<executions>
60+
<execution>
61+
<id>bundle-manifest</id>
62+
<phase>process-classes</phase>
63+
<goals>
64+
<goal>manifest</goal>
65+
</goals>
66+
</execution>
67+
</executions>
68+
</plugin>
5569
</plugins>
5670

5771
</build>

0 commit comments

Comments
 (0)