Skip to content

Commit

Permalink
Jakarta script: use single-pass sed editing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Mar 23, 2022
1 parent b5c11c7 commit 1b18c34
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions jakarta/transform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,25 @@ build_module () {
transform_module "independent-projects/arc"

# Now we need to update CDI, JTA, JPA and common annotations artifacts
sed -i 's/<version.cdi>2.0.2<\/version.cdi>/<version.cdi>3.0.0<\/version.cdi>/g' "$quarkusPath/independent-projects/arc/pom.xml"
sed -i 's/<version.jta>1.3.3<\/version.jta>/<version.jta>2.0.0<\/version.jta>/g' "$quarkusPath/independent-projects/arc/pom.xml"
sed -i 's/<version.jakarta-annotation>1.3.5<\/version.jakarta-annotation>/<version.jakarta-annotation>2.0.0<\/version.jakarta-annotation>/g' "$quarkusPath/independent-projects/arc/pom.xml"
sed -i 's/<version.jpa>2.2.3<\/version.jpa>/<version.jpa>3.0.0<\/version.jpa>/g' "$quarkusPath/independent-projects/arc/pom.xml"
sed -e 's/<version.cdi>2.0.2<\/version.cdi>/<version.cdi>3.0.0<\/version.cdi>/g' \
-e 's/<version.jta>1.3.3<\/version.jta>/<version.jta>2.0.0<\/version.jta>/g' \
-e 's/<version.jakarta-annotation>1.3.5<\/version.jakarta-annotation>/<version.jakarta-annotation>2.0.0<\/version.jakarta-annotation>/g' \
-e 's/<version.jpa>2.2.3<\/version.jpa>/<version.jpa>3.0.0<\/version.jpa>/g' \
-i "$quarkusPath/independent-projects/arc/pom.xml"


# Test & install modified Arc
build_module "independent-projects/arc"

# Switch parent BOM to Jakarta artifacts

sed -i 's/<jakarta.inject-api.version>1.0<\/jakarta.inject-api.version>/<jakarta.inject-api.version>2.0.0<\/jakarta.inject-api.version>/g' $BOM
sed -i 's/<jakarta.interceptor-api.version>1.2.5<\/jakarta.interceptor-api.version>/<jakarta.interceptor-api.version>2.0.0<\/jakarta.interceptor-api.version>/g' $BOM
sed -i 's/<jakarta.transaction-api.version>1.3.3<\/jakarta.transaction-api.version>/<jakarta.transaction-api.version>2.0.0<\/jakarta.transaction-api.version>/g' $BOM
sed -i 's/<jakarta.enterprise.cdi-api.version>2.0.2<\/jakarta.enterprise.cdi-api.version>/<jakarta.enterprise.cdi-api.version>3.0.0<\/jakarta.enterprise.cdi-api.version>/g' $BOM
sed -i 's/<jakarta.annotation-api.version>1.3.5<\/jakarta.annotation-api.version>/<jakarta.annotation-api.version>2.0.0<\/jakarta.annotation-api.version>/g' $BOM
sed -i 's/<jakarta.persistence-api.version>2.2.3<\/jakarta.persistence-api.version>/<jakarta.persistence-api.version>3.0.0<\/jakarta.persistence-api.version>/g' $BOM
sed -e 's/<jakarta.inject-api.version>1.0<\/jakarta.inject-api.version>/<jakarta.inject-api.version>2.0.0<\/jakarta.inject-api.version>/g' \
-e 's/<jakarta.interceptor-api.version>1.2.5<\/jakarta.interceptor-api.version>/<jakarta.interceptor-api.version>2.0.0<\/jakarta.interceptor-api.version>/g' \
-e 's/<jakarta.transaction-api.version>1.3.3<\/jakarta.transaction-api.version>/<jakarta.transaction-api.version>2.0.0<\/jakarta.transaction-api.version>/g' \
-e 's/<jakarta.enterprise.cdi-api.version>2.0.2<\/jakarta.enterprise.cdi-api.version>/<jakarta.enterprise.cdi-api.version>3.0.0<\/jakarta.enterprise.cdi-api.version>/g' \
-e 's/<jakarta.annotation-api.version>1.3.5<\/jakarta.annotation-api.version>/<jakarta.annotation-api.version>2.0.0<\/jakarta.annotation-api.version>/g' \
-e 's/<jakarta.persistence-api.version>2.2.3<\/jakarta.persistence-api.version>/<jakarta.persistence-api.version>3.0.0<\/jakarta.persistence-api.version>/g' \
-i $BOM

# Install the modified BOM:
build_module "bom/application"
Expand Down

0 comments on commit 1b18c34

Please sign in to comment.