Skip to content

Kedos build of Thymeleaf

The storefront renders with a Kedos build of Thymeleaf (3.1.7.KEDOS-n), published to GitHub Packages for KedosConsultingLtd/thymeleaf. The group id is still org.thymeleaf, so only thymeleaf.version in the root pom.xml changes.

Access

GitHub Packages needs a token with read:packages, even for public repositories.

Local builds. Add these to ~/devEnv.conf; the build container writes them into its Maven settings:

KEDOS_PACKAGES_USER="your-github-username"
KEDOS_PACKAGES_TOKEN="a token with read:packages"

Maven on the host (~/.m2/settings.xml):

<server>
  <id>kedos-thymeleaf</id>
  <username>your-github-username</username>
  <password>a token with read:packages</password>
</server>

GitLab CI. ci_settings.xml and settings.xml read ${env.KEDOS_PACKAGES_USER} and ${env.KEDOS_PACKAGES_TOKEN}. Create both as masked CI/CD variables in the project. Never commit a token.

Check the build resolved it: mvn dependency:tree | grep thymeleaf shows 3.1.7.KEDOS-1 for thymeleaf and thymeleaf-spring6.

What is switched on

Setting Default Effect
Parse-time whitespace collapsing always on Blank text between tags is collapsed once, when a template is parsed (WhitespaceCollapsingDialect). Text from th:utext and IModelFactory.parse is not collapsed.
badger.thymeleaf.coalescing.enabled false Merges runs of static markup into one text event at parse time (StaticRunCoalescingDialect). BadgerDialect is trusted because its only element model processor (bdgr:strip-whitespace) reads just its own element. Check the start-up log for Static-run coalescing is disabled.
badger.thymeleaf.fail-on-missing-message false false prints ??key_locale?? for a missing #{key}, as before the upgrade. true fails the render; the test profiles use it. #messages.msgOrNull(...) is null for a missing key either way.

The production message source throws for a missing key (neither it nor its parent bundle uses the key as the default message), which is why the setting matters.

Checking a template engine change

PatternRenderGoldenTest renders every pattern-library fixture in every case and theme, and compares a hash of each with web-mvc/src/test/resources/golden/pattern-render-hashes.txt. Whitespace is normalised, and ids built from the clock and the platform version on asset URLs (bdgr.css?0.99.0) are masked, so only real output changes fail it, not a release's version bump. It also runs with coalescing on. After an intended template change, rewrite the file by running the test with GOLDEN_WRITE_TO set to its path. It is tagged golden.