Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/java21 #173

Merged
merged 4 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 12 additions & 14 deletions .blaze/blaze.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void generate() {

@Task(order=3, value="Demo of rendering a template into a string.")
public void render() {
exec("mvn", "-pl", "rocker-test-java6", "-am", "test", "-Pexec-java6test",
exec("mvn", "-pl", "rocker-test-template", "-am", "test", "-Pexec-java6test",
"-DskipTests=true", "-Dexec.classpathScope=test",
"-Dexec.mainClass=com.fizzed.rocker.bin.RenderMain").run();
}
Expand All @@ -52,24 +52,23 @@ public void hot_reload() {

@Task(order=5, value="Demo of asynchronously sending a template in an Undertow-based HTTP server.")
public void undertow() {
exec("mvn", "-pl", "rocker-test-java8", "-am", "test", "-Pexec-java8test",
exec("mvn", "-pl", "rocker-test-template", "-am", "test", "-Pexec-java8test",
"-DskipTests=true", "-Dexec.classpathScope=test",
"-Dexec.mainClass=com.fizzed.rocker.bin.UndertowMain").run();
}

@Task(order=6, value="Demo of asynchronously sending a template in an Netty-based HTTP server.")
public void netty() {
exec("mvn", "-pl", "rocker-test-java8", "-am", "test", "-Pexec-java8test",
exec("mvn", "-pl", "rocker-test-template", "-am", "test", "-Pexec-java8test",
"-DskipTests=true", "-Dexec.classpathScope=test",
"-Dexec.mainClass=com.fizzed.rocker.bin.NettyMain").run();
}

@Task(order=99, value="Use by maintainers only. Updates REAME.md with latest git tag.")
public void after_release() throws Exception {
Integer exitValue
= exec("git", "diff-files", "--quiet")
.exitValues(0,1)
.run();
int exitValue = (int)exec("git", "diff-files", "--quiet")
.exitValues(0,1)
.run();

if (exitValue == 1) {
fail("Uncommitted changes in git. Commit them first then re-run this task");
Expand All @@ -83,13 +82,12 @@ public void after_release() throws Exception {

private String latest_tag() {
// get latest tag and trim off "v"
String latestTag
= exec("git", "describe", "--abbrev=0", "--tags")
.pipeOutput(Streamables.captureOutput())
.runCaptureOutput()
.toString()
.trim()
.substring(1);
String latestTag = exec("git", "describe", "--abbrev=0", "--tags")
.pipeOutput(Streamables.captureOutput())
.runCaptureOutput()
.toString()
.trim()
.substring(1);

return latestTag;
}
Expand Down
64 changes: 64 additions & 0 deletions .blaze/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>blaze</groupId>
<artifactId>rocker-blaze</artifactId>
<version>0.0.1</version>

<!--
THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT BY HAND!

Edit or create a <blaze-script>.conf file, and re-run the generate-maven-project command.
-->

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.install.skip>true</maven.install.skip>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<build>
<sourceDirectory>${project.basedir}</sourceDirectory>
</build>
<dependencies>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>blaze-ivy</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>blaze-core</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.zeroturnaround</groupId>
<artifactId>zt-exec</artifactId>
<version>1.12</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java 19
name: Java 21
on:
- push
- workflow_dispatch
Expand All @@ -8,10 +8,10 @@ jobs:
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
- name: Set up Azul JDK 19
- name: Set up Azul JDK 21
uses: actions/setup-java@v3
with:
java-version: 19
java-version: 21
distribution: 'zulu'
cache: 'maven'
- name: Test in Maven
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Rocker Templates by Fizzed
==========================

## TBD

- Java 8 is now minimum supported version (Java 21 will no longer compile < 8)
- Merged rocker-test-java7 and rocker-test-java8 modules together into rocker-test-template
- Blaze build system updated to v1.5.1 (which works on Java 21)
- CI automated tests for Java 21

#### 1.4.0 - 2023-10-11

- Java 6 support dropped. Java 7 is now minimum.
Expand Down
Binary file modified blaze.jar
Binary file not shown.
30 changes: 3 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,24 @@
<main.java.package />
<slf4j.version>1.7.7</slf4j.version>
<antlr.version>4.5.3</antlr.version>
<java.version>1.7</java.version>
<java.version>1.8</java.version>
<license.skip>true</license.skip>
<!-- netbeans specific -->
<netbeans.compile.on.save>false</netbeans.compile.on.save>
<!-- workaround travis ci maven version requirement -->
<maven.enforce.version>3.2.5</maven.enforce.version>
</properties>

<!-- jdk 7+, profile below for java 8 stuff -->
<modules>
<module>rocker-runtime</module>
<module>rocker-compiler</module>
<module>rocker-maven-plugin</module>
<module>rocker-gradle-plugin</module>
<module>rocker-test-java7</module>
<module>rocker-test-template</module>
<module>rocker-test-reload</module>
<module>rocker-bom</module>
</modules>

<!-- things to do if running on JDK 8 -->
<profiles>
<profile>
<id>java8-settings</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
<modules>
<module>rocker-runtime</module>
<module>rocker-compiler</module>
<module>rocker-maven-plugin</module>
<module>rocker-gradle-plugin</module>
<module>rocker-test-java7</module>
<module>rocker-test-java8</module>
<module>rocker-test-reload</module>
<module>rocker-bom</module>
</modules>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -164,7 +140,7 @@
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<version>1.3.18.Final</version>
<version>2.2.25.Final</version>
<scope>test</scope>
</dependency>

Expand Down
107 changes: 0 additions & 107 deletions rocker-test-java8/pom.xml

This file was deleted.

Loading