Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
73cb79d
Fix #1162 - Bump commons-lang3 to fix CVE-2025-48924
tingley Jul 18, 2025
7d49fbb
Fix typo
fatalistt Apr 12, 2025
978ec5e
Rework append for better memory efficiency
MiguelAMarcelino Jan 27, 2025
922e24a
java: remove multiple checks for JVM version
jknack Aug 7, 2025
7c2dce9
[ISSUE-996] Support includeZero option in IF Helper
clementgbcn Oct 25, 2024
65f8980
Fix invalid Java token error
chrisrueger Dec 4, 2021
275b5ec
fix(issue-1160): support named 'locale' and 'format' parameters
LeoFuso Jun 9, 2025
a5ccf61
change parsing rule to disallow multiple else statements
Dec 8, 2024
bb6beae
build: dependency upgrades
jknack Aug 7, 2025
5f3eeff
build: dependency upgrades
jknack Aug 7, 2025
63a20c4
prepare for maven release
jknack Aug 7, 2025
8bbe995
prepare for maven release
jknack Aug 7, 2025
7bebbef
prepare for maven release
jknack Aug 7, 2025
827e6bc
Java 21 ArrayList getLast is resolved by JavaBeanValueResolver
jknack Aug 7, 2025
83bd602
Add Java 21 to CI
dsvensson Jul 8, 2024
ef789e6
v4.5.0
jknack Aug 7, 2025
0108802
prepare for next development cycle
jknack Aug 7, 2025
131c734
joda: remove stupid test with special whitespace
jknack Aug 7, 2025
b8a94d3
build: update GH actions
jknack Aug 7, 2025
48a66cd
Upgrade to latest handlebars.js (4.7.9) as 4.7.7 has security issues.
campeis Apr 11, 2026
dda6469
Merge branch 'master' of github.com:jknack/handlebars.java
jmendeza Apr 15, 2026
504c297
Tests for jvm version has been removed
jmendeza Apr 16, 2026
0394b56
Merge remote-tracking branch 'campeis/update_handlebars_js_to_4_7_9'
jmendeza Apr 16, 2026
e06cd74
Update maven group id
jmendeza Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows.disabled/build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,24 @@ jobs:
strategy:
fail-fast: false
matrix:
java_version: [17]
os: [ubuntu-latest, windows-latest, macOS-latest]
jre: [17]
os: [ ubuntu-latest, windows-latest, macOS-latest ]
include:
- jre: 21
os: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Mustache Specs
run: |
git submodule update --init --recursive
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
java-version: ${{ matrix.jre }}
distribution: 'temurin'
- name: Install
run: mvn clean install -DskipTests --batch-mode --no-transfer-progress
env:
BUILD_PORT: 0
BUILD_SECURE_PORT: 0
- name: Build
run: mvn clean package --batch-mode --no-transfer-progress
env:
BUILD_PORT: 0
BUILD_SECURE_PORT: 0
16 changes: 8 additions & 8 deletions .github/workflows.disabled/maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:

jobs:
release:
name: Release on Sonatype OSS
name: Maven Central
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
Expand All @@ -24,15 +24,15 @@ jobs:
with: # running setup-java again overwrites the settings.xml
java-version: 17
distribution: 'temurin'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to Maven Central
run: mvn -pl '!tests' clean deploy -P central
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
8 changes: 4 additions & 4 deletions handlebars-caffeine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars.java</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.6.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -15,7 +15,7 @@

<dependencies>
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
</dependency>
Expand All @@ -28,7 +28,7 @@

<!-- Test dependencies -->
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
<scope>test</scope>
Expand Down
8 changes: 4 additions & 4 deletions handlebars-guava-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars.java</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.6.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -15,7 +15,7 @@

<dependencies>
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
</dependency>
Expand All @@ -29,7 +29,7 @@

<!-- Test dependencies -->
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
<scope>test</scope>
Expand Down
8 changes: 4 additions & 4 deletions handlebars-helpers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars.java</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.6.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -15,7 +15,7 @@

<dependencies>
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
</dependency>
Expand All @@ -34,7 +34,7 @@
</dependency>

<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
<scope>test</scope>
Expand Down
8 changes: 4 additions & 4 deletions handlebars-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars.java</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.6.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -14,7 +14,7 @@

<dependencies>
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
</dependency>
Expand All @@ -26,7 +26,7 @@

<!-- Test dependencies -->
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
<scope>test</scope>
Expand Down
6 changes: 3 additions & 3 deletions handlebars-maven-plugin-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars.java</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.6.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -17,7 +17,7 @@
<build>
<plugins>
<plugin>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
Expand Down
8 changes: 4 additions & 4 deletions handlebars-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars.java</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.6.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -16,7 +16,7 @@

<dependencies>
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down Expand Up @@ -77,7 +77,7 @@
</dependency>

