diff --git a/jakarta/README.md b/jakarta/README.md index 4e17f2ad3a02ad..904ea85bbb4ae5 100644 --- a/jakarta/README.md +++ b/jakarta/README.md @@ -7,6 +7,14 @@ This directory contains scripts and configuration files to automate the migratio `jakarta/transform.sh` is the main script to run. It has to be run from the root of the Quarkus repository. +If you are offline and can't fetch the external projects, do: +``` +export REWRITE_OFFLINE=true +jakarta/transform.sh +``` +Obviously, you need to have run a full build before. +Also keep in mind you should run a full build from time to time to get the potential updates to OpenRewrite. + It consists of several steps that leverage various tools: - [OpenRewrite](https://github.com/openrewrite/rewrite) - rewrites the POM files diff --git a/jakarta/transform.sh b/jakarta/transform.sh index c7a6a9cd771b7b..6dcb2ba565c45b 100755 --- a/jakarta/transform.sh +++ b/jakarta/transform.sh @@ -13,36 +13,38 @@ if [ ! -f dco.txt ]; then exit 1 fi -# Prepare OpenRewrite - we temporarily build a local version as we need a patch -rm -rf target/rewrite -git clone git@github.com:gsmet/rewrite.git target/rewrite -pushd target/rewrite -git checkout jakarta -./gradlew -x test -x javadoc publishToMavenLocal -popd - -rm -rf target/rewrite-maven-plugin -git clone git@github.com:gsmet/rewrite-maven-plugin.git target/rewrite-maven-plugin -pushd target/rewrite-maven-plugin -git checkout jakarta -./mvnw clean install -DskipTests -DskipITs -popd - -# Build SmallRye Config (temporary) -rm -rf target/smallrye-config -git clone git@github.com:smallrye/smallrye-config.git target/smallrye-config -pushd target/smallrye-config -git checkout jakarta -mvn clean install -DskipTests -DskipITs -popd - -# Build Kotlin Maven Plugin to allow skipping main compilation -# (skipping test compilation is supported but not main) -rm -rf target/kotlin -git clone -b v1.6.10-jakarta --depth 1 git@github.com:gsmet/kotlin.git target/kotlin -pushd target/kotlin/libraries/tools/kotlin-maven-plugin -mvn clean install -DskipTests -DskipITs -popd +if [ "${REWRITE_OFFLINE-false}" != "true" ]; then + # Prepare OpenRewrite - we temporarily build a local version as we need a patch + rm -rf target/rewrite + git clone git@github.com:gsmet/rewrite.git target/rewrite + pushd target/rewrite + git checkout jakarta + ./gradlew -x test -x javadoc publishToMavenLocal + popd + + rm -rf target/rewrite-maven-plugin + git clone git@github.com:gsmet/rewrite-maven-plugin.git target/rewrite-maven-plugin + pushd target/rewrite-maven-plugin + git checkout jakarta + ./mvnw clean install -DskipTests -DskipITs + popd + + # Build SmallRye Config (temporary) + rm -rf target/smallrye-config + git clone git@github.com:smallrye/smallrye-config.git target/smallrye-config + pushd target/smallrye-config + git checkout jakarta + mvn clean install -DskipTests -DskipITs + popd + + # Build Kotlin Maven Plugin to allow skipping main compilation + # (skipping test compilation is supported but not main) + rm -rf target/kotlin + git clone -b v1.6.10-jakarta --depth 1 git@github.com:gsmet/kotlin.git target/kotlin + pushd target/kotlin/libraries/tools/kotlin-maven-plugin + mvn clean install -DskipTests -DskipITs + popd +fi # Set up jbang alias, we are using latest released transformer version jbang alias add --name transform org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0