Skip to content

Commit

Permalink
Fix #153: use module-info.java directly (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder authored Jan 19, 2025
1 parent ab2161e commit 4b436b7
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ on:
- "release-notes/*"
env:
JODA_DEFAULT: '2.12.7'
JODA_MIN: '2.9'
JODA_MAX: '2.12.7'
JODA_MIN: '2.10'
JODA_MAX: '2.13.0'
jobs:
build:
runs-on: 'ubuntu-22.04'
Expand Down
4 changes: 2 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To use module on Maven-based projects, use following dependency:
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.17.1</version>
<version>3.0.0-SNAPSHOT</version>
</dependency>
```

Expand Down Expand Up @@ -79,7 +79,7 @@ Assert.assertEquals(INPUT_JSON, json);

## Compatibility

Module works with Joda version 2.9 and higher (CI tests compatibility since module version 2.14), even if it declares dependency to a newer version.
Module works with Joda version 2.10 (as of Jackson 3.0) and higher (CI tests compatibility since module version 2.14), even if it declares dependency to a newer version.
This means that it is possible to use with older version by using Maven dependency override.

## More
Expand Down
11 changes: 2 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Joda (https://www.joda.org/joda-time/) data types.
Jackson 2.10: Joda 2.9[.9]
Jackson 2.12: Joda 2.10[.8]
...
Jackson 3.0: Joda 2.12.7
-->
Jackson 3.0: Joda 2.12.7
-->
<version.joda>2.12.7</version.joda>

<!-- Configuration properties for the OSGi maven-bundle-plugin -->
Expand Down Expand Up @@ -110,13 +110,6 @@ Joda (https://www.joda.org/joda-time/) data types.
</excludes>
</configuration>
</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>
<plugin>
<groupId>de.jjohannes</groupId>
<artifactId>gradle-module-metadata-maven-plugin</artifactId>
Expand Down
5 changes: 3 additions & 2 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Major version: 3 (for earlier, see VERSION-2.x)
3.0.0 (not yet released)

#130: Remove support of `org.joda.time.DateMidnight` from Jackson 3.x
#153: Change 3.0 to use `module-info.java` directly [JSTEP-11]
* Rename "com.fasterxml.jackson" -> "tools.jackson"

- Minimum Java baseline: Java 17
- Minimum Java baseline: Java 17
- Minimum Joda version supported 2.10 (due to JPMS requirement)
11 changes: 4 additions & 7 deletions src/moditect/module-info.java → src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Last changes:
//
// * 2020-11-25 change joda requires from "joda.time" to "org.joda.time"
// (Joda 2.10 now has automatic module name)
//
module tools.jackson.datatype.joda {
// Joda datatype module Main artifact Module descriptor
module tools.jackson.datatype.joda
{
requires com.fasterxml.jackson.annotation;
requires tools.jackson.core;
requires tools.jackson.databind;
requires transitive tools.jackson.databind;
requires org.joda.time;

exports tools.jackson.datatype.joda;
Expand Down
20 changes: 20 additions & 0 deletions src/test/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Joda datatype module (unit) Test Module descriptor
module tools.jackson.datatype.joda
{
// Since we are not split from Main artifact, will not
// need to depend on Main artifact -- but need its dependencies

requires com.fasterxml.jackson.annotation;
requires tools.jackson.core;
requires tools.jackson.databind;
requires org.joda.time;

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

// Further, need to open up test packages for JUnit et al
opens tools.jackson.datatype.joda;
opens tools.jackson.datatype.joda.deser;
opens tools.jackson.datatype.joda.failing;
opens tools.jackson.datatype.joda.ser;
}

0 comments on commit 4b436b7

Please sign in to comment.