Skip to content

Add jakarta support from upstream - #10

Draft
rravi-sift wants to merge 3 commits into
masterfrom
jakarta-support
Draft

Add jakarta support from upstream#10
rravi-sift wants to merge 3 commits into
masterfrom
jakarta-support

Conversation

@rravi-sift

@rravi-sift rravi-sift commented Jun 24, 2026

Copy link
Copy Markdown

Change Description

  • Port of Support using JSR-303 annotations from 'jakarta.validation' package joelittlejohn/jsonschema2pojo#1280 to this fork.
    • Adds useJakartaValidation (default false) as a new configuration option across all entry points: Gradle plugin,
      Maven plugin, CLI, and Ant task
    • When true, JSR-303 annotations are sourced from jakarta.validation instead of javax.validation, affects @Valid,
      @NotNull, @Size, @Pattern, @DecimalMin, and @DecimalMax
    • Adds jakarta.validation-api:3.0.0 as a compile dependency in jsonschema2pojo-core and the root pom.xml
    • Fixes pre-existing Java 11 compilation failure in ObjectRule and EnumRule by adding javax.annotation-api:1.3.2
      (removed from JDK in Java 9+)
    • Following rules were updated:
      • ValidRule
      • RequiredRule
      • RequiredArrayRule
      • MinimumMaximumRule
      • MinLengthMaxLengthRule
      • MinItemsMaxItemsRule
      • PatternRule
  • Remove circle build since CircleCI is not accessible anymore, replace it with github worklow. Also disable the failing ContentResolverTest

Verification

  • Ran the unit tests

Deployment Plan

  • Manually publish the jar to internal registry as done in Update gradle plugin with upstream changes #9
    mvn package -Dmaven.test.skip
    
    mvn deploy:deploy-file -DgroupId=org.jsonschema2pojo -DartifactId=jsonschema2pojo-gradle-plugin \
      -Dversion=<version> \
      -Dpackaging=jar \
      -Dfile=<jar_location>-jar-with-dependencies.jar \
      -Durl=<repo>

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.

1 participant