Skip to content

Conversation

@Til7701
Copy link
Contributor

@Til7701 Til7701 commented Nov 8, 2025

This PR removes the SPI entries for ValueExtractors, since they are optional dependencies and there is a bug that was fixed in JDK 25 (https://bugs.openjdk.org/browse/JDK-8347915).

Changes:

  • Updated Maven Wrapper with mvn wrapper:wrapper since I had some problems with it. I do not know what the problem was, but it was fixed by updating.
  • Updated module-info as explained above
  • Added integration tests run by the maven invoker plugin
  • The tests are only run when building with the integration-test Maven profile
  • Added the following tests:
    • jakarta-jlink
      • Tests basic usage
      • Instantiates a JsonNullableJakartaValueExtractor
      • Is built using JLink
      • Runs the application by calling the script created by JLink
    • jakarta-modulepath
      • Tests basic usage
      • Instantiates a JsonNullableJakartaValueExtractor
      • Runs the application using --module-path
    • jakarta-classpath
      • Tests basic usage
      • Instantiates a JsonNullableJakartaValueExtractor
      • Runs the application using --class-path
      • Tries loading a JsonNullableJakartaValueExtractor via the ServiceLoader

closes #100

Note that the JLink test only works for JDK 25 and above
- Added integration test for classpath usage
- Test using value extractor in main
- Remove service provider entries in module-info to avoid optional dependency issue in JDK 24 and older
<version>3.6.2</version>
<executions>
<execution>
<id>run-jlink-main</id>
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename (or remove) this since there isn't any jlink here.

<version>3.6.2</version>
<executions>
<execution>
<id>run-jlink-main</id>
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename (or remove) this since there isn't any jlink here.


exports org.openapitools.jackson.nullable;

provides com.fasterxml.jackson.databind.Module with org.openapitools.jackson.nullable.JsonNullableModule;
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this one need to be removed? It's not related to javax/jakarta, so I don't think that it should be a problem here (unless I'm misunderstanding the root problem).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was testing some other things and forgot to add it back :)


provides com.fasterxml.jackson.databind.Module with org.openapitools.jackson.nullable.JsonNullableModule;
provides javax.validation.valueextraction.ValueExtractor with org.openapitools.jackson.nullable.JsonNullableValueExtractor;
provides jakarta.validation.valueextraction.ValueExtractor with org.openapitools.jackson.nullable.JsonNullableJakartaValueExtractor;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe leave this in, but commented out that it can be re-added when either of the below are true.

  1. Baseline JDK is 25 (to avoid telling users that they can build with 25+, and still use something lower).
  2. Javax is dropped, so that there isn't a need for anything optional.

Just a suggestion, but not a problem either way.

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.

Version 0.2.8 fails with ResolutionException

2 participants