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 — Make javax.xml.bind resolution optional in core jar manifest · Issue #300 · xmlunit/xmlunit

Make javax.xml.bind resolution optional in core jar manifest #300

New issue
Copy link
New issue
Copy link
Closed
Closed
Make javax.xml.bind resolution optional in core jar manifest#300
Copy link
Labels
coreenhancementhelp wantedosgi
Milestone
2.10.3

Description

@thmuch
thmuch
opened on Jun 12, 2025
Issue body actions

We'd like to use XMLUnit 2, but we're in an OSGi environment. That means that the OSGi metadata ("Import-Package" in the manifest of the core jar) will pull in all the old javax.xml.bind packages – but we already use the current jakarta namespace packages.

Unfortunately, this is a show-stopper for us that keeps us from using XMLUnit.

Any chance the javax.xml.bind resolution can be made optional als described in #227 (comment) ?

Thanks 😊

Activity

  1. bodewig commented on Jun 15, 2025

    @bodewig
    bodewig
    on Jun 15, 2025
    Member
    More actions

    A fair description of my OSGi knowledge would be that I learn enough to fix a problem every three or four years and then forget everything I've learned in an instant after the problem is resolved.

    The comment you link to doesn't really say what I'm supposed to change. IIUC it suggests I make all imports in all modules optional, which seems to be way more than what we actually need.

    If you or anybody else knows how I make the import of the javax.xml.bind in the core module optional without affecting any other imports, I'll be happy to change the setup.

  2. bodewig
    added
    enhancement
    help wanted
    core
    osgi
    on Jun 15, 2025
  3. bodewig commented on Jun 15, 2025

    @bodewig
    bodewig
    on Jun 15, 2025
    Member
    More actions

    I've opened #301 and will publish SNAPSHOT builds soon. This creates a MANIFEST including

    Import-Package: javax.xml.bind;resolution=optional,javax.xml.bind.annota
     tion;resolution=optional,javax.xml.bind.util;resolution=optional,javax.
     xml.namespace,javax.xml.parsers,javax.xml.transform,javax.xml.transform
     .dom,javax.xml.transform.sax,javax.xml.transform.stream,javax.xml.valid
     ation,javax.xml.xpath,org.w3c.dom,org.xml.sax,org.xml.sax.helpers
    

    which may or may not work. I haven't got any easy way to verify this actually does what it is supposed to do for OSGi users.

  4. bodewig commented on Jun 15, 2025

    @bodewig
    bodewig
    on Jun 15, 2025
    Member
    More actions

    2.10.3-SNAPSHOT uploaded: https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/org/xmlunit/

  5. thmuch commented on Jun 17, 2025

    @thmuch
    thmuch
    on Jun 17, 2025
    Author
    More actions

    There's a typo, it should read "resolution:=optional" (with a colon): https://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html#i2548181

    Sorry that I didn't catch this earlier...

    Reacted by Stefan Bodewig
  6. bodewig
    added this to the 2.10.3 milestone on Jun 17, 2025
  7. bodewig commented on Jun 19, 2025

    @bodewig
    bodewig
    on Jun 19, 2025
    Member
    More actions

    fixed via #301

  8. bodewig commented on Jun 19, 2025

    @bodewig
    bodewig
    on Jun 19, 2025
    Member
    More actions

    release 2.10.3 is on its way to Maven Central, should show up soonish.

    Reacted by Thomas Much
  9. bodewig
    closed this as completedon Jun 19, 2025
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

    coreenhancementhelp wantedosgi

    Type

    No type

    Projects

    No projects

      Milestone

      • 2.10.3

      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.