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