Skip to content

Project targets at Java 7, but requires Java 8 deps when runs at Java 9+ #248

@michael-o

Description

@michael-o

I am working on Maven Doxia and recently upgraded xmlunit-core, the GH action tells me this:
https://github.com/apache/maven-doxia/runs/4827147809?check_suite_focus=true#step:5:1729

The project is still targeted at Java 7, so is xmlunit. We test with multiple JDK versions, as soon as Java 11 is used a Java 8 dependency is sourced. This contradicts the project's target at 7. Enforcer rejects the build. While I could upgrade to Java 8, but for the wrong reasons.

This snippet does not mention that actually Java 8 bytecode level will be required:

If you are using Java 9 or later the core also depends on the JAXB API. This used to be part of the standard class library but has been split out of it with Java 9.

If you want to use Input.fromJaxb - i.e. you want to serialize plain Java objects to XML as input - then you also need to add a dependency on the JAXB implementation. Starting with XMLUnit 2.6.4, xmlunit-core optionally depends on the JAXB reference implementation and its transitive dependencies. Starting with XMLUnit 2.8.0 the JAXB dependency requires the JakartaEE version of JAXB.

Is GlassFish JAXB from javax namespace in version 2.x not more than enough for this project?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions