Uploaded image for project: 'Hippo Site Toolkit 2'
  1. Hippo Site Toolkit 2
  2. HSTTWO-3840

${project.version}, ${project.groupId} and ${project.artifactId} do not get replaced in page-composer artifact during build

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.3
    • Component/s: None
    • Labels:
      None
    • Similar issues:
    • Processed by team:
      Platform
    • Sprint:
      Platform Sprint 141

      Description

      Note that also the id 'annotationJsonSerializer' in SpringComponentManager-pagecomposer.xml is duplicate with 'annotationJsonSerializer' in SpringComponentManager-cmsrest.xml : That is tricky. Let's give it a different name.

      Some more background: In HSTTWO-3664

              <bean class="com.fasterxml.jackson.core.util.VersionUtil" factory-method="parseVersion">
              <constructor-arg value="${project.version}" />
              <constructor-arg value="${project.groupId}" />
              <constructor-arg value="${project.artifactId}" />
            </bean>
      

      got added to SpringComponentManager-pagecomposer.xml. This was copied from SpringComponentManager-cmsrest.xml which has something similar. However, the cms-rest/pom.xml has:

      <resources>
            <resource>
              <directory>src/main/resources</directory>
              <filtering>true</filtering>
            </resource>
          </resources>
      

      which is missing in page-composer/pom.xml : As a result, the built jar for the page-composer contains

      ${project.version}, ${project.groupId} and ${project.artifactId}
      

      Normally this should not matter because we have:

      <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders" value="true" />
        <property name="systemPropertiesModeName"
      value="SYSTEM_PROPERTIES_MODE_FALLBACK" />
        <property name="location"
      value="classpath:/org/hippoecm/hst/site/container/SpringComponentManager.properties"
      />
      </bean>
      

      However, if someone overrides this or for some reason has ignoreUnresolvablePlaceholders=false, the HST spring component manager won't start up. There seems to be a customer having this problem

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                aschrijvers Ard Schrijvers
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: