From a4651149d771206f1e764d7cda4394f4dd666bc7 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Tue, 14 Jan 2025 20:50:22 -0800 Subject: [PATCH] Convert Protobuf module-info too, remove shading. --- protobuf/pom.xml | 44 ------------------------- protobuf/src/main/java/module-info.java | 6 +++- protobuf/src/test/java/module-info.java | 24 ++++++++++++++ release-notes/VERSION | 1 + 4 files changed, 30 insertions(+), 45 deletions(-) create mode 100644 protobuf/src/test/java/module-info.java diff --git a/protobuf/pom.xml b/protobuf/pom.xml index a9c1e86ae..ba8063bdb 100644 --- a/protobuf/pom.xml +++ b/protobuf/pom.xml @@ -50,13 +50,6 @@ abstractions. tools.jackson.core jackson-databind - - - - com.fasterxml.jackson.core - jackson-annotations - provided - @@ -73,43 +66,6 @@ abstractions. - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - - - - - null:null - - - - - com.squareup - tools.jackson.dataformat.protobuf.protoparser - - - - - - - - - org.moditect - moditect-maven-plugin - diff --git a/protobuf/src/main/java/module-info.java b/protobuf/src/main/java/module-info.java index a1148c5bd..9a58276c0 100644 --- a/protobuf/src/main/java/module-info.java +++ b/protobuf/src/main/java/module-info.java @@ -1,7 +1,11 @@ -module tools.jackson.dataformat.protobuf { +// Protobuf Main artifact Module descriptor +module tools.jackson.dataformat.protobuf +{ requires tools.jackson.core; requires tools.jackson.databind; + requires protoparser; + exports tools.jackson.dataformat.protobuf; // No, should not expose shaded // exports tools.jackson.dataformat.protobuf.protoparser.protoparser; diff --git a/protobuf/src/test/java/module-info.java b/protobuf/src/test/java/module-info.java new file mode 100644 index 000000000..da0366bdc --- /dev/null +++ b/protobuf/src/test/java/module-info.java @@ -0,0 +1,24 @@ +// Protobuf unit test Module descriptor +module tools.jackson.dataformat.protobuf +{ + // Since we are not split from Main artifact, will not + // need to depend on Main artifact -- but need its dependencies + + requires tools.jackson.core; + requires tools.jackson.databind; + + requires protoparser; + + // Additional test lib/framework dependencies + requires org.junit.jupiter.api; + requires org.junit.jupiter.params; + + // Further, need to open up some packages for JUnit et al + opens tools.jackson.dataformat.protobuf; + opens tools.jackson.dataformat.protobuf.dos; + opens tools.jackson.dataformat.protobuf.fuzz; + opens tools.jackson.dataformat.protobuf.schema; + opens tools.jackson.dataformat.protobuf.testutil; + opens tools.jackson.dataformat.protobuf.testutil.failure; + opens tools.jackson.dataformat.protobuf.tofix; +} diff --git a/release-notes/VERSION b/release-notes/VERSION index 7915d647c..6abf17077 100644 --- a/release-notes/VERSION +++ b/release-notes/VERSION @@ -31,3 +31,4 @@ implementations) by default (3.0) #557: Change 3.0 to use `module-info.java` directly [JSTEP-11] - Minimum Java baseline: Java 17 +- (protobuf) Remove shading of `protoparser` dependency