GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — jaxb2-maven-plugin fails under Maven 4 classloading: package-info classes not visible in plugin classrealm · Issue #12353 · apache/maven

jaxb2-maven-plugin fails under Maven 4 classloading: package-info classes not visible in plugin classrealm #12353

New issue
Copy link
New issue
Copy link
Closed
#12354
Closed
jaxb2-maven-plugin fails under Maven 4 classloading: package-info classes not visible in plugin classrealm#12353
#12354
Copy link

Description

@gnodet
gnodet
opened on Jun 23, 2026
Issue body actions

Description

jaxb2-maven-plugin:3.1.0 (and likely 4.x) fails under Maven 4 with a ClassNotFoundException for org.glassfish.jaxb.core.v2.model.core.package-info. The JAXB runtime's package-info classes are not visible in the plugin's classrealm.

Error

[ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:3.1.0:schemagen (schemagen) on project optaplanner-core-impl:
  Unable to load the mojo 'schemagen' in the plugin 'org.codehaus.mojo:jaxb2-maven-plugin:3.1.0'.
  A required class is missing: org.glassfish.jaxb.core.v2.model.core.package-info
-----------------------------------------------------
realm =    plugin>org.codehaus.mojo:jaxb2-maven-plugin:3.1.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:...jaxb2-maven-plugin-3.1.0.jar
urls[1] = file:...jaxb-xjc-3.0.0.jar
urls[2] = file:...jaxb-jxc-3.0.0.jar
...
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

Root cause

Maven 4's classrealm construction for plugins filters or doesn't expose package-info classes from transitive dependencies. The jaxb-core jar is either not included in the plugin classrealm or its package-info classes are not accessible due to the module/package filtering in maven.api.

The same build succeeds with Maven 3, where the plugin classrealm construction is more permissive.

Reproducer

git clone https://github.com/apache/incubator-kie-optaplanner.git
cd incubator-kie-optaplanner
mvn -B -e clean package -DskipTests

The schemagen goal on optaplanner-core-impl fails.

Context

Found during Maven 4 compatibility testing of Apache projects.

Claude Code on behalf of Guillaume Nodet

Activity

  1. gnodet
    added 3 commits that reference this issue on Jun 23, 2026

    Remove jaxb2-plugin-classloading from known issues

    ab22bdc

    [#12353] Add jaxb2-maven-plugin to mvnup plugin upgrade list (#12356)

    88d17ab

    [#12353] Add jaxb2-maven-plugin to mvnup plugin upgrade list (#12354)

    549065b
  2. gnodet
    closed this as completedin #12354on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.