Fixing the buildSystem Error When Installing SAP Commerce 2205 cx Recipe on Windows 11

2023/04/09

As of 2023-04-09 (Sunday), the Using the Installer Recipes guide for installing the SAP Commerce 2205 cx recipe on Windows 11 does not work properly.

When running the “install initialize” step, an error would be displayed:

BUILD FAILED
C:\cx2\hybris\bin\platform\build.xml:13: The following error occurred while executing this line:
C:\cx2\hybris\bin\platform\resources\ant\compiling.xml:95: The following error occurred while executing this line:
C:\cx2\hybris\bin\platform\resources\ant\compiling.xml:153: The following error occurred while executing this line:
C:\cx2\hybris\bin\platform\resources\ant\util.xml:13: The following error occurred while executing this line:
C:\cx2\hybris\bin\platform\resources\ant\compiling.xml:160: The following error occurred while executing this line:
C:\cx2\hybris\bin\platform\resources\ant\compiling.xml:360: The following error occurred while executing this line:
C:\cx2\hybris\bin\modules\platform\groovynature\buildcallbacks.xml:33: Error running forked groovyc.

Total time: 9 minutes 45 seconds

> Task :recipes:cx:buildSystem FAILED
:recipes:cx:buildSystem (Thread[Execution worker for ':' Thread 2,5,main]) completed. Took 9 mins 46.11 secs.

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\cx2\installer\recipes\cx\build.gradle' line: 603

* What went wrong:
Execution failed for task ':recipes:cx:buildSystem'.
> external process returned non-zero exit code, command: [cmd, /c, set "ANT_OPTS=-Xmx2g -Dfile.encoding=UTF-8 -Dpolyglot.js.nashorn-compat=true -Dpolyglot.engine.WarnInterpreterOnly=false --add-exports java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED --add-exports java.xml/com.sun.org.apache.xpath.internal.objects=ALL-UNNAMED" & set "PLATFORM_HOME=C:\cx2\hybris\bin\platform" & set "ANT_HOME=C:\cx2\hybris\bin\platform\apache-ant" & set "PATH=C:\cx2\hybris\bin\platform\apache-ant\bin;%PATH%" & ant clean all]

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10m 9s
3 actionable tasks: 3 executed
Watched directory hierarchies: [C:\cx2\installer]
Problem with java process - finished with non-zero exit code (1)

The fix, before starting the setup and initialize process, is to create a “custom.properties” file under “installer\customconfiguration” with the following properties:

initialpassword.admin=changeThisAdminPassword!8
build.parallel=false
b2bocctests.groovyc.fork=false
b2bpunchoutocctests.groovyc.fork=false
configurablebundleocctests.groovyc.fork=false
customerticketingocctests.groovyc.fork=false
textfieldconfiguratortemplateocctests.groovyc.fork=false
odata2webservices.groovyc.fork=false
integrationbackoffice.groovyc.fork=false
integrationbackofficetest.groovyc.fork=false
webhookbackoffice.groovyc.fork=false
odata2webservicesfeaturetests.groovyc.fork=false
sapproductconfigfacades.groovyc.fork=false
sapproductconfigocctests.groovyc.fork=false
commercewebservicestests.groovyc.fork=false

NOTE: Disabling groovyc Forking for Selected Extensions is missing the “commercewebservicestests.groovyc.fork” configuration, and this is what causes the intialization process for SAP Commerce 2205.10 cx recipe to fail.

The configuration works with this set-up:

  • Operating System: Windows 11 Home 22H2
  • Java: SapMachine 17 (version 17.0.6+0-LTS, as of 2023-09-04) > https://sap.github.io/SapMachine/
  • SAP Commerce 2205.10 (CXCOMM220500P_10-80006942.ZIP is the latest, as of 2023-09-04)

This fix has also been shared on SAP Answers: groovyc errors on ant clean all with SAP Commerce 2205


Initial Thoughts on Mermaid JS, an open-source tool for Software Diagram as Code

2023/04/02

For the longest time, I’ve been annoyed at not having access to $$$ Microsoft Visio or Visual Paradigm for creating software diagrams like Class Diagrams or Entity-Relationship Diagrams. Some IDEs have built-in plug-ins that can generate diagrams based on existing code, but they tend to contain other information that are not so important when I want to highlight certain items only. So, I usually end up using Microsoft Excel or Microsoft PowerPoint.

I decided to test Mermaid JS (version 10.0.2, as of 2023-04-02), a JavaScript-based open-source tool for “Software Diagram as Code”: https://mermaid.js.org/. It’s not really limited to software diagrams, since it can also support other diagrams like Gantt Chart, Pie Chart, Mind Map, etc. For the code part, Mermaid JS diagrams are created using Markdown, a markup language.

Below is an example of an Entity-Relationship Diagram I created using SAP Commerce Cloud entities related to Product data models. This is using IntelliJ IDEA with the Mermaid plug-in installed. The ArjanCodes video I share later uses Visual Studio Code IDE. The IDE shows the code at the left side, which is automatically rendered at the right side when the changes are saved.

After watching a YouTube video by ArjanCodes – Mermaid JS: Finally There’s A Great UML & Diagram Drawing Tool – I share my initial thoughts:

  • Mermaid JS looks good enough for the basics I need: Class Diagram, Entity-Relationship Diagram, Sequence Diagram, and Flow Chart.
  • It could be a challenge to use if you’re used to paragraph-like pseudocode. So, you’re better off with Microsft Word or Microsoft Excel. We’ve all been there, right?
  • Sequence Diagrams for complex scenarios could be challenging (again) and look messy and difficult to refactor. I imagine you’d have to visualize the entire flow in your mind first before you write the design down, since you cannot visually create the items or relationships you need at the start.
  • I’m not OCD, but when I used Microsft Excel, I’d spend some time resizing, realigning, or rearranging items in diagrams. Mermaid JS does this for you automatically. But, that’s also it’s downside, since you can’t reposition the boxes to exactly where you want them.
  • The custom Markdown syntax can be confusing, since different diagrams can have different syntax. On the bright side, it’s all code/text. So, you can push the code to your source code repository. Other repositories like GitHub have features / plug-ins that can visually render these code. Neat.

Overall, Mermaid JS looks promising, and I’ll be exploring it more soon. Plus, it’s FREE!

Other references: