diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd124dc..7a55c7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -263,7 +263,7 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS user)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -283,7 +283,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m user -o macos + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m user -o macos - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -301,7 +303,7 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS dev)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -321,7 +323,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m dev -o macos + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m dev -o macos - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -339,7 +343,7 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -359,7 +363,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m hipedev -o macos + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m hipedev -o macos - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -377,7 +383,7 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS user)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -397,7 +403,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m user -o macosarm + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m user -o macosarm - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -415,7 +423,7 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS dev)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -435,7 +443,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m dev -o macosarm + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m dev -o macosarm - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -453,7 +463,7 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -473,7 +483,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m hipedev -o macosarm + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m hipedev -o macosarm - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact diff --git a/build.sh b/build.sh index cd8850a..c26e8ba 100755 --- a/build.sh +++ b/build.sh @@ -199,6 +199,29 @@ remove_update_sites () { rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_METADATA } +# Removes broken org.apache.commons.logging JAR from plug-ins +remove_broken_commons_logging () { + log "Removes broken org.apache.commons.logging JAR from plug-ins." + rm $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar + # force org.eclipse.equinox to take correct JAR into account + # org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false + sed -i '/org.apache.commons.lang3/a org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false' $ECLIPSE_BASE_PATH/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info + # org.apache.commons.logging,1.2.0.v20180409-1502,plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar,4,false + sed -i '/org.apache.commons.logging,1.2.0.v20180409-1502,plugins\/org.apache.commons.logging_1.2.0.v20180409-1502.jar,4,false/d' $ECLIPSE_BASE_PATH/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info +} + +# Copies the non-broken org.apache.commons.logging JAR from plug-ins +save_non_broken_commons_logging () { + log "Save non-broken org.apache.commons.logging JAR from plug-ins." + cp $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.jar /tmp/org.apache.commons.logging_1.2.0.jar +} + +# Restores the non-broken org.apache.commons.logging JAR to plug-ins +restore_non_broken_commons_logging () { + log "Restores the non-broken org.apache.commons.logging JAR from plug-ins." + cp /tmp/org.apache.commons.logging_1.2.0.jar $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.jar + rm /tmp/org.apache.commons.logging_1.2.0.jar +} # # Script @@ -231,7 +254,7 @@ setup_emoflon_headless_local_updatesite log "Clean-up Eclipse folder and extract downloaded archive." rm -rf ./eclipse/* if [[ "$OS" = "linux" ]]; then - tar -xzf eclipse-modeling-$VERSION-R-linux-gtk-x86_64.tar.gz + tar -xzf eclipse-modeling-$VERSION-R-linux-gtk-x86_64.tar.gz --warning=no-unknown-keyword elif [[ "$OS" = "windows" ]]; then unzip -qq -o eclipse-modeling-$VERSION-R-win32-x86_64.zip elif [[ "$OS" = "macos" ]]; then @@ -247,6 +270,9 @@ fi # Install global Eclipse settings from config file install_global_eclipse_settings +# Save non-broken org.apache.commons.logging JAR from plug-ins +save_non_broken_commons_logging + log "Install Eclipse plug-ins." for p in ${ORDER[@]}; do # Check if eMoflon packages must be skipped (for dev builds). @@ -254,7 +280,7 @@ for p in ${ORDER[@]}; do log "Skipping plug-in: $p." continue fi - + # Check if Dark Theme packages must be skipped (for CI builds = completely headless). if [[ "$p" = "theme" ]] && [[ $SKIP_THEME -eq 1 ]]; then log "Skipping plug-in: $p." @@ -291,6 +317,12 @@ else chmod +x splash.sh && ./splash.sh deploy $VERSION $ECLIPSE_BASE_PATH fi +# Remove broken org.apache.commons.logging JAR +remove_broken_commons_logging + +# Restore non-broken org.apache.commons.logging JAR +restore_non_broken_commons_logging + log "Clean-up old archives and create new archive." rm -f ./$OUTPUT_FILE zip -q -r $OUTPUT_FILE eclipse