Skip to content

Commit a4c9cb3

Browse files
committed
Merge branch 'main' into feature/update-eclipse-2024-12
2 parents 56db10f + 58de06b commit a4c9cb3

File tree

2 files changed

+58
-14
lines changed

2 files changed

+58
-14
lines changed

.github/workflows/ci.yml

+24-12
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ jobs:
263263
run: echo "Started CI build (Eclipse eMoflon macOS user)."
264264
- name: Install dependencies
265265
run: |
266-
brew install p7zip coreutils grep wget curl
266+
brew install p7zip coreutils grep wget curl gsed
267267
- name: Check out repository code
268268
uses: actions/checkout@v4
269269
- name: Download splash image
@@ -283,7 +283,9 @@ jobs:
283283
with:
284284
name: com.seeq.eclipse.importprojects.jar
285285
- name: Run build script
286-
run: chmod +x build.sh && ./build.sh -m user -o macos
286+
run: |
287+
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
288+
chmod +x build.sh && ./build.sh -m user -o macos
287289
- name: Fix permissions
288290
run: sudo xattr -cr ./eclipse/Eclipse.app
289291
- name: Upload artifact
@@ -301,7 +303,7 @@ jobs:
301303
run: echo "Started CI build (Eclipse eMoflon macOS dev)."
302304
- name: Install dependencies
303305
run: |
304-
brew install p7zip coreutils grep wget curl
306+
brew install p7zip coreutils grep wget curl gsed
305307
- name: Check out repository code
306308
uses: actions/checkout@v4
307309
- name: Download splash image
@@ -321,7 +323,9 @@ jobs:
321323
with:
322324
name: com.seeq.eclipse.importprojects.jar
323325
- name: Run build script
324-
run: chmod +x build.sh && ./build.sh -m dev -o macos
326+
run: |
327+
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
328+
chmod +x build.sh && ./build.sh -m dev -o macos
325329
- name: Fix permissions
326330
run: sudo xattr -cr ./eclipse/Eclipse.app
327331
- name: Upload artifact
@@ -339,7 +343,7 @@ jobs:
339343
run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)."
340344
- name: Install dependencies
341345
run: |
342-
brew install p7zip coreutils grep wget curl
346+
brew install p7zip coreutils grep wget curl gsed
343347
- name: Check out repository code
344348
uses: actions/checkout@v4
345349
- name: Download splash image
@@ -359,7 +363,9 @@ jobs:
359363
with:
360364
name: com.seeq.eclipse.importprojects.jar
361365
- name: Run build script
362-
run: chmod +x build.sh && ./build.sh -m hipedev -o macos
366+
run: |
367+
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
368+
chmod +x build.sh && ./build.sh -m hipedev -o macos
363369
- name: Fix permissions
364370
run: sudo xattr -cr ./eclipse/Eclipse.app
365371
- name: Upload artifact
@@ -377,7 +383,7 @@ jobs:
377383
run: echo "Started CI build (Eclipse eMoflon macOS user)."
378384
- name: Install dependencies
379385
run: |
380-
brew install p7zip coreutils grep wget curl
386+
brew install p7zip coreutils grep wget curl gsed
381387
- name: Check out repository code
382388
uses: actions/checkout@v4
383389
- name: Download splash image
@@ -397,7 +403,9 @@ jobs:
397403
with:
398404
name: com.seeq.eclipse.importprojects.jar
399405
- name: Run build script
400-
run: chmod +x build.sh && ./build.sh -m user -o macosarm
406+
run: |
407+
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
408+
chmod +x build.sh && ./build.sh -m user -o macosarm
401409
- name: Fix permissions
402410
run: sudo xattr -cr ./eclipse/Eclipse.app
403411
- name: Upload artifact
@@ -415,7 +423,7 @@ jobs:
415423
run: echo "Started CI build (Eclipse eMoflon macOS dev)."
416424
- name: Install dependencies
417425
run: |
418-
brew install p7zip coreutils grep wget curl
426+
brew install p7zip coreutils grep wget curl gsed
419427
- name: Check out repository code
420428
uses: actions/checkout@v4
421429
- name: Download splash image
@@ -435,7 +443,9 @@ jobs:
435443
with:
436444
name: com.seeq.eclipse.importprojects.jar
437445
- name: Run build script
438-
run: chmod +x build.sh && ./build.sh -m dev -o macosarm
446+
run: |
447+
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
448+
chmod +x build.sh && ./build.sh -m dev -o macosarm
439449
- name: Fix permissions
440450
run: sudo xattr -cr ./eclipse/Eclipse.app
441451
- name: Upload artifact
@@ -453,7 +463,7 @@ jobs:
453463
run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)."
454464
- name: Install dependencies
455465
run: |
456-
brew install p7zip coreutils grep wget curl
466+
brew install p7zip coreutils grep wget curl gsed
457467
- name: Check out repository code
458468
uses: actions/checkout@v4
459469
- name: Download splash image
@@ -473,7 +483,9 @@ jobs:
473483
with:
474484
name: com.seeq.eclipse.importprojects.jar
475485
- name: Run build script
476-
run: chmod +x build.sh && ./build.sh -m hipedev -o macosarm
486+
run: |
487+
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
488+
chmod +x build.sh && ./build.sh -m hipedev -o macosarm
477489
- name: Fix permissions
478490
run: sudo xattr -cr ./eclipse/Eclipse.app
479491
- name: Upload artifact

