Repository navigation
build: Java 17 variant of common, spec and sdk for 2.0.7 (2.0.7-a8c.1) - #119
Draft
joaopamaral wants to merge 3 commits into
Draft
joaopamaral wants to merge 3 commits into
joaopamaral wants to merge 3 commits into
Conversation
Two unrelated blockers prevented the SDK module from being usable on
Java 17 against the 1.12.6-release tag:
1. JUnit / Surefire version mismatch — sdk pom pinned junit
5.9.3 / junit-platform 1.9.3 locally, while parent (and the
maven-surefire-plugin shipped launcher) expected 5.11.4 / 1.11.4.
Test discovery failed with:
JUnitException: ... resolution failed:
'boolean ReflectionUtils.returnsVoid(java.lang.reflect.Method)'
because returnsVoid was added in junit-platform-commons 1.10+.
Bump sdk pom to junit 5.11.4 / platform 1.11.4 to align with parent
and the running surefire plugin.
2. Java 21-only API in test code — DomainMockTest.testRetrieveDomainWithChildren
used List#getFirst() (added in JDK 21 via SequencedCollection).
That blocked test compilation on Java 17 even with -release=17.
Replace with get(0).
After both fixes: 195/195 tests pass on Java 17 with
-Dmaven.compiler.release=17 (and continue to pass on Java 21).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 563a999)
(cherry picked from commit 585dbf0)
The stock 2.0.7 common and openmetadata-spec jars are compiled for Java 21 (class file 65), so a Java 17 consumer cannot use them even with a Java 17 SDK. Build the whole chain (common, spec, sdk) for Java 17 under one version so the published SDK POM references the matching spec/common artifacts. ArrayAlignment used List.reversed() (Java 21 SequencedCollection); replaced with Collections.reverse(). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Build branch for the Java 17 variant of the OpenMetadata 2.0.7 Java artifacts (
common,openmetadata-spec,openmetadata-sdk), for consumers that still compile and run on JDK 17. No functional change.Stock 2.0.7
openmetadata-specandcommonare compiled for Java 21 (class file 65), unlike 1.12.x where the spec was Java 17. A Java 17 SDK alone is therefore no longer enough: javac 17 rejects the spec classes (class file has wrong version 65.0, should be 61.0). This branch builds the whole chain for Java 17 under one version so the SDK POM references a matching spec and common.Commits
build(sdk): target Java 17andfix: make openmetadata-sdk tests pass on Java 17(carried from the 1.12 branch).build: version 2.0.7-a8c.1 and compile common/spec for Java 17:mvn versions:set -DnewVersion=2.0.7-a8c.1, root and specmaven-compiler-pluginsource/target 17, andArrayAlignment.collectRunusesCollections.reverseinstead ofList.reversed()(Java 21SequencedCollection).Build
Publish the three JARs with their POMs plus the parent
platformPOM (packagingpom), since every module POM referencesorg.open-metadata:platform:2.0.7-a8c.1.Test plan
common,openmetadata-spec,openmetadata-sdkbuild on Temurin 17.0.14; all class files are version 61