Skip to content

Commit

Permalink
Set export REWRITE_OFFLINE=true to disable fetching external projects
Browse files Browse the repository at this point in the history
Obviously, you need to have a previous build complete so that you have
all pieces around.
Also you might miss the latest adjustments to OpenRewrite so make sure
you do a full build from time to time.
  • Loading branch information
gsmet committed Mar 28, 2022
1 parent d007cd0 commit 819a8d8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 30 deletions.
8 changes: 8 additions & 0 deletions jakarta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
62 changes: 32 additions & 30 deletions jakarta/transform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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
Expand Down

0 comments on commit 819a8d8

Please sign in to comment.