Skip to content

Conversation

@runeflobakk
Copy link
Member

@runeflobakk runeflobakk commented Mar 3, 2023

To ensure the JAXB facilities (generated code and marshallers) can be living alongside any jakarta.xml.bind namespaced JAXB in newer Java applications.

This (hopefully) ensures that we are using JAXB API and runtime artifacts which have other Maven coordinates than the newer Jakarta-branded artifacts, which started out with still containing old javax.xml.bind package, but in later versions changed this to jakarta.xml.bind. If dependees use newer Jakarta JAXB with the proper package, this will break the use of this library if it is depending on the Jakarta-artifacts with the javax.xml.bind package.

It's a mess.

https://stackoverflow.com/a/72151763

To ensure the JAXB facilities (generated code and marshallers) can be
living alongside any jakarta.xml.bind namespaced JAXB in newer Java
applications.

This ensures that we are using JAXB API and runtime artifacts which have
other Maven coordinates than the newer Jakarta-branded artifacts, which
started out with the old javax.xml.bind package, but in later versions
changed this to jakarta.xml.bind. If dependees use newer Jakarta JAXB
with the proper package, this will break the use of this library if it
is depending on the Jakarta-artifacts with the javax.xml.bind package.

It's a mess.
Resolving the old javax.xml.bind JAXB 2 stuff using the ServiceLoader facilities.
This enables depending projects to be able to bypass our custom stuff to
load JAXB if they for some reason needs to do so (e.g. if already
running in an environment using javax.xml.bind JAXB with some other
implementation they want to use instead).
Slf4J-Simple used in tests
This module is a candidate for extracting to a standalone lib
Move config of japicmp to profile in order to complement base config in
super-pom.

Remove rule for required Maven version, because this is specified in the
super-POM.
@runeflobakk runeflobakk marked this pull request as ready for review March 14, 2023 00:22
Comment on lines +135 to +140
<dependency>
<groupId>no.digipost</groupId>
<artifactId>jul-to-slf4j-junit-extension</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 45 to 51
<dependency>
<groupId>no.digipost</groupId>
<artifactId>jaxb-resolver-com.sun.xml.bind-bom</artifactId>
<version>0.1-RC2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@runeflobakk runeflobakk requested a review from simenstoa March 14, 2023 08:29
Copy link
Contributor

@simenstoa simenstoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Tar gjerne en live oppsummering av dette på kontoret også 😄

@runeflobakk
Copy link
Member Author

Absolutt! Her er det mye gøy!

@runeflobakk runeflobakk merged commit a3abf19 into main Mar 15, 2023
@runeflobakk runeflobakk deleted the old-is-older branch March 15, 2023 14:07
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.

2 participants