Skip to content

Commit

Permalink
Convert XML and YAML modules; almost working
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 23, 2025
1 parent d89ceb7 commit 89e71e4
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 82 deletions.
13 changes: 1 addition & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,22 +173,11 @@ https://stackoverflow.com/questions/44088493/jersey-stopped-working-with-injecti
</executions>
</plugin>

<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<!-- 20-Feb-2021, tatu: For Jackson 2.x, put `module-info.class` under location
since otherwise it seems "module-info.class" will be missing from "-jakarta" variant?
-->
<configuration>
<jvmVersion>11</jvmVersion>
</configuration>
</plugin>

</plugins>
</pluginManagement>

<!-- 05-Jul-2020, tatu: Add generation of Gradle Module Metadata -->
<plugins>
<!-- 05-Jul-2020, tatu: Add generation of Gradle Module Metadata -->
<plugin>
<groupId>de.jjohannes</groupId>
<artifactId>gradle-module-metadata-maven-plugin</artifactId>
Expand Down
7 changes: 1 addition & 6 deletions xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</parent>
<artifactId>jackson-jaxrs-xml-provider</artifactId>
<name>Jackson-JAXRS: XML</name>
<packaging>bundle</packaging>
<packaging>jar</packaging>
<description>Functionality to handle XML input/output for JAX-RS implementations (like Jersey and RESTeasy) using standard Jackson data binding.
</description>

Expand Down Expand Up @@ -109,11 +109,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>

</plugins>
</build>
</project>
21 changes: 21 additions & 0 deletions xml/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// JAX-RS XML module-info for Main artifact
module tools.jackson.jaxrs.xml
{
requires tools.jackson.core;
requires transitive tools.jackson.databind;
requires tools.jackson.dataformat.xml;
requires tools.jackson.module.jaxb;

requires tools.jackson.jaxrs.base;

requires java.ws.rs;

exports tools.jackson.jaxrs.xml;
// [jaxrs-providers#119]: CXF, RESTEasy, OpenAPI require reflective access
opens tools.jackson.jaxrs.xml;

provides javax.ws.rs.ext.MessageBodyReader with
tools.jackson.jaxrs.xml.JacksonXMLProvider;
provides javax.ws.rs.ext.MessageBodyWriter with
tools.jackson.jaxrs.xml.JacksonXMLProvider;
}
29 changes: 0 additions & 29 deletions xml/src/moditect/module-info.java

This file was deleted.

24 changes: 24 additions & 0 deletions xml/src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// JAX-RS XML module-info for (unit) Tests
module tools.jackson.jaxrs.xml
{
// 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 tools.jackson.dataformat.xml;
requires tools.jackson.module.jaxb;

requires tools.jackson.jaxrs.base;

requires java.ws.rs;

// Additional test lib/framework dependencies
requires junit; // JUnit 4

// Further, need to open up test packages for JUnit et al

opens tools.jackson.jaxrs.xml;
opens tools.jackson.jaxrs.xml.dw;
opens tools.jackson.jaxrs.xml.jersey;
}
7 changes: 1 addition & 6 deletions yaml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</parent>
<artifactId>jackson-jaxrs-yaml-provider</artifactId>
<name>Jackson-JAXRS: YAML</name>
<packaging>bundle</packaging>
<packaging>jar</packaging>
<description>Functionality to handle YAML input/output for JAX-RS implementations (like Jersey and RESTeasy)
using standard Jackson data binding.
</description>
Expand Down Expand Up @@ -102,11 +102,6 @@ using standard Jackson data binding.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>

</plugins>
</build>
</project>
21 changes: 21 additions & 0 deletions yaml/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// JAX-RS YAML module-info for Main artifact
module tools.jackson.jaxrs.yaml
{
requires tools.jackson.core;
requires transitive tools.jackson.databind;
requires tools.jackson.dataformat.yaml;
requires tools.jackson.module.jaxb;

requires tools.jackson.jaxrs.base;

requires java.ws.rs;

exports tools.jackson.jaxrs.yaml;
// [jaxrs-providers#119]: CXF, RESTEasy, OpenAPI require reflective access
opens tools.jackson.jaxrs.yaml;

provides javax.ws.rs.ext.MessageBodyReader with
tools.jackson.jaxrs.yaml.JacksonYAMLProvider;
provides javax.ws.rs.ext.MessageBodyWriter with
tools.jackson.jaxrs.yaml.JacksonYAMLProvider;
}
29 changes: 0 additions & 29 deletions yaml/src/moditect/module-info.java

This file was deleted.

29 changes: 29 additions & 0 deletions yaml/src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// JAX-RS YAML module-info for (unit) Tests
module tools.jackson.jaxrs.yaml
{
// 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 tools.jackson.dataformat.yaml;
requires tools.jackson.module.jaxb;

requires tools.jackson.jaxrs.base;

requires java.ws.rs;

// Additional test lib/framework dependencies
requires junit; // JUnit 4

// Other test deps: we test format-negotiation

requires tools.jackson.jaxrs.json;
requires tools.jackson.jaxrs.smile;

// Further, need to open up test packages for JUnit et al

opens tools.jackson.jaxrs.yaml;
opens tools.jackson.jaxrs.yaml.dw;
opens tools.jackson.jaxrs.yaml.jersey;
}

0 comments on commit 89e71e4

Please sign in to comment.