Skip to content

Commit 6efaa83

Browse files
author
James Leigh
committed
Issue #874: Add OSGI bundle info to MANIFEST.MF
Signed-off-by: James Leigh <james.leigh@ontotext.com>
1 parent 84373e6 commit 6efaa83

5 files changed

Lines changed: 134 additions & 33 deletions

File tree

client/pom.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,49 @@
207207
</execution>
208208
</executions>
209209
</plugin>
210+
<plugin>
211+
<groupId>org.apache.maven.plugins</groupId>
212+
<artifactId>maven-jar-plugin</artifactId>
213+
<inherited>false</inherited>
214+
<configuration>
215+
<archive>
216+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
217+
</archive>
218+
</configuration>
219+
</plugin>
220+
<plugin>
221+
<groupId>org.apache.felix</groupId>
222+
<artifactId>maven-bundle-plugin</artifactId>
223+
<executions>
224+
<execution>
225+
<id>bundle-manifest</id>
226+
<phase>process-classes</phase>
227+
<goals>
228+
<goal>manifest</goal>
229+
</goals>
230+
</execution>
231+
</executions>
232+
<configuration>
233+
<instructions>
234+
<Implementation-Title>${project.name}</Implementation-Title>
235+
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
236+
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
237+
<Implementation-Version>${project.version}+${buildNumber}</Implementation-Version>
238+
<Implementation-Build>${buildNumber}</Implementation-Build>
239+
<Implementation-URL>${project.url}</Implementation-URL>
240+
<Bundle-Version>${project.version}+${buildNumber}</Bundle-Version>
241+
<Export-Package>!*text-base,!*prop-base,org.eclipse.rdf4j.*</Export-Package>
242+
<Embed-Dependency>
243+
*;
244+
groupId=org.eclipse.rdf4j;
245+
scope=compile|runtime;
246+
type=!pom;
247+
inline=true
248+
</Embed-Dependency>
249+
<Embed-Transitive>true</Embed-Transitive>
250+
</instructions>
251+
</configuration>
252+
</plugin>
210253
<plugin>
211254
<groupId>org.codehaus.mojo</groupId>
212255
<artifactId>buildnumber-maven-plugin</artifactId>

core/http/pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,28 @@
2222
<module>workbench</module>
2323
</modules>
2424

25+
<build>
26+
<pluginManagement>
27+
<plugins>
28+
<plugin>
29+
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-war-plugin</artifactId>
31+
<version>2.1.1</version>
32+
<configuration>
33+
<failOnMissingWebXml>false</failOnMissingWebXml>
34+
<archive>
35+
<manifestEntries>
36+
<Implementation-Title>${project.name}</Implementation-Title>
37+
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
38+
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
39+
<Implementation-Version>${project.version}+${buildNumber}</Implementation-Version>
40+
<Implementation-Build>${buildNumber}</Implementation-Build>
41+
</manifestEntries>
42+
</archive>
43+
</configuration>
44+
</plugin>
45+
</plugins>
46+
</pluginManagement>
47+
</build>
48+
2549
</project>

core/pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,29 @@
3636
<name>RDF4J Core</name>
3737
<description>Core modules for RDF4J</description>
3838

39+
<build>
40+
<pluginManagement>
41+
<plugins>
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-jar-plugin</artifactId>
45+
<version>2.3.1</version>
46+
<configuration>
47+
<archive>
48+
<manifestEntries>
49+
<Implementation-Title>${project.name}</Implementation-Title>
50+
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
51+
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
52+
<Implementation-Version>${project.version}+${buildNumber}</Implementation-Version>
53+
<Implementation-Build>${buildNumber}</Implementation-Build>
54+
</manifestEntries>
55+
</archive>
56+
</configuration>
57+
</plugin>
58+
</plugins>
59+
</pluginManagement>
60+
</build>
61+
3962
<profiles>
4063
<profile>
4164
<id>assembly</id>

pom.xml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -650,22 +650,6 @@
650650
<shortRevisionLength>7</shortRevisionLength>
651651
</configuration>
652652
</plugin>
653-
<plugin>
654-
<groupId>org.apache.maven.plugins</groupId>
655-
<artifactId>maven-jar-plugin</artifactId>
656-
<version>2.3.1</version>
657-
<configuration>
658-
<archive>
659-
<manifest>
660-
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
661-
</manifest>
662-
<manifestEntries>
663-
<Implementation-Version>${project.version}+${buildNumber}</Implementation-Version>
664-
<Implementation-Build>${buildNumber}</Implementation-Build>
665-
</manifestEntries>
666-
</archive>
667-
</configuration>
668-
</plugin>
669653
<plugin>
670654
<groupId>org.apache.maven.plugins</groupId>
671655
<artifactId>maven-javadoc-plugin</artifactId>
@@ -707,23 +691,6 @@
707691
</includes>
708692
</configuration>
709693
</plugin>
710-
<plugin>
711-
<groupId>org.apache.maven.plugins</groupId>
712-
<artifactId>maven-war-plugin</artifactId>
713-
<version>2.1.1</version>
714-
<configuration>
715-
<failOnMissingWebXml>false</failOnMissingWebXml>
716-
<archive>
717-
<manifest>
718-
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
719-
</manifest>
720-
<manifestEntries>
721-
<Implementation-Version>${project.version}+${buildNumber}</Implementation-Version>
722-
<Implementation-Build>${buildNumber}</Implementation-Build>
723-
</manifestEntries>
724-
</archive>
725-
</configuration>
726-
</plugin>
727694
<plugin>
728695
<groupId>org.apache.tomcat.maven</groupId>
729696
<artifactId>tomcat7-maven-plugin</artifactId>

store/pom.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,50 @@
305305
</execution>
306306
</executions>
307307
</plugin>
308+
<plugin>
309+
<groupId>org.apache.maven.plugins</groupId>
310+
<artifactId>maven-jar-plugin</artifactId>
311+
<inherited>false</inherited>
312+
<configuration>
313+
<archive>
314+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
315+
</archive>
316+
</configuration>
317+
</plugin>
318+
<plugin>
319+
<groupId>org.apache.felix</groupId>
320+
<artifactId>maven-bundle-plugin</artifactId>
321+
<executions>
322+
<execution>
323+
<id>bundle-manifest</id>
324+
<phase>process-classes</phase>
325+
<goals>
326+
<goal>manifest</goal>
327+
</goals>
328+
</execution>
329+
</executions>
330+
<configuration>
331+
<instructions>
332+
<Implementation-Title>${project.name}</Implementation-Title>
333+
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
334+
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
335+
<Implementation-Version>${project.version}+${buildNumber}</Implementation-Version>
336+
<Implementation-Build>${buildNumber}</Implementation-Build>
337+
<Implementation-URL>${project.url}</Implementation-URL>
338+
<Bundle-Version>${project.version}+${buildNumber}</Bundle-Version>
339+
<Export-Package>!*text-base,!*prop-base,org.eclipse.rdf4j.*</Export-Package>
340+
<Embed-Dependency>
341+
*;
342+
groupId=org.eclipse.rdf4j;
343+
artifactId=!rdf4j-client;
344+
scope=compile|runtime;
345+
type=!pom;
346+
inline=true
347+
</Embed-Dependency>
348+
<Embed-Transitive>true</Embed-Transitive>
349+
</instructions>
350+
</configuration>
351+
</plugin>
308352
<plugin>
309353
<groupId>org.codehaus.mojo</groupId>
310354
<artifactId>buildnumber-maven-plugin</artifactId>

0 commit comments

Comments
 (0)