Skip to content

Commit 0cc2f3c

Browse files
Fix redundant profile activation in setup-workspace.sh
Explicitly disable the `download-cn1-binaries` Maven profile during the `setup-workspace.sh` script execution. The script already provisions these binaries externally and passes the path via `-Dcn1.binaries`, but the profile was still activating and attempting a redundant `git clone` into the target directory, causing concurrency errors (exit code 128) and significant delays.
1 parent 258c0e9 commit 0cc2f3c

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,18 +226,19 @@ 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 install "$@"
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 "$@"
230230

231231
log "Building Codename One Maven plugin"
232232
"$MAVEN_HOME/bin/mvn" -f maven/pom.xml \
233233
-pl codenameone-maven-plugin -am \
234234
-DskipTests -Djava.awt.headless=true \
235+
-P !download-cn1-binaries \
235236
install "$@"
236237

237238
BUILD_CLIENT="$HOME/.codenameone/CodeNameOneBuildClient.jar"
238239
log "Ensuring CodeNameOneBuildClient.jar is installed"
239240
if [ ! -f "$BUILD_CLIENT" ]; then
240-
if ! "$MAVEN_HOME/bin/mvn" -f maven/pom.xml cn1:install-codenameone "$@"; then
241+
if ! "$MAVEN_HOME/bin/mvn" -f maven/pom.xml -P !download-cn1-binaries cn1:install-codenameone "$@"; then
241242
log "Falling back to copying CodeNameOneBuildClient.jar"
242243
mkdir -p "$(dirname "$BUILD_CLIENT")"
243244
cp maven/CodeNameOneBuildClient.jar "$BUILD_CLIENT" || true

0 commit comments

Comments
 (0)