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
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/build.yml
Expand Up @@ -170,7 +170,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || github.event.after}}
- name: Built Code Cache
if: ${{ matrix.java == 8}}
if: ${{ matrix.java == 11}}
uses: actions/cache@v3.3.1
with:
key: built-code-${{ github.run_number }}-${{ github.run_attempt }}
Expand All @@ -185,9 +185,15 @@ jobs:
uses: stCarolas/setup-maven@v4.5
with:
maven-version: ${{ env.MAVEN_VERSION }}
- 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

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' clean test package surefire-report:report

- name: Remove Original Jars for *nix
if: env.OS_TYPE != 'windows-2019'
run: |
Expand All @@ -204,7 +210,7 @@ jobs:
./**/target/site

- name: Archive Modules
if: ${{ matrix.java == 8 && matrix.os == 'ubuntu-22.04'}}
if: ${{ matrix.java == 11 && matrix.os == 'ubuntu-22.04'}}
uses: actions/upload-artifact@v3
with:
name: liquibase-modules
Expand Down Expand Up @@ -329,10 +335,10 @@ jobs:
key: install4j-A${{ hashFiles('liquibase-dist/src/main/install4j/liquibase.install4j') }}
path: ~/.install4j8/**

- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
gpg-private-key: ${{ secrets.GPG_SECRET }}
gpg-passphrase: GPG_PASSPHRASE
Expand Down
4 changes: 2 additions & 2 deletions liquibase-cdi-jakarta/pom.xml
Expand Up @@ -31,15 +31,15 @@
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
<version>4.0.3.Final</version>
<version>5.1.0.Final</version>
<scope>test</scope>
</dependency>

<!-- provided scope -->
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<version>3.0.0</version>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
@@ -1,27 +1,20 @@
package liquibase.integration.jakarta.cdi;


import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.context.spi.CreationalContext;
import jakarta.enterprise.event.Observes;
import jakarta.enterprise.inject.Any;
import jakarta.enterprise.inject.Default;
import jakarta.enterprise.inject.spi.AfterBeanDiscovery;
import jakarta.enterprise.inject.spi.AfterDeploymentValidation;
import jakarta.enterprise.inject.spi.AnnotatedType;
import jakarta.enterprise.inject.spi.Bean;
import jakarta.enterprise.inject.spi.BeanManager;
import jakarta.enterprise.inject.spi.Extension;
import jakarta.enterprise.inject.spi.InjectionPoint;
import jakarta.enterprise.inject.spi.InjectionTarget;
import jakarta.enterprise.inject.spi.*;
import jakarta.enterprise.util.AnnotationLiteral;

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/**
* CDI Bootstrap
* <p/>
Expand Down Expand Up @@ -85,11 +78,6 @@ public boolean isAlternative() {
return false;
}

@Override
XDelphiGrl marked this conversation as resolved.
Show resolved Hide resolved
public boolean isNullable() {
return false;
}

@Override
public Set<InjectionPoint> getInjectionPoints() {
return it.getInjectionPoints();
Expand Down