Skip to content

Commit fbe00bf

Browse files
author
Christoph Läubrich
committed
Add bnd-maven plugin to dependency management section
This adds the bnd-maven plugin to the dependency management section to allow generate OSGi metadata in an non-intrusive way.
1 parent 88c7f55 commit fbe00bf

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
<versions-maven-plugin.version>2.19.1</versions-maven-plugin.version>
5555
<directory-maven-plugin.version>1.0</directory-maven-plugin.version>
5656
<spotless-maven-plugin.version>3.0.0</spotless-maven-plugin.version>
57+
<osgi.id>${project.Automatic-Module-Name}</osgi.id>
58+
<osgi.exports>*;-noimport:=true</osgi.exports>
59+
<osgi.imports>*</osgi.imports>
5760
</properties>
5861

5962
<licenses>
@@ -236,6 +239,27 @@
236239
</archive>
237240
</configuration>
238241
</plugin>
242+
<plugin>
243+
<groupId>biz.aQute.bnd</groupId>
244+
<artifactId>bnd-maven-plugin</artifactId>
245+
<version>7.1.0</version>
246+
<executions>
247+
<execution>
248+
<id>bnd-process</id>
249+
<goals>
250+
<goal>bnd-process</goal>
251+
</goals>
252+
<configuration>
253+
<bnd><![CDATA[
254+
Bundle-SymbolicName: ${osgi.id}
255+
-exportcontents: ${osgi.exports}
256+
Import-Package: ${osgi.imports}
257+
]]>
258+
</bnd>
259+
</configuration>
260+
</execution>
261+
</executions>
262+
</plugin>
239263

240264
<plugin>
241265
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)