Skip to content

Commit

Permalink
Jakarta - Upgrade to CDI 4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Aug 31, 2022
1 parent 8ad597b commit 1744546
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/jakarta-rewrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
export PATH="$HOME/.jbang/bin:$PATH"
git checkout -b temp-jakarta-rewrite
REWRITE_NO_TESTS=true ./jakarta/transform.sh
git add .
git commit -m 'Transform sources to Jakarta'
git push --force origin temp-jakarta-rewrite:jakarta-rewrite
shell: bash
- name: Build and Deploy
Expand Down
12 changes: 6 additions & 6 deletions jakarta/rewrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ recipeList:
# Annotation
- org.openrewrite.maven.ChangePropertyValue:
key: version.jakarta-annotation
newValue: 2.0.0
newValue: 2.1.1
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.annotation-api.version
newValue: 2.0.0
newValue: 2.1.1
# EL
- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId:
oldGroupId: org.glassfish
Expand All @@ -57,10 +57,10 @@ recipeList:
# CDI
- org.openrewrite.maven.ChangePropertyValue:
key: version.cdi
newValue: 3.0.0
newValue: 4.0.1
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.enterprise.cdi-api.version
newValue: 3.0.0
newValue: 4.0.1
# Inject
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.inject-api.version
Expand Down Expand Up @@ -145,10 +145,10 @@ recipeList:
# Transaction
- org.openrewrite.maven.ChangePropertyValue:
key: version.jta
newValue: 2.0.0
newValue: 2.0.1
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.transaction-api.version
newValue: 2.0.0
newValue: 2.0.1
- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId:
oldGroupId: org.jboss.narayana.jta
oldArtifactId: narayana-jta
Expand Down
40 changes: 35 additions & 5 deletions jakarta/transform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,41 @@ git checkout -- integration-tests/gradle/gradle/wrapper/gradle-wrapper.jar
git checkout -- independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/tooling/gradle-wrapper/base/gradle/wrapper/gradle-wrapper.jar
git checkout -- extensions/kubernetes-service-binding/runtime/src/test/resources/k8s/test-k8s/

# Format source code (cannot use mvn process-sources unfortunately)
./mvnw -B -pl :quarkus-bootstrap-maven-plugin -pl :quarkus-extension-maven-plugin -pl :quarkus-enforcer-rules -pl :quarkus-maven-plugin -pl :quarkus-bom-test -am clean install -DskipTests -DskipITs -Dinvoker.skip

./mvnw -f independent-projects/arc formatter:format impsort:sort
./mvnw -f independent-projects/bootstrap formatter:format impsort:sort
./mvnw -f independent-projects/enforcer-rules formatter:format impsort:sort
./mvnw -f independent-projects/extension-maven-plugin formatter:format impsort:sort
./mvnw -f independent-projects/qute formatter:format impsort:sort
./mvnw -f independent-projects/resteasy-reactive formatter:format impsort:sort
./mvnw -f independent-projects/tools formatter:format impsort:sort

./mvnw -f core formatter:format impsort:sort
./mvnw -f extensions formatter:format impsort:sort
./mvnw -f coverage-report formatter:format impsort:sort
./mvnw -f devtools formatter:format impsort:sort
./mvnw -f tcks formatter:format impsort:sort
./mvnw -f docs formatter:format impsort:sort
./mvnw -f integration-tests formatter:format impsort:sort
./mvnw -f test-framework formatter:format impsort:sort

# Disable non-compilable ITs
# - Confluent registry client doesn't have a version supporting Jakarta packages
sed -i 's@<module>kafka-avro</module>@<!-- <module>kafka-avro</module> -->@g' integration-tests/pom.xml

# Commit what we have before cherry-picking stuff
git add .
git commit -m 'Transform sources to Jakarta'

# Apply EE 10 updates

## CDI/ArC
git fetch origin jakarta-10-cdi
JAKARTA_10_CDI_HASH=$(git rev-parse origin/jakarta-10-cdi)
git cherry-pick -x ${JAKARTA_10_CDI_HASH}

# Build phase

if [ "${REWRITE_TESTS_CONTAINERS-false}" == "true" ]; then
Expand All @@ -320,11 +355,6 @@ else
./mvnw -B clean install -Dno-test-modules -DskipTests -DskipITs
fi

# Disable non-compilable ITs
# - Infinispan uses the @javax.annotation.Generated annotation in code generation and it's not available
# - Confluent registry client doesn't have a version supporting Jakarta packages
sed -i 's@<module>kafka-avro</module>@<!-- <module>kafka-avro</module> -->@g' integration-tests/pom.xml

./mvnw -B clean install -f integration-tests -DskipTests -DskipITs
./mvnw -B clean install -f tcks -DskipTests -DskipITs

Expand Down

0 comments on commit 1744546

Please sign in to comment.