Skip to content

Fix macOS GitHub Actions build failures#248

Merged
robstryker merged 1 commit into
masterfrom
issue-247-macos-build-fixes
May 14, 2026
Merged

Fix macOS GitHub Actions build failures#248
robstryker merged 1 commit into
masterfrom
issue-247-macos-build-fixes

Conversation

@robstryker
Copy link
Copy Markdown
Collaborator

Fixes #247

Summary

  • Upgrade setup-java action from v1 to v4 for ARM64 macOS support
  • Add MAVEN_OPTS to fix JAXP XML entity size limit errors

Problem

macOS builds were failing with two errors:

  1. JAVA_HOME environment variable is not defined correctly - caused by setup-java v1 not supporting ARM64 macOS runners (macos-latest now uses Apple Silicon)
  2. JAXP00010004: The accumulated size of entities exceeded the limit - caused by strict XML parsing limits when loading p2 repositories

Solution

1. Upgrade setup-java action

  • Changed from actions/setup-java@v1 to actions/setup-java@v4
  • Use Temurin distribution (supports both x64 and ARM64)
  • Remove hardcoded architecture: x64 to allow auto-detection
  • v4 properly handles ARM64 macOS runners

2. Add MAVEN_OPTS environment variable

  • Set MAVEN_OPTS with XML parsing limits disabled:
    • -Djdk.xml.maxGeneralEntitySizeLimit=0
    • -Djdk.xml.totalEntitySizeLimit=0
    • -Djdk.xml.entityExpansionLimit=0
  • Allows Maven/Tycho to parse large p2 repository metadata files

Test plan

  • CI build on macOS should now succeed
  • Existing Linux and Windows builds remain unaffected
  • Verify Maven can load p2 repositories without JAXP errors

🤖 Generated with Claude Code

Two fixes to resolve macOS build failures in CI:

1. Upgrade setup-java from v1 to v4 with Temurin distribution
   - The old v1 action doesn't properly support ARM64 macOS runners
   - macos-latest now uses Apple Silicon (ARM64) machines
   - v4 automatically detects architecture and installs correct JDK

2. Add MAVEN_OPTS to fix JAXP XML entity size limit errors
   - Set maxGeneralEntitySizeLimit, totalEntitySizeLimit, and
     entityExpansionLimit to 0 to bypass XML parsing limits
   - Prevents "JAXP00010004: The accumulated size of entities
     exceeded the limit" errors during p2 repository parsing

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@robstryker robstryker merged commit 9a4b1b0 into master May 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS GitHub Actions build fails with JAVA_HOME and JAXP errors

1 participant