Skip to content

Commit e8df7fb

Browse files
Optimize setup-workspace.sh performance
Enhance build performance in `scripts/setup-workspace.sh` by: 1. Adding `-T 1C` to Maven commands to enable parallel builds using one thread per core. 2. Adding `-Dmaven.javadoc.skip=true` and `-Dmaven.source.skip=true` to skip time-consuming and unnecessary documentation and source artifact generation during the workspace setup phase. 3. Explicitly disabling the `download-cn1-binaries` profile (`-P !download-cn1-binaries`) to prevent redundant `git clone` operations that were causing "Result: 128" errors and delays.
1 parent 0cc2f3c commit e8df7fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/setup-workspace.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,12 @@ if [ ! -d "$CN1_BINARIES/.git" ]; then
226226
fi
227227

228228
log "Building Codename One core modules"
229-
"$MAVEN_HOME/bin/mvn" -f maven/pom.xml -DskipTests -Djava.awt.headless=true -Dcn1.binaries="$CN1_BINARIES" -Dcodename1.platform=javase -P local-dev-javase,compile-android,!download-cn1-binaries install "$@"
229+
"$MAVEN_HOME/bin/mvn" -f maven/pom.xml -T 1C -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests -Djava.awt.headless=true -Dcn1.binaries="$CN1_BINARIES" -Dcodename1.platform=javase -P local-dev-javase,compile-android,!download-cn1-binaries install "$@"
230230

231231
log "Building Codename One Maven plugin"
232232
"$MAVEN_HOME/bin/mvn" -f maven/pom.xml \
233233
-pl codenameone-maven-plugin -am \
234+
-T 1C -Dmaven.javadoc.skip=true -Dmaven.source.skip=true \
234235
-DskipTests -Djava.awt.headless=true \
235236
-P !download-cn1-binaries \
236237
install "$@"
@@ -273,6 +274,6 @@ if [ "${skip_archetypes:-0}" -eq 0 ]; then
273274
log "Updating cn1-maven-archetypes version from $current_version to $CN1_VERSION to match local snapshot"
274275
"$MAVEN_HOME/bin/mvn" -q -B versions:set -DnewVersion="$CN1_VERSION" -DgenerateBackupPoms=false
275276
fi
276-
"$MAVEN_HOME/bin/mvn" -DskipTests -DskipITs=true -Dinvoker.skip=true install
277+
"$MAVEN_HOME/bin/mvn" -T 1C -DskipTests -DskipITs=true -Dinvoker.skip=true install
277278
) || log "Archetype mvn install failed; continuing."
278279
fi

0 commit comments

Comments
 (0)