Skip to content

Commit 70d9261

Browse files
java 17: build upgrade
1 parent 5b9d255 commit 70d9261

6 files changed

Lines changed: 30 additions & 164 deletions

File tree

.github/workflows/build-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
java_version: [1.8, 11, 15, 17]
11+
java_version: [17]
1212
os: [ubuntu-latest, windows-latest, macOS-latest]
1313

1414
steps:

handlebars-helpers/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<dependency>
3131
<groupId>joda-time</groupId>
3232
<artifactId>joda-time</artifactId>
33-
<version>2.12.0</version>
33+
<version>2.12.7</version>
3434
<optional>true</optional>
3535
</dependency>
3636

handlebars/pom.xml

Lines changed: 9 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<plugin>
2222
<groupId>org.apache.maven.plugins</groupId>
2323
<artifactId>maven-shade-plugin</artifactId>
24-
<version>3.2.4</version>
24+
<version>3.5.2</version>
2525
<executions>
2626
<execution>
2727
<id>standalone</id>
@@ -167,6 +167,12 @@
167167
<artifactId>slf4j-api</artifactId>
168168
</dependency>
169169

170+
<dependency>
171+
<groupId>org.openjdk.nashorn</groupId>
172+
<artifactId>nashorn-core</artifactId>
173+
<version>${nashorn.version}</version>
174+
</dependency>
175+
170176
<!-- Servlet API -->
171177
<dependency>
172178
<groupId>javax.servlet</groupId>
@@ -216,8 +222,8 @@
216222
</dependencies>
217223

218224
<properties>
219-
<antlr-version>4.9.3</antlr-version>
220-
<nashorn.version>15.3</nashorn.version>
225+
<antlr-version>4.13.1</antlr-version>
226+
<nashorn.version>15.4</nashorn.version>
221227
</properties>
222228

223229
<profiles>
@@ -279,133 +285,5 @@
279285
</plugins>
280286
</build>
281287
</profile>
282-
283-
<!-- Range jdk version doesn't work, have to set each jdk -->
284-
<profile>
285-
<id>nashorn9</id>
286-
<activation>
287-
<jdk>9</jdk>
288-
</activation>
289-
<dependencies>
290-
<!-- Nashorn JS engine -->
291-
<dependency>
292-
<groupId>org.openjdk.nashorn</groupId>
293-
<artifactId>nashorn-core</artifactId>
294-
<version>${nashorn.version}</version>
295-
</dependency>
296-
</dependencies>
297-
</profile>
298-
<profile>
299-
<id>nashorn10</id>
300-
<activation>
301-
<jdk>10</jdk>
302-
</activation>
303-
<dependencies>
304-
<!-- Nashorn JS engine -->
305-
<dependency>
306-
<groupId>org.openjdk.nashorn</groupId>
307-
<artifactId>nashorn-core</artifactId>
308-
<version>${nashorn.version}</version>
309-
</dependency>
310-
</dependencies>
311-
</profile>
312-
<profile>
313-
<id>nashorn11</id>
314-
<activation>
315-
<jdk>11</jdk>
316-
</activation>
317-
<dependencies>
318-
<!-- Nashorn JS engine -->
319-
<dependency>
320-
<groupId>org.openjdk.nashorn</groupId>
321-
<artifactId>nashorn-core</artifactId>
322-
<version>${nashorn.version}</version>
323-
</dependency>
324-
</dependencies>
325-
</profile>
326-
<profile>
327-
<id>nashorn12</id>
328-
<activation>
329-
<jdk>12</jdk>
330-
</activation>
331-
<dependencies>
332-
<!-- Nashorn JS engine -->
333-
<dependency>
334-
<groupId>org.openjdk.nashorn</groupId>
335-
<artifactId>nashorn-core</artifactId>
336-
<version>${nashorn.version}</version>
337-
</dependency>
338-
</dependencies>
339-
</profile>
340-
<profile>
341-
<id>nashorn13</id>
342-
<activation>
343-
<jdk>13</jdk>
344-
</activation>
345-
<dependencies>
346-
<!-- Nashorn JS engine -->
347-
<dependency>
348-
<groupId>org.openjdk.nashorn</groupId>
349-
<artifactId>nashorn-core</artifactId>
350-
<version>${nashorn.version}</version>
351-
</dependency>
352-
</dependencies>
353-
</profile>
354-
<profile>
355-
<id>nashorn14</id>
356-
<activation>
357-
<jdk>14</jdk>
358-
</activation>
359-
<dependencies>
360-
<!-- Nashorn JS engine -->
361-
<dependency>
362-
<groupId>org.openjdk.nashorn</groupId>
363-
<artifactId>nashorn-core</artifactId>
364-
<version>${nashorn.version}</version>
365-
</dependency>
366-
</dependencies>
367-
</profile>
368-
<profile>
369-
<id>nashorn15</id>
370-
<activation>
371-
<jdk>15</jdk>
372-
</activation>
373-
<dependencies>
374-
<!-- Nashorn JS engine -->
375-
<dependency>
376-
<groupId>org.openjdk.nashorn</groupId>
377-
<artifactId>nashorn-core</artifactId>
378-
<version>${nashorn.version}</version>
379-
</dependency>
380-
</dependencies>
381-
</profile>
382-
<profile>
383-
<id>nashorn16</id>
384-
<activation>
385-
<jdk>16</jdk>
386-
</activation>
387-
<dependencies>
388-
<!-- Nashorn JS engine -->
389-
<dependency>
390-
<groupId>org.openjdk.nashorn</groupId>
391-
<artifactId>nashorn-core</artifactId>
392-
<version>${nashorn.version}</version>
393-
</dependency>
394-
</dependencies>
395-
</profile>
396-
<profile>
397-
<id>nashorn17</id>
398-
<activation>
399-
<jdk>17</jdk>
400-
</activation>
401-
<dependencies>
402-
<!-- Nashorn JS engine -->
403-
<dependency>
404-
<groupId>org.openjdk.nashorn</groupId>
405-
<artifactId>nashorn-core</artifactId>
406-
<version>${nashorn.version}</version>
407-
</dependency>
408-
</dependencies>
409-
</profile>
410288
</profiles>
411289
</project>

