Skip to content

Commit

Permalink
#510 Use Apache Felix maven-bundle-plugin to add osgi metadata during…
Browse files Browse the repository at this point in the history
… build.

For now, we export all packages, for simplicity.
  • Loading branch information
danfickle committed Jul 22, 2020
1 parent 9343409 commit 1461470
Show file tree
Hide file tree
Showing 10 changed files with 339 additions and 1 deletion.
38 changes: 37 additions & 1 deletion openhtmltopdf-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>openhtmltopdf-core</artifactId>
<description>Open HTML to PDF is a CSS 2.1 renderer written in Java. This artifact contains the core rendering and layout code as well as Java2D output.</description>
<description>Open HTML to PDF is a CSS 2.1 renderer written in Java. This artifact contains the core rendering and layout code.</description>

<licenses>
<license>
Expand Down Expand Up @@ -51,5 +51,41 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
37 changes: 37 additions & 0 deletions openhtmltopdf-java2d/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,42 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>

</build>
</project>
37 changes: 37 additions & 0 deletions openhtmltopdf-latex-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,43 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>

</build>
</project>

37 changes: 37 additions & 0 deletions openhtmltopdf-mathml-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,42 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>

</build>
</project>
37 changes: 37 additions & 0 deletions openhtmltopdf-objects/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,42 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>

</build>
</project>
37 changes: 37 additions & 0 deletions openhtmltopdf-pdfbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,43 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>

</build>

<properties>
Expand Down
38 changes: 38 additions & 0 deletions openhtmltopdf-rtl-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,43 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>


</build>
</project>
37 changes: 37 additions & 0 deletions openhtmltopdf-slf4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,42 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>

</build>
</project>
38 changes: 38 additions & 0 deletions openhtmltopdf-svg-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,43 @@
</includes>
</resource>
</resources>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${open.jar.plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${open.bundle.plugin.version}</version>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
</instructions>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>


</build>
</project>
Loading

0 comments on commit 1461470

Please sign in to comment.