Skip to content

Commit

Permalink
Convert Protobuf module-info too, remove shading.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 15, 2025
1 parent 133eeeb commit a465114
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 45 deletions.
44 changes: 0 additions & 44 deletions protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ abstractions.
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<!-- and for testing, JUnit is needed; as well as annotations -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -73,43 +66,6 @@ abstractions.
</executions>
</plugin>

<plugin>
<!-- We will shade proto-parser, to simplify deployment, avoid version conflicts -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<!-- the bundle plugin already did the pulling-in, all we need is the renaming! -->
<!--
<include>com.squareup:protoparser</include>
-->
<include>null:null</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.squareup</pattern>
<shadedPattern>tools.jackson.dataformat.protobuf.protoparser</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<!-- 19-Mar-2019, tatu: Add rudimentary JDK9+ module info. To build with JDK 8
will have to use `moduleInfoFile` as anything else requires JDK 9+
-->
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
6 changes: 5 additions & 1 deletion protobuf/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
24 changes: 24 additions & 0 deletions protobuf/src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -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;
}
1 change: 1 addition & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a465114

Please sign in to comment.