Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to distribute jars generated by Java 11 allowing Jakarta cdi 4 upgrade #4119

Merged
merged 15 commits into from May 17, 2023

Conversation

filipelautert
Copy link
Collaborator

@filipelautert filipelautert commented Apr 12, 2023

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

cdi version 5 requires Java 11, but liquibase still supports Java 8. . In order to use it some changes were made:

  • added an exclusion so jakarta-cdi module is skipped when building using Java 8
  • switched distributing jars from the ones created by Java 8 to the ones built by Java 11 (target still 8), so jakarta-cdi module is included

With that we are able to accomplish the dependabot requirements:

  • Upgrade CDI to version 4 and Weld to 5
  • Drops Java 8 support

Relevant comments from dependabot issue: #3891 (comment)

dependabot bot and others added 7 commits March 31, 2023 18:35
Bumps [jakarta.enterprise.cdi-api](https://github.com/cdi-spec/cdi) from 3.0.0 to 4.0.1.
- [Release notes](https://github.com/cdi-spec/cdi/releases)
- [Commits](jakartaee/cdi@3.0.0...4.0.1)

---
updated-dependencies:
- dependency-name: jakarta.enterprise:jakarta.enterprise.cdi-api
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@filipelautert filipelautert self-assigned this Apr 12, 2023
@filipelautert filipelautert changed the title Supports jakarta cdi 4 upgrade Jakarta cdi 4 upgrade Apr 12, 2023
@filipelautert filipelautert changed the title Jakarta cdi 4 upgrade Switch to distribute jars generated by Java 11 + Jakarta cdi 4 upgrade Apr 13, 2023
@filipelautert filipelautert changed the title Switch to distribute jars generated by Java 11 + Jakarta cdi 4 upgrade Switch to distribute jars generated by Java 11 allowing Jakarta cdi 4 upgrade Apr 13, 2023
@@ -273,10 +279,10 @@ jobs:
script: |
core.setOutput("testResultsArtifact", "liquibase-test-results-integration-${{ matrix.testSystem }}".replace(/[^a-zA-Z0-9\-_]/g, "_"));

- name: Set up JDK 8
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Keep 8 so we can test with 8

- name: Build & Test Java 8
if: ${{ matrix.java == 8}}
run: |
mvn -B "-Dbuild.repository.owner=${{ needs.setup.outputs.thisRepositoryOwner }}" "-Dbuild.repository.name=${{ needs.setup.outputs.thisRepositoryName }}" "-Dbuild.branch=${{ needs.setup.outputs.thisBranchName }}" "-Dbuild.number=${{ github.run_number }}" "-Dbuild.commit=${{ needs.setup.outputs.thisSha }}" "-DtrimStackTrace=false" -pl '!liquibase-dist,!liquibase-cdi-jakarta' clean test package surefire-report:report
- name: Build & Test
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this step to be called something like "Build & Test all other Java versions"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm calling it non-jdk-8 to be compliant with the pom profile

Copy link
Contributor

@XDelphiGrl XDelphiGrl left a comment

Choose a reason for hiding this comment

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

PR updates Weld and the Jakarata Enterprise CDI API dependencies for liquibase-cdi-jakarta. Weld is now 5.1.0.Final and the CDI API is 4.0.1. The associated GitHub workflows are updated to build the Liquibase Jakarta CDI plugin with Java 11 as required by CDI 5.

  • No testing required.

APPROVED

@filipelautert filipelautert merged commit e41e04b into master May 17, 2023
30 of 34 checks passed
@filipelautert filipelautert deleted the github-action-jakarta-cdi-4-upgrade branch May 17, 2023 13:14
@filipelautert filipelautert added this to the 1NEXT milestone May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants