Skip to content

Commit

Permalink
Work on #701, try to use module-info.java natively
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 12, 2025
1 parent 3eca136 commit b22e37d
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 58 deletions.
25 changes: 18 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ alternative support for serializing POJOs as XML and deserializing XML as pojos.
<version>4.2.2</version>
<exclusions>
<exclusion>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -92,6 +92,22 @@ alternative support for serializing POJOs as XML and deserializing XML as pojos.
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- 11-Jan-2025, joohyukkim: JSTEP-10, part 1, migrate to JUnit5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>

<!-- Jakarta XMLBind (nee javax/jaxb( annotation introspector is needed BUT ONLY
for tests (starting 2.13: previously compile/runtime)
Expand Down Expand Up @@ -185,11 +201,6 @@ alternative support for serializing POJOs as XML and deserializing XML as pojos.
</includes>
</configuration>
</plugin>
<!-- 20-Mar-2019, tatu: use Moditect for JDK9+ module info inclusion -->
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
</plugin>
<!-- 05-Jul-2020, tatu: Add gradle module metadata -->
<plugin>
<groupId>de.jjohannes</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module tools.jackson.dataformat.xml {
// Jackson 3.x module-info for jackson-dataformat-xml Main artifact
module tools.jackson.dataformat.xml
{
requires java.xml;
requires org.codehaus.stax2;

Expand Down
30 changes: 30 additions & 0 deletions src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Jackson 3.x module-info for jackson-dataformat-xml Test artifact
module tools.jackson.dataformat.xml
{
// First, same requires as the main artifact

requires java.xml;
requires org.codehaus.stax2;

requires com.fasterxml.jackson.annotation;
requires tools.jackson.core;
requires tools.jackson.databind;

// Then test library dependencies
requires junit;
requires org.junit.jupiter.api;
requires org.junit.jupiter.params;

// Then exports same as main artifact

exports tools.jackson.dataformat.xml;
exports tools.jackson.dataformat.xml.annotation;
exports tools.jackson.dataformat.xml.deser;
exports tools.jackson.dataformat.xml.ser;
exports tools.jackson.dataformat.xml.util;

provides tools.jackson.core.TokenStreamFactory with
tools.jackson.dataformat.xml.XmlFactory;
provides tools.jackson.databind.ObjectMapper with
tools.jackson.dataformat.xml.XmlMapper;
}

This file was deleted.

0 comments on commit b22e37d

Please sign in to comment.