Skip to content

AddJaxbDependencies removes javax.xml.bind:jaxb-api when it is required by another dependency #504

@pstreef

Description

@pstreef

What version of OpenRewrite are you using?

Moderne SaaS

How are you running OpenRewrite?

Moderne SaaS

What is the smallest, simplest way to reproduce the problem?

api("org.openrewrite:rewrite-maven:latest.integration")
implementation('javax.xml.bind:jaxb-api:latest.release')
implementation("net.logstash.logback:logstash-logback-encoder:latest.release")

What did you expect to see?

api("org.openrewrite:rewrite-maven:latest.integration")
implementation('javax.xml.bind:jaxb-api:latest.release')
implementation('jakarta.xml.bind:jakarta.xml.bind-api:4.0.2') {
    because("required by: rewrite-maven --> jackson-module-jaxb-annotations")
}
implementation("net.logstash.logback:logstash-logback-encoder:latest.release")

What did you see instead?

api("org.openrewrite:rewrite-maven:latest.integration")
implementation('jakarta.xml.bind:jakarta.xml.bind-api:4.0.2') {
    because("required by: rewrite-maven --> jackson-module-jaxb-annotations")
}
implementation("net.logstash.logback:logstash-logback-encoder:latest.release")

What is the full stack trace of any errors you encountered?

java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement

Are you interested in contributing a fix to OpenRewrite?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions