From 8275f8d7fb9ba044bccc4c0e798e827e9ebc2759 Mon Sep 17 00:00:00 2001 From: Tilman Holube Date: Fri, 4 Apr 2025 10:27:43 +0200 Subject: [PATCH 1/4] Build as multi release jar - make jakarta and javax annotation modules optional at runtime - update GitHub Action to JDK 11 - added module info in java9 source folder - added executions for java 8 and 9 - removed automatic module - added multi release entry to manifest --- .github/workflows/maven_release.yml | 10 ++++----- pom.xml | 32 ++++++++++++++++++++++++----- src/main/java9/module-info.java | 7 +++++++ 3 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 src/main/java9/module-info.java diff --git a/.github/workflows/maven_release.yml b/.github/workflows/maven_release.yml index 2195f52..82d40e0 100644 --- a/.github/workflows/maven_release.yml +++ b/.github/workflows/maven_release.yml @@ -15,10 +15,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: 8 + java-version: 11 distribution: 'temurin' - name: Cache Maven packages uses: actions/cache@v3 @@ -37,10 +37,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: 8 + java-version: 11 distribution: 'temurin' - name: Cache Maven packages uses: actions/cache@v3 @@ -74,7 +74,7 @@ jobs: - name: Set up Maven Central Repository uses: actions/setup-java@v3 with: - java-version: 8 + java-version: 11 distribution: 'temurin' server-id: central server-username: MAVEN_USERNAME diff --git a/pom.xml b/pom.xml index d9ca645..0dce1a9 100644 --- a/pom.xml +++ b/pom.xml @@ -81,10 +81,32 @@ maven-compiler-plugin 3.14.0 - - 1.8 - 1.8 - + + + compile-java-8 + + compile + + + 1.8 + 1.8 + + + + compile-java-9 + compile + + compile + + + 9 + + ${project.basedir}/src/main/java9 + + true + + + org.apache.maven.plugins @@ -93,7 +115,7 @@ - org.openapitools.jackson.nullable + true diff --git a/src/main/java9/module-info.java b/src/main/java9/module-info.java new file mode 100644 index 0000000..5a66c27 --- /dev/null +++ b/src/main/java9/module-info.java @@ -0,0 +1,7 @@ +module org.openapitools.jackson.nullable { + requires com.fasterxml.jackson.databind; + requires static jakarta.validation; + requires static java.validation; + + exports org.openapitools.jackson.nullable; +} From 124ee512e434439ae75c08f611891150ec0703c5 Mon Sep 17 00:00:00 2001 From: Tilman Holube Date: Tue, 23 Sep 2025 19:07:38 +0200 Subject: [PATCH 2/4] Update Java Version in maven test Action --- .github/workflows/maven_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven_test.yml b/.github/workflows/maven_test.yml index b88dbbc..efd08e8 100644 --- a/.github/workflows/maven_test.yml +++ b/.github/workflows/maven_test.yml @@ -13,10 +13,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: 8 + java-version: 11 distribution: 'temurin' - name: Cache Maven packages uses: actions/cache@v3 From 1524d095ffc20343dcffec731474aa4c4330e581 Mon Sep 17 00:00:00 2001 From: Tilman Holube Date: Tue, 23 Sep 2025 19:07:50 +0200 Subject: [PATCH 3/4] Add service providers to module info --- src/main/java9/module-info.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java9/module-info.java b/src/main/java9/module-info.java index 5a66c27..33b04dc 100644 --- a/src/main/java9/module-info.java +++ b/src/main/java9/module-info.java @@ -4,4 +4,8 @@ requires static java.validation; exports org.openapitools.jackson.nullable; + + provides com.fasterxml.jackson.databind.Module with org.openapitools.jackson.nullable.JsonNullableModule; + provides javax.validation.valueextraction.ValueExtractor with org.openapitools.jackson.nullable.JsonNullableValueExtractor; + provides jakarta.validation.valueextraction.ValueExtractor with org.openapitools.jackson.nullable.JsonNullableJakartaValueExtractor; } From ffc42f8278e53192fb6b002b00c7016b1175bb19 Mon Sep 17 00:00:00 2001 From: Tilman Holube Date: Wed, 24 Sep 2025 10:43:23 +0200 Subject: [PATCH 4/4] Use release instead of source and target --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index efe0135..745b826 100644 --- a/pom.xml +++ b/pom.xml @@ -88,8 +88,7 @@ compile - 1.8 - 1.8 + 8