Skip to content

Commit

Permalink
Generate OSGi metadata into pebble jar to make it OSGi compliant (#663)
Browse files Browse the repository at this point in the history
This allows to use the pebble jar in an OSGi runtime out of the box.

Co-authored-by: Hannes Wellmann <[email protected]>
  • Loading branch information
HannesWell and iils-hwellmann authored Nov 27, 2023
1 parent b771cae commit 1b83c56
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions pebble/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,37 @@

<build>
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>7.0.0</version>
<executions>
<execution>
<id>generate-osgi-manifest</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
Bundle-SymbolicName: io.pebbletemplates.pebble
Automatic-Module-Name: io.pebbletemplates
Import-Package: \
com.github.benmanes.caffeine.*;version="[2.6,4)";resolution:=optional, \
javax.servlet;version="[2.5,5)";resolution:=optional, \
jakarta.servlet;version="[5.0,7)";resolution:=optional, \
*
-exportcontents: *;-noimport:=true
-noextraheaders: true
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>io.pebbletemplates</Automatic-Module-Name>
</manifestEntries>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
Expand Down

0 comments on commit 1b83c56

Please sign in to comment.