Migrate build to Maven/Java 25, upgrade JOGL 2.6, Jackson 2.x, JUnit 5#287
Open
BadRumplestiltskin wants to merge 4 commits intoNASAWorldWind:developfrom
Open
Migrate build to Maven/Java 25, upgrade JOGL 2.6, Jackson 2.x, JUnit 5#287BadRumplestiltskin wants to merge 4 commits intoNASAWorldWind:developfrom
BadRumplestiltskin wants to merge 4 commits intoNASAWorldWind:developfrom
Conversation
Version 2.2.1 Release Changes
Comprehensive Java 25 migration and tech-debt reduction across the full project. All changes verified via `mvn compile` and `mvn test-compile` with zero errors. - Add pom.xml: Maven 3 build replacing Ant; Java 25 compiler release; maven-surefire-plugin 3.5.2, exec-maven-plugin 3.4.1, build-helper-maven-plugin 3.6.0, maven-jar-plugin 3.4.2 - Add rasterize-milstd2525 Maven profile (antrun + batik-all:1.17) replacing the bundled Batik 1.7 JARs - Update run-demo.bash / run-demo.bat to launch via `mvn exec:exec` - Add .github/workflows/ci.yml: Temurin 25, `mvn compile` + `xvfb-run mvn test`, Surefire report upload on failure - Add .github/workflows/release.yml: tag-triggered; builds JAR + Javadoc zip; publishes via softprops/action-gh-release@v2 - Archive .travis.yml → .travis.yml.archived - Remove 8 bundled JOGL 2.4-rc / GlueGen JARs (total ~4.4 MB) - JOGL 2.6.0 and GlueGen 2.6.0 now resolved via Maven Central; required --add-opens flags declared in pom.xml surefire/exec config - Replace OS-specific reflection branches (com.apple.eio.FileManager, Runtime.exec) with java.awt.Desktop.browse() - Replace removed sun.arch.data.model property with os.arch checks (x86, i386, i686) for 32-bit architecture detection - Remove 75 vendored Jackson 1.x source files under src/org/codehaus/ - Add com.fasterxml.jackson.core:jackson-core:2.18.2 Maven dependency - Migrate 5 WWJ source files: org.codehaus.jackson.* → com.fasterxml.jackson.core.*; factory.createJsonParser() → factory.createParser(); parser.getCurrentName() → parser.currentName() - Update LICENSE.jackson.txt to reference FasterXML 2.18.2 - Remove lib-external/batik/ (Batik 1.7+r608262 + Ant 1.6.5, ~7.7 MB) - SVG→PNG rasterisation now runs via the new rasterize-milstd2525 Maven profile at release time (no compile-time dependency) - Replace junit:junit:4.13.2 with org.junit.jupiter:junit-jupiter:5.11.4 (aggregator: API + engine + params; Surefire 3.5.2 auto-discovers) - Migrate all 49 test files: · @RunWith(JUnit4.class) removed (47 files) · @RunWith(Parameterized.class) → @ParameterizedTest @MethodSource (KMLExportTest, ShapeAttributesTest — constructors removed, data() returns Stream<List<Exportable>> / Stream<Arguments>) · @Before/@after → @BeforeEach/@AfterEach (8 files) · @ignore → @disabled (4 files) · @test(expected=…) → assertThrows() (KMLExportTest) · All org.junit.Assert/org.junit.* imports → org.junit.jupiter.api.* · 1,688 assert argument-order fixes (JUnit 4 message-first → JUnit 5 message-last) across 35 files · Private assertEquals(Iterable<T>…) helpers renamed assertIterablesEqual in 3 layer test files to prevent name-shadowing - Add MIGRATION_JAVA25.md: complete migration guide + tech-debt register (TD-01 through TD-11) with priority scores and completion status Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CI/CD (ci.yml, release.yml): - Remove redundant single-entry matrix in ci.yml; use literal '25' throughout - Collapse three separate Maven invocations in release.yml (test → package → javadoc) into one: `mvn verify javadoc:javadoc`, eliminating two full compile cycles and two JVM startups Test quality (KMLExportTest, ShapeAttributesTest, layer tests): - KMLExportTest: extract attribute setup into @BeforeAll so data() is a pure data provider with no setup side-effects; remove @SuppressWarnings("unused") - ShapeAttributesTest.testRestoreNullDocument: replace broken try/catch/fail with assertThrows(IllegalArgumentException.class, ...) - AnnotationLayerTest, IconLayerTest, RenderableLayerTest: replace 14 try/catch/fail patterns with assertThrows; replace `e.printStackTrace()` in malicious-getter tests with `ignored` + explanatory comment Source modernisation (ZebraInputHandler, AbstractSceneController): - Add missing @OverRide annotations; convert iterator while-loop to enhanced for-each; use diamond operator on generic constructors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d5506cf to
1af7154
Compare
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
This PR modernises the WorldWind Java build infrastructure and runtime dependencies to support Java 25, replacing the legacy Ant build and vendored libraries with a clean Maven build.
What changed
Build system
build.xmlwithpom.xml(Maven 3.x, Java 25 release flag)src/,test/) via<sourceDirectory>/<testSourceDirectory>src/included in the output JAR automaticallytestFunctional/added as a second test-source root (compiled but excluded from Surefire)rasterize-milstd2525Maven profile (replaces Batik 1.7 Ant target; now uses Batik 1.17 viamaven-antrun-plugin)JOGL / GlueGen — 2.4.0-rc → 2.6.0
org.jogamp.jogl:jogl-all,org.jogamp.gluegen:gluegen-rt)--add-opensflags required by JOGL on Java 17+ added tomaven-surefire-pluginandexec-maven-pluginJackson — vendored 1.x source → 2.18.2
src/org/codehaus/jackson/(vendored Jackson 1.x, ca. 2009)com.fasterxml.jackson.core:jackson-core:2.18.2dependencyBasicJSONEventParserContextandJSONDoc:getCurrentName()→currentName(),createJsonParser()→createParser()JUnit 4 → JUnit 5 (Jupiter 5.11.4)
@RunWith(Parameterized.class)+ constructor pattern replaced with@ParameterizedTest @MethodSourceinKMLExportTestandShapeAttributesTestassertEqualshelpers in layer tests renamed toassertIterablesEqualto avoid shadowing the static importmaven-surefire-plugin3.5.2 auto-discovers Jupiter tests; no explicit@RunWithneededCI/CD
.github/workflows/ci.yml— push/PR builds on Java 25 with Xvfb for JOGL headless display.github/workflows/release.yml— tag-triggered release: compile → test → package → Javadoc → GitHub ReleaseTest quality (simplify pass)
KMLExportTest: attribute setup moved to@BeforeAll;data()is now a pure data providerShapeAttributesTest.testRestoreNullDocument:try/catch/fail→assertThrowstry/catch/failpatterns →assertThrows; malicious-gettere.printStackTrace()→ignoredwith commentZebraInputHandler: added missing@Overrides, iterator → enhanced for-eachAbstractSceneController: diamond operator on two generic constructorsTest plan
mvn compilesucceeds on Java 25mvn testpasses all 49 migrated test files (headless; run withxvfb-runon Linux)mvn -Prasterize-milstd2525 generate-resourcesproduces PNG files intarget/milstd2525/png/mvn exec:exec -Dexec.mainClass=gov.nasa.worldwindx.examples.ApplicationTemplatelaunches the globeNotes
system-scope dependencies (TODO §10 in MIGRATION_JAVA25.md — needs native library rebuild against Java 25)🤖 Generated with Claude Code