build.sh

+34-2
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,29 @@ remove_update_sites () {
199199
rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_METADATA
200200
}
201201

202+
# Removes broken org.apache.commons.logging JAR from plug-ins
203+
remove_broken_commons_logging () {
204+
log "Removes broken org.apache.commons.logging JAR from plug-ins."
205+
rm $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar
206+
# force org.eclipse.equinox to take correct JAR into account
207+
# org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false
208+
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
209+
# org.apache.commons.logging,1.2.0.v20180409-1502,plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar,4,false
210+
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
211+
}
212+
213+
# Copies the non-broken org.apache.commons.logging JAR from plug-ins
214+
save_non_broken_commons_logging () {
215+
log "Save non-broken org.apache.commons.logging JAR from plug-ins."
216+
cp $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.jar /tmp/org.apache.commons.logging_1.2.0.jar
217+
}
218+
219+
# Restores the non-broken org.apache.commons.logging JAR to plug-ins
220+
restore_non_broken_commons_logging () {
221+
log "Restores the non-broken org.apache.commons.logging JAR from plug-ins."
222+
cp /tmp/org.apache.commons.logging_1.2.0.jar $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.jar
223+
rm /tmp/org.apache.commons.logging_1.2.0.jar
224+
}
202225

203226
#
204227
# Script
@@ -231,7 +254,7 @@ setup_emoflon_headless_local_updatesite
231254
log "Clean-up Eclipse folder and extract downloaded archive."
232255
rm -rf ./eclipse/*
233256
if [[ "$OS" = "linux" ]]; then
234-
tar -xzf eclipse-modeling-$VERSION-R-linux-gtk-x86_64.tar.gz
257+
tar -xzf eclipse-modeling-$VERSION-R-linux-gtk-x86_64.tar.gz --warning=no-unknown-keyword
235258
elif [[ "$OS" = "windows" ]]; then
236259
unzip -qq -o eclipse-modeling-$VERSION-R-win32-x86_64.zip
237260
elif [[ "$OS" = "macos" ]]; then
@@ -247,14 +270,17 @@ fi
247270
# Install global Eclipse settings from config file
248271
install_global_eclipse_settings
249272

273+
# Save non-broken org.apache.commons.logging JAR from plug-ins
274+
save_non_broken_commons_logging
275+
250276
log "Install Eclipse plug-ins."
251277
for p in ${ORDER[@]}; do
252278
# Check if eMoflon packages must be skipped (for dev builds).
253279
if [[ "$p" = "emoflon" ]] && [[ $INSTALL_EMOFLON -eq 0 ]]; then
254280
log "Skipping plug-in: $p."
255281
continue
256282
fi
257-
283+
258284
# Check if Dark Theme packages must be skipped (for CI builds = completely headless).
259285
if [[ "$p" = "theme" ]] && [[ $SKIP_THEME -eq 1 ]]; then
260286
log "Skipping plug-in: $p."
@@ -291,6 +317,12 @@ else
291317
chmod +x splash.sh && ./splash.sh deploy $VERSION $ECLIPSE_BASE_PATH
292318
fi
293319

320+
# Remove broken org.apache.commons.logging JAR
321+
remove_broken_commons_logging
322+
323+
# Restore non-broken org.apache.commons.logging JAR
324+
restore_non_broken_commons_logging
325+
294326
log "Clean-up old archives and create new archive."
295327
rm -f ./$OUTPUT_FILE
296328
zip -q -r $OUTPUT_FILE eclipse

0 commit comments

Comments
 (0)