Share project created by Maven archetype for SDK 4.2 cannot be built due to malformed docker-compose.yml

Description

When the org.alfresco.maven.archetype:alfresco-share-jar-archetype (Share project with full support for lifecycle and rapid development of JARs and AMPs (Alfresco Module Packages)) is chosen for SDK 4.2 the docker-compose.yml that is built cannot be parsed as a valid yaml file.

The error reported is

ERROR: yaml.parser.ParserError: while parsing a block collection
in "/home/adf/Dev/DXC/sdk-4.2/<projectName>/target/classes/docker/docker-compose.yml", line 13, column 7 expected <block end>, but found '<scalar>'

This is because the docker-compose template found in docker/docker-compose.yml has the ${keystore.settings} variable defined, albeit commented with a # at the beginning of the line. This variable gets replaced with the value for keystore.settings defined in pom.xml. The problem is that the replacement strings do not have comment hashes. The resulting docker-compose.yml is then an invalid yaml file.

The workaround is to remove all the commented lines in the template docker-compose.yml file.

Steps to reproduce:
  1. Create a new SDK project

    1. mvn archetype:generate -Dfilter=org.alfresco:

    2. Option 5: remote -> org.alfresco.maven.archetype:alfresco-share-jar-archetype (Share project with full support for lifecycle and rapid development of JARs and AMPs……

    3. Choose V 4.2

    4. Provide package & artifactId

  2. cd into prject directory and run:

    1. run.sh build_start

Expected Behavior:
  • SDK project runs

Observed Behaviour:
  • SDK project fails to run with error:

Environment Reproduction:

SDK 4.2

Tested in SDK 4.1 and issue works

Environment

None

Testcase ID

None

Assignee

Unassigned

Reporter

wchong

Dependent Version/s

SDK 4.2

Bug Priority

Category 2