<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
<scope>test</scope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class PrecompilePlugin extends HandlebarsPlugin {
private String output;

/** The handlebars js file. */
@Parameter(defaultValue = "/handlebars-v4.7.8.js")
@Parameter(defaultValue = "/handlebars-v4.7.9.js")
private String handlebarsJsFile;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void withAmdOutput() throws Exception {
plugin.addTemplate("c");
plugin.setAmd(true);
plugin.setProject(newProject());
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
plugin.setHandlebarsJsFile("/handlebars-v4.7.9.js");

plugin.execute();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void i18nJs() throws Exception {
plugin.setSuffix(".html");
plugin.setOutput("target/helpers-i18njs.js");
plugin.setProject(newProject());
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
plugin.setHandlebarsJsFile("/handlebars-v4.7.9.js");

plugin.execute();

Expand All @@ -57,7 +57,7 @@ public void chooseSpecificFiles() throws Exception {
plugin.addTemplate("a");
plugin.addTemplate("c");
plugin.setProject(newProject());
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
plugin.setHandlebarsJsFile("/handlebars-v4.7.9.js");

plugin.execute();

Expand All @@ -71,7 +71,7 @@ public void outputDirMustBeCreated() throws Exception {
plugin.setSuffix(".html");
plugin.setOutput("target/newdir/helpers.js");
plugin.setProject(newProject());
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
plugin.setHandlebarsJsFile("/handlebars-v4.7.9.js");

plugin.execute();
}
Expand All @@ -83,7 +83,7 @@ public void missingHelperMustBeSilent() throws Exception {
plugin.setSuffix(".html");
plugin.setOutput("target/missing-helpers.js");
plugin.setProject(newProject());
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
plugin.setHandlebarsJsFile("/handlebars-v4.7.9.js");

plugin.execute();
}
Expand All @@ -95,7 +95,7 @@ public void noFileMustBeCreatedIfNoTemplatesWereFound() throws Exception {
plugin.setSuffix(".html");
plugin.setOutput("target/no-helpers.js");
plugin.setProject(newProject());
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
plugin.setHandlebarsJsFile("/handlebars-v4.7.9.js");

plugin.execute();

Expand Down Expand Up @@ -146,7 +146,7 @@ public void mustFailOnUnExpectedException() throws Exception {
plugin.setSuffix(".html");
plugin.setOutput("target/no-helpers.js");
plugin.setProject(project);
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
plugin.setHandlebarsJsFile("/handlebars-v4.7.9.js");

plugin.execute();
});
Expand All @@ -159,7 +159,7 @@ public void fileWithRuntimeMustBeLargerThanNormalFiles() throws Exception {
withoutRT.setSuffix(".html");
withoutRT.setOutput("target/without-rt-helpers.js");
withoutRT.setProject(newProject());
withoutRT.setHandlebarsJsFile("/handlebars-v4.7.8.js");
withoutRT.setHandlebarsJsFile("/handlebars-v4.7.9.js");

withoutRT.execute();

Expand All @@ -169,7 +169,7 @@ public void fileWithRuntimeMustBeLargerThanNormalFiles() throws Exception {
withRT.setOutput("target/with-rt-helpers.js");
withRT.setRuntime("src/test/resources/handlebars.runtime.js");
withRT.setProject(newProject());
withRT.setHandlebarsJsFile("/handlebars-v4.7.8.js");
withRT.setHandlebarsJsFile("/handlebars-v4.7.9.js");

withRT.execute();

Expand All @@ -186,7 +186,7 @@ public void normalFileShouleBeLargerThanMinimizedFiles() throws Exception {
withoutRT.setSuffix(".html");
withoutRT.setOutput("target/helpers-normal.js");
withoutRT.setProject(newProject());
withoutRT.setHandlebarsJsFile("/handlebars-v4.7.8.js");
withoutRT.setHandlebarsJsFile("/handlebars-v4.7.9.js");

withoutRT.execute();

Expand All @@ -196,7 +196,7 @@ public void normalFileShouleBeLargerThanMinimizedFiles() throws Exception {
withRT.setOutput("target/helpers.min.js");
withRT.setMinimize(true);
withRT.setProject(newProject());
withRT.setHandlebarsJsFile("/handlebars-v4.7.8.js");
withRT.setHandlebarsJsFile("/handlebars-v4.7.9.js");
withRT.execute();

assertTrue(
Expand All @@ -212,7 +212,7 @@ public void partials() throws Exception {
plugin.setSuffix(".html");
plugin.setOutput("target/helpers.js");
plugin.setProject(newProject());
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
plugin.setHandlebarsJsFile("/handlebars-v4.7.9.js");

plugin.execute();

Expand Down
6 changes: 3 additions & 3 deletions handlebars-springmvc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars.java</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.6.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -15,7 +15,7 @@

<dependencies>
<dependency>
<groupId>com.github.jknack</groupId>
<groupId>org.craftercms</groupId>
<artifactId>handlebars</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ public void setFormatters(final Formatter... formatters) {
* <p>Using handlebars.js 1.x:
*
* <pre>
* Handlebars handlebars = new Handlebars().handlebarsJsFile("handlebars-v4.7.8.js");
* Handlebars handlebars = new Handlebars().handlebarsJsFile("handlebars-v4.7.9.js");
* </pre>
*
* Default handlebars.js is <code>handlebars-v4.7.8.js</code>.
* Default handlebars.js is <code>handlebars-v4.7.9.js</code>.
*
* @param location A classpath location of the handlebar.js file.
*/
Expand Down
Loading