handlebars/src/main/java/com/github/jknack/handlebars/internal/FastStringWriter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*/
1818
package com.github.jknack.handlebars.internal;
1919

20-
import org.apache.commons.text.TextStringBuilder;
21-
2220
import java.io.IOException;
2321
import java.io.Writer;
2422

@@ -42,7 +40,7 @@ class FastStringWriter extends Writer {
4240
/**
4341
* The internal buffer.
4442
*/
45-
private TextStringBuilder buffer = new TextStringBuilder(BUFFER_SIZE);
43+
private StringBuilder buffer = new StringBuilder(BUFFER_SIZE);
4644

4745
@Override
4846
public Writer append(final char c) throws IOException {

handlebars/src/test/java/com/github/jknack/handlebars/internal/FastStringWriterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void writeString() throws IOException {
3737
@Test
3838
public void writeStringWithOffsetAndLength() throws IOException {
3939
Writer writer = new FastStringWriter();
40-
writer.write("hello", 1, 3);
40+
writer.write("hello", 1, 4);
4141
assertEquals("ell", writer.toString());
4242
IOUtils.closeQuietly(writer);
4343
}

pom.xml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
<dependency>
6464
<groupId>org.apache.commons</groupId>
6565
<artifactId>commons-lang3</artifactId>
66-
<version>3.12.0</version>
66+
<version>3.14.0</version>
6767
</dependency>
6868

6969
<dependency>
7070
<groupId>org.apache.commons</groupId>
7171
<artifactId>commons-text</artifactId>
72-
<version>1.10.0</version>
72+
<version>1.11.0</version>
7373
</dependency>
7474

7575
<dependency>
@@ -150,10 +150,10 @@
150150
<!-- We're on 1.8 -->
151151
<plugin>
152152
<artifactId>maven-compiler-plugin</artifactId>
153-
<version>3.8.1</version>
153+
<version>3.12.1</version>
154154
<configuration>
155-
<source>1.8</source>
156-
<target>1.8</target>
155+
<source>17</source>
156+
<target>17</target>
157157
</configuration>
158158
</plugin>
159159

@@ -166,7 +166,7 @@
166166
<plugin>
167167
<groupId>org.apache.maven.plugins</groupId>
168168
<artifactId>maven-surefire-plugin</artifactId>
169-
<version>2.22.2</version>
169+
<version>3.2.5</version>
170170
<configuration>
171171
<!-- set default locale of the test JVM to en_US because some tests expect e.g. the dollar sign as currency symbol -->
172172
<argLine>-Duser.language=en -Duser.country=US</argLine>
@@ -181,21 +181,11 @@
181181
</configuration>
182182
</plugin>
183183

184-
<!-- Eclipse setup -->
185-
<plugin>
186-
<groupId>org.apache.maven.plugins</groupId>
187-
<artifactId>maven-eclipse-plugin</artifactId>
188-
<version>2.10</version>
189-
<configuration>
190-
<downloadSources>true</downloadSources>
191-
</configuration>
192-
</plugin>
193-
194184
<!-- Checkstyle -->
195185
<plugin>
196186
<groupId>org.apache.maven.plugins</groupId>
197187
<artifactId>maven-checkstyle-plugin</artifactId>
198-
<version>3.1.2</version>
188+
<version>3.3.1</version>
199189
<configuration>
200190
<consoleOutput>true</consoleOutput>
201191
<configLocation>src/etc/checkstyle.xml</configLocation>
@@ -245,7 +235,7 @@
245235
<plugin>
246236
<groupId>org.sonatype.plugins</groupId>
247237
<artifactId>nexus-staging-maven-plugin</artifactId>
248-
<version>1.6.8</version>
238+
<version>1.6.13</version>
249239
<extensions>true</extensions>
250240
<configuration>
251241
<serverId>ossrh</serverId>
@@ -256,7 +246,7 @@
256246
<plugin>
257247
<groupId>org.apache.maven.plugins</groupId>
258248
<artifactId>maven-deploy-plugin</artifactId>
259-
<version>3.0.0-M1</version>
249+
<version>3.1.1</version>
260250
</plugin>
261251

262252
</plugins>
@@ -270,7 +260,7 @@
270260
<plugin>
271261
<groupId>org.apache.maven.plugins</groupId>
272262
<artifactId>maven-surefire-plugin</artifactId>
273-
<version>2.22.2</version>
263+
<version>3.2.5</version>
274264
<inherited>false</inherited>
275265
<configuration>
276266
<includes>
@@ -296,7 +286,7 @@
296286
<plugin>
297287
<groupId>org.codehaus.mojo</groupId>
298288
<artifactId>exec-maven-plugin</artifactId>
299-
<version>3.0.0</version>
289+
<version>3.2.0</version>
300290
<executions>
301291
<execution>
302292
<phase>initialize</phase>
@@ -326,7 +316,7 @@
326316
<plugin>
327317
<groupId>org.apache.maven.plugins</groupId>
328318
<artifactId>maven-source-plugin</artifactId>
329-
<version>3.2.1</version>
319+
<version>3.3.0</version>
330320
<executions>
331321
<execution>
332322
<id>attach-sources</id>
@@ -341,7 +331,7 @@
341331
<plugin>
342332
<groupId>org.apache.maven.plugins</groupId>
343333
<artifactId>maven-javadoc-plugin</artifactId>
344-
<version>3.3.1</version>
334+
<version>3.6.3</version>
345335
<executions>
346336
<execution>
347337
<id>attach-javadocs</id>
@@ -356,7 +346,7 @@
356346
<plugin>
357347
<groupId>org.apache.maven.plugins</groupId>
358348
<artifactId>maven-gpg-plugin</artifactId>
359-
<version>3.0.1</version>
349+
<version>3.1.0</version>
360350
<executions>
361351
<execution>
362352
<id>sign-artifacts</id>
@@ -380,10 +370,10 @@
380370
<!-- Encoding UTF-8 -->
381371
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
382372
<jackson2-version>2.14.0-rc2</jackson2-version>
383-
<jacoco.version>0.8.7</jacoco.version>
373+
<jacoco.version>0.8.11</jacoco.version>
384374
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssa</maven.build.timestamp.format>
385375
<timestamp>${maven.build.timestamp}</timestamp>
386-
<maven.compiler.source>1.8</maven.compiler.source>
387-
<maven.compiler.target>1.8</maven.compiler.target>
376+
<maven.compiler.source>17</maven.compiler.source>
377+
<maven.compiler.target>17</maven.compiler.target>
388378
</properties>
389379
</project>

0 commit comments

Comments
 (0)