From 96f00ad8e3dad7884bc0aab38f34eb55bad8a8f3 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Wed, 6 Mar 2024 21:09:50 +0100 Subject: [PATCH] Added explicit module-info.java for all submodules that previously provided an automatic module name Removed automatic module name from all pom.xml that defined one --- debugger/pom.xml | 13 ----- debugger/src/main/java/module-info.java | 22 +++++++++ fontbox/pom.xml | 5 -- fontbox/src/main/java/module-info.java | 19 ++++++++ io/pom.xml | 5 -- io/src/main/java/module-info.java | 4 ++ pdfbox/pom.xml | 1 - pdfbox/src/main/java/module-info.java | 65 +++++++++++++++++++++++++ tools/pom.xml | 11 ----- tools/src/main/java/module-info.java | 13 +++++ xmpbox/pom.xml | 5 -- xmpbox/src/main/java/module-info.java | 8 +++ 12 files changed, 131 insertions(+), 40 deletions(-) create mode 100644 debugger/src/main/java/module-info.java create mode 100644 fontbox/src/main/java/module-info.java create mode 100644 io/src/main/java/module-info.java create mode 100644 pdfbox/src/main/java/module-info.java create mode 100644 tools/src/main/java/module-info.java create mode 100644 xmpbox/src/main/java/module-info.java diff --git a/debugger/pom.xml b/debugger/pom.xml index 4f56c5f42ed..1d914c73d42 100644 --- a/debugger/pom.xml +++ b/debugger/pom.xml @@ -87,19 +87,6 @@ true - - - org.apache.maven.plugins - maven-jar-plugin - - - - org.apache.pdfbox.debugger - - - - - diff --git a/debugger/src/main/java/module-info.java b/debugger/src/main/java/module-info.java new file mode 100644 index 00000000000..74126ed4adc --- /dev/null +++ b/debugger/src/main/java/module-info.java @@ -0,0 +1,22 @@ +module org.apache.pdfbox.debugger { + requires org.apache.pdfbox; + requires java.desktop; + requires org.apache.pdfbox.io; + requires org.apache.logging.log4j; + requires org.apache.fontbox; + requires info.picocli; + requires java.prefs; + requires org.apache.logging.log4j.core; + exports org.apache.pdfbox.debugger; + exports org.apache.pdfbox.debugger.colorpane; + exports org.apache.pdfbox.debugger.flagbitspane; + exports org.apache.pdfbox.debugger.fontencodingpane; + exports org.apache.pdfbox.debugger.hexviewer; + exports org.apache.pdfbox.debugger.pagepane; + exports org.apache.pdfbox.debugger.streampane; + exports org.apache.pdfbox.debugger.streampane.tooltip; + exports org.apache.pdfbox.debugger.stringpane; + exports org.apache.pdfbox.debugger.treestatus; + exports org.apache.pdfbox.debugger.ui; + exports org.apache.pdfbox.debugger.ui.textsearcher; +} \ No newline at end of file diff --git a/fontbox/pom.xml b/fontbox/pom.xml index 565945e2802..ddbe16c6222 100644 --- a/fontbox/pom.xml +++ b/fontbox/pom.xml @@ -68,11 +68,6 @@ org.apache.felix maven-bundle-plugin true - - - org.apache.fontbox - - org.apache.rat diff --git a/fontbox/src/main/java/module-info.java b/fontbox/src/main/java/module-info.java new file mode 100644 index 00000000000..62c4353d659 --- /dev/null +++ b/fontbox/src/main/java/module-info.java @@ -0,0 +1,19 @@ +module org.apache.fontbox { + requires java.desktop; + requires org.apache.logging.log4j; + requires org.apache.pdfbox.io; + exports org.apache.fontbox; + exports org.apache.fontbox.afm; + exports org.apache.fontbox.cff; + exports org.apache.fontbox.cmap; + exports org.apache.fontbox.encoding; + exports org.apache.fontbox.pfb; + exports org.apache.fontbox.ttf; + exports org.apache.fontbox.ttf.gsub; + exports org.apache.fontbox.ttf.model; + exports org.apache.fontbox.ttf.table.common; + exports org.apache.fontbox.ttf.table.gsub; + exports org.apache.fontbox.type1; + exports org.apache.fontbox.util; + exports org.apache.fontbox.util.autodetect; +} \ No newline at end of file diff --git a/io/pom.xml b/io/pom.xml index 3b365353955..1ab89fca273 100644 --- a/io/pom.xml +++ b/io/pom.xml @@ -63,11 +63,6 @@ org.apache.felix maven-bundle-plugin true - - - org.apache.pdfbox.io - - org.apache.rat diff --git a/io/src/main/java/module-info.java b/io/src/main/java/module-info.java new file mode 100644 index 00000000000..030dd3b5814 --- /dev/null +++ b/io/src/main/java/module-info.java @@ -0,0 +1,4 @@ +module org.apache.pdfbox.io { + requires org.apache.logging.log4j; + exports org.apache.pdfbox.io; +} \ No newline at end of file diff --git a/pdfbox/pom.xml b/pdfbox/pom.xml index 6ddcaedc32e..60d63cfc127 100644 --- a/pdfbox/pom.xml +++ b/pdfbox/pom.xml @@ -158,7 +158,6 @@ META-INF=target/maven-shared-archive-resources/META-INF, org/apache/pdfbox/resources=target/classes/org/apache/pdfbox/resources - org.apache.pdfbox diff --git a/pdfbox/src/main/java/module-info.java b/pdfbox/src/main/java/module-info.java new file mode 100644 index 00000000000..42d6c2ceebb --- /dev/null +++ b/pdfbox/src/main/java/module-info.java @@ -0,0 +1,65 @@ +module org.apache.pdfbox { + requires java.desktop; + requires org.apache.logging.log4j; + requires org.apache.pdfbox.io; + requires org.apache.fontbox; + requires org.bouncycastle.provider; + requires org.bouncycastle.util; + requires org.bouncycastle.pkix; + + exports org.apache.pdfbox; + exports org.apache.pdfbox.contentstream; + exports org.apache.pdfbox.contentstream.operator; + exports org.apache.pdfbox.contentstream.operator.color; + exports org.apache.pdfbox.contentstream.operator.graphics; + exports org.apache.pdfbox.contentstream.operator.markedcontent; + exports org.apache.pdfbox.contentstream.operator.state; + exports org.apache.pdfbox.contentstream.operator.text; + exports org.apache.pdfbox.cos; + exports org.apache.pdfbox.filter; + exports org.apache.pdfbox.multipdf; + exports org.apache.pdfbox.pdfparser; + exports org.apache.pdfbox.pdfparser.xref; + exports org.apache.pdfbox.pdfwriter; + exports org.apache.pdfbox.pdfwriter.compress; + exports org.apache.pdfbox.pdmodel; + exports org.apache.pdfbox.pdmodel.common; + exports org.apache.pdfbox.pdmodel.common.filespecification; + exports org.apache.pdfbox.pdmodel.common.function; + exports org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure; + exports org.apache.pdfbox.pdmodel.documentinterchange.markedcontent; + exports org.apache.pdfbox.pdmodel.documentinterchange.prepress; + exports org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf; + exports org.apache.pdfbox.pdmodel.encryption; + exports org.apache.pdfbox.pdmodel.fdf; + exports org.apache.pdfbox.pdmodel.fixup; + exports org.apache.pdfbox.pdmodel.fixup.processor; + exports org.apache.pdfbox.pdmodel.font; + exports org.apache.pdfbox.pdmodel.font.encoding; + exports org.apache.pdfbox.pdmodel.graphics; + exports org.apache.pdfbox.pdmodel.graphics.blend; + exports org.apache.pdfbox.pdmodel.graphics.color; + exports org.apache.pdfbox.pdmodel.graphics.form; + exports org.apache.pdfbox.pdmodel.graphics.image; + exports org.apache.pdfbox.pdmodel.graphics.optionalcontent; + exports org.apache.pdfbox.pdmodel.graphics.pattern; + exports org.apache.pdfbox.pdmodel.graphics.shading; + exports org.apache.pdfbox.pdmodel.graphics.state; + exports org.apache.pdfbox.pdmodel.interactive; + exports org.apache.pdfbox.pdmodel.interactive.action; + exports org.apache.pdfbox.pdmodel.interactive.annotation; + exports org.apache.pdfbox.pdmodel.interactive.annotation.handlers; + exports org.apache.pdfbox.pdmodel.interactive.digitalsignature; + exports org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible; + exports org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination; + exports org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline; + exports org.apache.pdfbox.pdmodel.interactive.form; + exports org.apache.pdfbox.pdmodel.interactive.measurement; + exports org.apache.pdfbox.pdmodel.interactive.pagenavigation; + exports org.apache.pdfbox.pdmodel.interactive.viewerpreferences; + exports org.apache.pdfbox.printing; + exports org.apache.pdfbox.rendering; + exports org.apache.pdfbox.text; + exports org.apache.pdfbox.util; + exports org.apache.pdfbox.util.filetypedetector; +} \ No newline at end of file diff --git a/tools/pom.xml b/tools/pom.xml index 22bd59a7f66..15d5aac19f9 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -92,17 +92,6 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - - org.apache.pdfbox.tools - - - - diff --git a/tools/src/main/java/module-info.java b/tools/src/main/java/module-info.java new file mode 100644 index 00000000000..e8155719218 --- /dev/null +++ b/tools/src/main/java/module-info.java @@ -0,0 +1,13 @@ +module org.apache.pdfbox.tools { + requires java.desktop; + requires org.apache.logging.log4j; + requires info.picocli; + requires org.apache.commons.io; + requires org.apache.pdfbox.io; + requires org.apache.pdfbox; + requires org.apache.pdfbox.debugger; + requires org.apache.fontbox; + + exports org.apache.pdfbox.tools; + exports org.apache.pdfbox.tools.imageio; +} \ No newline at end of file diff --git a/xmpbox/pom.xml b/xmpbox/pom.xml index 38c9703362b..1fdb793cb75 100644 --- a/xmpbox/pom.xml +++ b/xmpbox/pom.xml @@ -55,11 +55,6 @@ org.apache.felix maven-bundle-plugin true - - - org.apache.xmpbox - - org.apache.maven.plugins diff --git a/xmpbox/src/main/java/module-info.java b/xmpbox/src/main/java/module-info.java new file mode 100644 index 00000000000..4f7fb181d0e --- /dev/null +++ b/xmpbox/src/main/java/module-info.java @@ -0,0 +1,8 @@ +module org.apache.xmpbox { + requires java.xml; + + exports org.apache.xmpbox; + exports org.apache.xmpbox.schema; + exports org.apache.xmpbox.type; + exports org.apache.xmpbox.xml; +} \ No newline at end of file