Skip to content

Commit 23b34ab

Browse files
warrenclaude
andcommitted
Migrate build to Maven, modernise Java APIs, upgrade to JUnit 5
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>
1 parent 2543c23 commit 23b34ab

181 files changed

Lines changed: 2809 additions & 24575 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
branches: [ master, develop ]
8+
9+
jobs:
10+
build:
11+
name: Build & Test (Java ${{ matrix.java }})
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
java: [ '25' ]
18+
19+
steps:
20+
- name: Check out source
21+
uses: actions/checkout@v4
22+
23+
- name: Set up JDK ${{ matrix.java }}
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: temurin
27+
java-version: ${{ matrix.java }}
28+
cache: maven
29+
30+
# JOGL opens a display connection during class initialisation even in
31+
# headless mode on some paths. xvfb provides a virtual framebuffer so
32+
# those code paths don't abort with "no display" errors on the runner.
33+
- name: Install Xvfb
34+
run: sudo apt-get install -y xvfb
35+
36+
- name: Compile
37+
run: mvn --batch-mode --no-transfer-progress compile
38+
39+
- name: Test
40+
# AWT headless is already set via maven-surefire-plugin in pom.xml;
41+
# xvfb-run provides a fallback display for any JOGL-initialising tests.
42+
run: xvfb-run --auto-servernum mvn --batch-mode --no-transfer-progress test
43+
44+
- name: Upload test reports on failure
45+
if: failure()
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: surefire-reports-java${{ matrix.java }}
49+
path: target/surefire-reports/
50+
retention-days: 7

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*' # e.g. v2.3.0
7+
8+
jobs:
9+
release:
10+
name: Build & publish release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # needed to create GitHub Release and upload assets
14+
15+
steps:
16+
- name: Check out source
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK 25
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: '25'
24+
cache: maven
25+
26+
- name: Install Xvfb
27+
run: sudo apt-get install -y xvfb
28+
29+
# Run the full test suite before publishing — refuse to release a broken build.
30+
- name: Test
31+
run: xvfb-run --auto-servernum mvn --batch-mode --no-transfer-progress test
32+
33+
# Package produces target/worldwind-java-<version>.jar
34+
- name: Package
35+
run: mvn --batch-mode --no-transfer-progress -DskipTests package
36+
37+
# Generate Javadoc into target/site/apidocs/
38+
- name: Javadoc
39+
run: mvn --batch-mode --no-transfer-progress -DskipTests javadoc:javadoc
40+
41+
# Zip the Javadoc tree so it can be attached as a single release asset.
42+
- name: Zip Javadoc
43+
run: |
44+
VERSION="${GITHUB_REF_NAME#v}"
45+
cd target/site
46+
zip -r "../../worldwind-java-${VERSION}-javadoc.zip" apidocs/
47+
echo "RELEASE_VERSION=${VERSION}" >> "$GITHUB_ENV"
48+
49+
- name: Create GitHub Release
50+
uses: softprops/action-gh-release@v2
51+
with:
52+
name: "WorldWind Java ${{ env.RELEASE_VERSION }}"
53+
body: |
54+
See [RELEASE_NOTES.txt](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/RELEASE_NOTES.txt) for details.
55+
files: |
56+
target/worldwind-java-${{ env.RELEASE_VERSION }}.jar
57+
worldwind-java-${{ env.RELEASE_VERSION }}-javadoc.zip
58+
draft: false
59+
prerelease: false
File renamed without changes.

LICENSE.jackson.txt

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
1-
This copy of Jackson JSON processor is licensed under the
2-
Apache (Software) License, version 2.0 ("the License").
3-
See the License for details about distribution rights, and the
4-
specific rights regarding derivate works.
1+
Jackson Core 2.18.2
2+
-------------------
3+
Jackson is a high-performance JSON processor for Java.
54

6-
You may obtain a copy of the License at:
5+
Copyright (C) 2007- Tatu Saloranta (tatu.saloranta@iki.fi) and contributors.
76

8-
http://www.apache.org/licenses/
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
910

10-
A copy is also included with both the the downloadable source code package
11-
and jar that contains class bytecodes, as file "ASL 2.0". In both cases,
12-
that file should be located next to this file: in source distribution
13-
the location should be "release-notes/asl"; and in jar "META-INF/"
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
Project home: https://github.com/FasterXML/jackson-core
20+
Maven artifact: com.fasterxml.jackson.core:jackson-core:2.18.2
21+
22+
Note: This project previously bundled Jackson 1.x (org.codehaus.jackson) as
23+
vendored source code. That code has been replaced by a Maven dependency on
24+
Jackson Core 2.x (com.fasterxml.jackson.core) as of 2026-04-30.

0 commit comments

Comments
 (0)