Skip to content

Commit

Permalink
Merge pull request #27651 from gsmet/cdi-4
Browse files Browse the repository at this point in the history
Jakarta - Upgrade to CDI 4.0.1 and various other upgrades
  • Loading branch information
gsmet authored Aug 31, 2022
2 parents 9f8bd88 + 4a94008 commit 36ea30a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 17 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
24 changes: 14 additions & 10 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 @@ -52,23 +52,23 @@ recipeList:
version: "${jakarta.el-api.version}"
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.el-api.version
newValue: 5.0.0
newValue: 5.0.1
addIfMissing: true
# 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
newValue: 2.0.0
newValue: 2.0.1
# Interceptor
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.interceptor-api.version
newValue: 2.0.0
newValue: 2.1.0
# JAX-RS - See below for the specs
- org.openrewrite.maven.ChangePropertyValue:
key: resteasy.version
Expand Down Expand Up @@ -136,6 +136,7 @@ recipeList:
key: quarkus-security.version
newValue: 2.0.0.Alpha1
# Servlet
# TODO EE 10 6.0.0
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.servlet-api.version
newValue: 5.0.0
Expand All @@ -145,10 +146,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 All @@ -170,6 +171,7 @@ recipeList:
key: hibernate-validator.version
newValue: 8.0.0.CR3
# Websockets
# TODO EE 10 2.1.0
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.websocket-api.version
newValue: 2.0.0
Expand All @@ -183,7 +185,7 @@ recipeList:
# WildFly Security
- org.openrewrite.maven.ChangePropertyValue:
key: wildfly-elytron.version
newValue: 2.0.0.Beta1
newValue: 2.0.0.Beta3
---
type: specs.openrewrite.org/v1beta/recipe
name: io.quarkus.jakarta-jaxrs-jaxb
Expand Down Expand Up @@ -343,10 +345,12 @@ recipeList:
groupId: jakarta.authentication
artifactId: jakarta.authentication-api
version: "${jakarta.authentication-api}"
# TODO EE 10 2.1.0
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.authorization-api.version
newValue: 2.0.0
addIfMissing: true
# TODO EE 10 3.0.0
- org.openrewrite.maven.ChangePropertyValue:
key: jakarta.authentication-api
newValue: 2.0.0
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 36ea30a

Please sign in to comment.