Skip to content

Commit 8c60d40

Browse files
authored
Merge pull request #2739 from vert-x3/jte-test
Bump jte version to 3.2.1
2 parents c01d357 + 7807e6b commit 8c60d40

File tree

4 files changed

+120
-48
lines changed

4 files changed

+120
-48
lines changed

.github/workflows/ci-4.x.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- os: ubuntu-latest
1111
jdk: 8
1212
- os: ubuntu-latest
13-
jdk: 17
13+
jdk: 21
1414
- os: windows-latest
1515
jdk: 8
1616
uses: ./.github/workflows/ci.yml

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
required: true
77
type: string
88
jdk:
9-
default: 8
9+
required: true
1010
type: string
1111
os:
1212
default: ubuntu-latest
@@ -21,9 +21,14 @@ jobs:
2121
with:
2222
ref: ${{ inputs.branch }}
2323
- name: Install JDK
24-
uses: actions/setup-java@v2
24+
uses: actions/setup-java@v4
2525
with:
26-
java-version: ${{ inputs.jdk }}
26+
java-version: |
27+
8
28+
11
29+
21
2730
distribution: temurin
31+
- name: Set JAVA_HOME
32+
run: echo "JAVA_HOME=$JAVA_HOME_${{ inputs.jdk }}_X64" >> $GITHUB_ENV
2833
- name: Run tests
2934
run: mvn -s .github/maven-ci-settings.xml clean verify -B

vertx-template-engines/vertx-web-templ-jte/pom.xml

Lines changed: 109 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<artifactId>vertx-web-templ-jte</artifactId>
1313

1414
<properties>
15-
<jte.version>2.3.2</jte.version>
15+
<jte.version>3.2.1</jte.version>
1616
</properties>
1717

1818
<dependencies>
@@ -35,53 +35,119 @@
3535

3636
<build>
3737
<plugins>
38-
<plugin>
39-
<groupId>org.apache.maven.plugins</groupId>
40-
<artifactId>maven-surefire-plugin</artifactId>
41-
<executions>
42-
<execution>
43-
<id>default-test</id>
44-
<configuration>
45-
<useModulePath>false</useModulePath>
46-
</configuration>
47-
</execution>
48-
<execution>
49-
<id>jpms-test</id>
50-
<goals>
51-
<goal>test</goal>
52-
</goals>
53-
<configuration>
54-
<useModulePath>true</useModulePath>
55-
<includes>
56-
<include>**/JteCompiledTemplateEngineTest.java</include>
57-
</includes>
58-
</configuration>
59-
</execution>
60-
</executions>
61-
</plugin>
62-
<plugin>
63-
<groupId>gg.jte</groupId>
64-
<artifactId>jte-maven-plugin</artifactId>
65-
<version>${jte.version}</version>
66-
<configuration>
67-
<sourceDirectory>${project.basedir}/src/test/templates</sourceDirectory>
68-
<targetDirectory>${project.build.directory}/test-classes</targetDirectory>
69-
<contentType>Html</contentType>
70-
</configuration>
71-
<executions>
72-
<execution>
73-
<phase>process-test-classes</phase>
74-
<goals>
75-
<goal>precompile</goal>
76-
</goals>
77-
</execution>
78-
</executions>
79-
</plugin>
8038
<plugin>
8139
<groupId>org.apache.maven.plugins</groupId>
8240
<artifactId>maven-shade-plugin</artifactId>
8341
</plugin>
8442
</plugins>
8543
</build>
8644

45+
<!-- Java 11 => use Maven Toolchain to compile this module with JDK 17
46+
The config file .m2/toolchains.xml is needed with this content
47+
48+
<toolchains>
49+
<toolchain>
50+
<type>jdk</type>
51+
<provides>
52+
<id>Java17</id>
53+
<version>17</version>
54+
</provides>
55+
<configuration>
56+
<jdkHome>/PATH/TO/JDK/17</jdkHome>
57+
</configuration>
58+
</toolchain>
59+
</toolchains>
60+
-->
61+
<profiles>
62+
<profile>
63+
<id>Java11</id>
64+
<activation>
65+
<jdk>[11,17)</jdk>
66+
</activation>
67+
<build>
68+
<plugins>
69+
<plugin>
70+
<groupId>org.apache.maven.plugins</groupId>
71+
<artifactId>maven-toolchains-plugin</artifactId>
72+
<version>1.0</version>
73+
<executions>
74+
<execution>
75+
<phase>validate</phase>
76+
<goals>
77+
<goal>toolchain</goal>
78+
</goals>
79+
</execution>
80+
</executions>
81+
<configuration>
82+
<toolchains>
83+
<jdk>
84+
<version>21</version>
85+
</jdk>
86+
</toolchains>
87+
</configuration>
88+
</plugin>
89+
<plugin>
90+
<groupId>org.apache.maven.plugins</groupId>
91+
<artifactId>maven-surefire-plugin</artifactId>
92+
<configuration>
93+
<skip>true</skip>
94+
</configuration>
95+
</plugin>
96+
</plugins>
97+
</build>
98+
</profile>
99+
<profile>
100+
<id>Java17</id>
101+
<activation>
102+
<jdk>[17,)</jdk>
103+
</activation>
104+
<build>
105+
<plugins>
106+
<plugin>
107+
<groupId>gg.jte</groupId>
108+
<artifactId>jte-maven-plugin</artifactId>
109+
<version>${jte.version}</version>
110+
<configuration>
111+
<sourceDirectory>${project.basedir}/src/test/templates</sourceDirectory>
112+
<targetDirectory>${project.build.directory}/test-classes</targetDirectory>
113+
<contentType>Html</contentType>
114+
</configuration>
115+
<executions>
116+
<execution>
117+
<phase>process-test-classes</phase>
118+
<goals>
119+
<goal>precompile</goal>
120+
</goals>
121+
</execution>
122+
</executions>
123+
</plugin>
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-surefire-plugin</artifactId>
127+
<executions>
128+
<execution>
129+
<id>default-test</id>
130+
<configuration>
131+
<useModulePath>false</useModulePath>
132+
</configuration>
133+
</execution>
134+
<execution>
135+
<id>jpms-test</id>
136+
<goals>
137+
<goal>test</goal>
138+
</goals>
139+
<configuration>
140+
<useModulePath>true</useModulePath>
141+
<includes>
142+
<include>**/JteCompiledTemplateEngineTest.java</include>
143+
</includes>
144+
</configuration>
145+
</execution>
146+
</executions>
147+
</plugin>
148+
</plugins>
149+
</build>
150+
</profile>
151+
</profiles>
152+
87153
</project>

vertx-web/src/test/java/io/vertx/ext/web/tests/handler/SlowClusterEventbusBridgeTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
package io.vertx.ext.web.tests.handler;
1313

14+
import io.vertx.core.Completable;
1415
import io.vertx.core.Promise;
1516
import io.vertx.core.Vertx;
1617
import io.vertx.core.http.*;
@@ -177,7 +178,7 @@ private static class SlowClusterManager extends WrappedClusterManager {
177178
}
178179

179180
@Override
180-
public void addRegistration(String address, RegistrationInfo registrationInfo, Promise<Void> promise) {
181+
public void addRegistration(String address, RegistrationInfo registrationInfo, Completable<Void> promise) {
181182
vertx.setTimer(1000, l -> {
182183
super.addRegistration(address, registrationInfo, promise);
183184
});

0 commit comments

Comments
 (0)