Skip to content

Commit

Permalink
Update OpenPDF to build with Java 11+. This is work-on-progress. The …
Browse files Browse the repository at this point in the history
…future belongs to those who prepare for it today.
  • Loading branch information
andreasrosdal committed Jan 10, 2024
1 parent 1226cd6 commit 59fc52c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 57 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ only contain code that you have written yourself. GPL or AGPL licensed code will

### Required Dependencies: ###

- Java 9 or later is required to use OpenPDF. All versions Java 9 to Java OpenJDK 15 have been
tested to work.
- Java 9 or later is required to use OpenPDF versions up to 1.3.36. We will consider the need for more Java 9+ compatible maintenance releases.
- Java 11 or later is required to use OpenPDF versions 1.3.37 and later. All versions Java 11 to Java OpenJDK 21 have been tested to work. We are working on modernizing the OpenPDF library for Java 11+.


### UTF-8 Fonts: ###

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
requires static org.bouncycastle.provider;
requires static fop;
requires static java.desktop;
requires fop.core;
requires com.ibm.icu;

exports com.lowagie.bouncycastle;
exports com.lowagie.bouncycastle;
exports com.lowagie.text;
exports com.lowagie.text.alignment;
exports com.lowagie.text.error_messages;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
requires com.github.librepdf.openpdf;
requires org.dom4j;
requires pdf.renderer;
requires java.desktop;

exports com.lowagie.rups;
exports com.lowagie.rups;
exports com.lowagie.rups.controller;
exports com.lowagie.rups.io;
exports com.lowagie.rups.io.filters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
requires com.github.librepdf.openpdf;
requires org.jfree.jfreechart;
requires jcommon;
requires java.desktop;

exports com.lowagie.toolbox;
exports com.lowagie.toolbox;
exports com.lowagie.toolbox.arguments;
exports com.lowagie.toolbox.arguments.filters;
exports com.lowagie.toolbox.plugins;
Expand Down
30 changes: 0 additions & 30 deletions pdf-toolbox/src/test/java/com/lowagie/text/SwingExamplesTest.java

This file was deleted.

29 changes: 7 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<properties>
<java-module-name>com.github.librepdf.openpdf.parent</java-module-name>
<java.version>9</java.version>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down Expand Up @@ -406,24 +406,9 @@

<profiles>
<profile>
<id>jdk8</id>
<id>jdk11-plus</id>
<activation>
<jdk>(,8]</jdk>
</activation>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito4.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
<profile>
<id>jdk9-plus</id>
<activation>
<jdk>[9,)</jdk>
<jdk>[11,)</jdk>
</activation>
<dependencyManagement>
<dependencies>
Expand All @@ -441,18 +426,18 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<release>8</release>
<release>11</release>
</configuration>
<executions>
<execution>
<id>compile-java-9</id>
<id>compile-java-11</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>9</release>
<release>11</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
<compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
Expand Down

0 comments on commit 59fc52c

Please sign in to comment.