Skip to content

Commit 4b436b7

Browse files
authored
Fix #153: use module-info.java directly (#154)
1 parent ab2161e commit 4b436b7

File tree

7 files changed

+35
-24
lines changed

7 files changed

+35
-24
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ on:
1616
- "release-notes/*"
1717
env:
1818
JODA_DEFAULT: '2.12.7'
19-
JODA_MIN: '2.9'
20-
JODA_MAX: '2.12.7'
19+
JODA_MIN: '2.10'
20+
JODA_MAX: '2.13.0'
2121
jobs:
2222
build:
2323
runs-on: 'ubuntu-22.04'

.mvn/wrapper/maven-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
18-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To use module on Maven-based projects, use following dependency:
3030
<dependency>
3131
<groupId>com.fasterxml.jackson.datatype</groupId>
3232
<artifactId>jackson-datatype-joda</artifactId>
33-
<version>2.17.1</version>
33+
<version>3.0.0-SNAPSHOT</version>
3434
</dependency>
3535
```
3636

@@ -79,7 +79,7 @@ Assert.assertEquals(INPUT_JSON, json);
7979

8080
## Compatibility
8181

82-
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.
82+
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.
8383
This means that it is possible to use with older version by using Maven dependency override.
8484

8585
## More

pom.xml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Joda (https://www.joda.org/joda-time/) data types.
4242
Jackson 2.10: Joda 2.9[.9]
4343
Jackson 2.12: Joda 2.10[.8]
4444
...
45-
Jackson 3.0: Joda 2.12.7
46-
-->
45+
Jackson 3.0: Joda 2.12.7
46+
-->
4747
<version.joda>2.12.7</version.joda>
4848

4949
<!-- Configuration properties for the OSGi maven-bundle-plugin -->
@@ -110,13 +110,6 @@ Joda (https://www.joda.org/joda-time/) data types.
110110
</excludes>
111111
</configuration>
112112
</plugin>
113-
<!-- 19-Mar-2019, tatu: Add rudimentary JDK9+ module info. To build with JDK 8
114-
will have to use `moduleInfoFile` as anything else requires JDK 9+
115-
-->
116-
<plugin>
117-
<groupId>org.moditect</groupId>
118-
<artifactId>moditect-maven-plugin</artifactId>
119-
</plugin>
120113
<plugin>
121114
<groupId>de.jjohannes</groupId>
122115
<artifactId>gradle-module-metadata-maven-plugin</artifactId>

release-notes/VERSION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Major version: 3 (for earlier, see VERSION-2.x)
88
3.0.0 (not yet released)
99

1010
#130: Remove support of `org.joda.time.DateMidnight` from Jackson 3.x
11+
#153: Change 3.0 to use `module-info.java` directly [JSTEP-11]
1112
* Rename "com.fasterxml.jackson" -> "tools.jackson"
12-
13-
- Minimum Java baseline: Java 17
13+
- Minimum Java baseline: Java 17
14+
- Minimum Joda version supported 2.10 (due to JPMS requirement)

src/moditect/module-info.java renamed to src/main/java/module-info.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
// Last changes:
2-
//
3-
// * 2020-11-25 change joda requires from "joda.time" to "org.joda.time"
4-
// (Joda 2.10 now has automatic module name)
5-
//
6-
module tools.jackson.datatype.joda {
1+
// Joda datatype module Main artifact Module descriptor
2+
module tools.jackson.datatype.joda
3+
{
74
requires com.fasterxml.jackson.annotation;
85
requires tools.jackson.core;
9-
requires tools.jackson.databind;
6+
requires transitive tools.jackson.databind;
107
requires org.joda.time;
118

129
exports tools.jackson.datatype.joda;

src/test/java/module-info.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Joda datatype module (unit) Test Module descriptor
2+
module tools.jackson.datatype.joda
3+
{
4+
// Since we are not split from Main artifact, will not
5+
// need to depend on Main artifact -- but need its dependencies
6+
7+
requires com.fasterxml.jackson.annotation;
8+
requires tools.jackson.core;
9+
requires tools.jackson.databind;
10+
requires org.joda.time;
11+
12+
// Additional test lib/framework dependencies
13+
requires junit; // JUnit 4
14+
15+
// Further, need to open up test packages for JUnit et al
16+
opens tools.jackson.datatype.joda;
17+
opens tools.jackson.datatype.joda.deser;
18+
opens tools.jackson.datatype.joda.failing;
19+
opens tools.jackson.datatype.joda.ser;
20+
}

0 commit comments

Comments
 (0)