Skip to content

Commit c8374f2

Browse files
chore(engine): bump spring dependency to version 6 (#4952)
* chore(engine): bump spring dependency to version 6 related to #4869
1 parent d14135f commit c8374f2

File tree

17 files changed

+157
-134
lines changed

17 files changed

+157
-134
lines changed

.ci/config/stage-types.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ db-unit:
3434
- 'postgresql'
3535
podSpec:
3636
cpu: 4
37-
images: ['maven:3.9.7-eclipse-temurin-11', 'postgres:17.0']
37+
images: ['maven:3.9.7-eclipse-temurin-17', 'postgres:17.0']
3838
sql-scripts:
3939
directory: 'distro/sql-script'
4040
command: 'install -Pcheck-sql,'
@@ -139,6 +139,7 @@ engine-rest-IT-embedded-wildfly26:
139139
labels:
140140
- 'rest-api'
141141
nodeLabel: 'h2'
142+
jdkVersion: 'jdk-11-0-21'
142143
engine-rest-jakarta-unit-compatibility-wildfly:
143144
directory: 'engine-rest/engine-rest-jakarta'
144145
command: 'clean install -Pwildfly-compatibility'

.ci/daily/Jenkinsfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ pipeline {
239239
cambpmConditionalRetry([
240240
agentLabel: 'h2',
241241
runSteps: {
242-
cambpmRunMavenByStageType('instance-migration', 'h2')
242+
cambpmRunMavenByStageType('instance-migration', 'h2', jdkVersion: 'jdk-11-latest')
243243
},
244244
postFailure: {
245245
cambpmPublishTestResult()
@@ -258,7 +258,7 @@ pipeline {
258258
cambpmConditionalRetry([
259259
agentLabel: 'h2',
260260
runSteps: {
261-
cambpmRunMavenByStageType('old-engine', 'h2')
261+
cambpmRunMavenByStageType('old-engine', 'h2', jdkVersion: 'jdk-11-latest')
262262
},
263263
postFailure: {
264264
cambpmPublishTestResult()
@@ -277,7 +277,7 @@ pipeline {
277277
cambpmConditionalRetry([
278278
agentLabel: 'h2',
279279
runSteps: {
280-
cambpmRunMavenByStageType('rolling-update', 'h2')
280+
cambpmRunMavenByStageType('rolling-update', 'h2', jdkVersion: 'jdk-11-latest')
281281
},
282282
postFailure: {
283283
cambpmPublishTestResult()
@@ -296,7 +296,7 @@ pipeline {
296296
cambpmConditionalRetry([
297297
agentLabel: 'h2',
298298
runSteps: {
299-
cambpmRunMavenByStageType('large-data-tests', 'h2')
299+
cambpmRunMavenByStageType('large-data-tests', 'h2', jdkVersion: 'jdk-17-latest')
300300
},
301301
postFailure: {
302302
cambpmPublishTestResult()

.ci/sidetrack/Jenkinsfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pipeline {
1111
environment {
1212
LOGGER_LOG_LEVEL = 'DEBUG'
1313
MAVEN_VERSION = 'maven-3.8-latest'
14-
DEF_JDK_VERSION = 'jdk-11-latest'
14+
DEF_JDK_VERSION = 'jdk-17-latest'
1515
}
1616
parameters {
1717
booleanParam name: 'TRIGGERED_BY_UPSTREAM', defaultValue: false, description: 'Is the current build triggered in the scope of an upstream pipeline (pull request or default branch)'

Jenkinsfile

+32-12
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pipeline {
1313
environment {
1414
LOGGER_LOG_LEVEL = 'DEBUG'
1515
MAVEN_VERSION = 'maven-3.8-latest'
16-
DEF_JDK_VERSION = 'jdk-11-latest'
16+
DEF_JDK_VERSION = 'jdk-17-latest'
1717
}
1818
options {
1919
buildDiscarder(logRotator(numToKeepStr: '5'))
@@ -168,7 +168,7 @@ pipeline {
168168
cambpmConditionalRetry([
169169
agentLabel: 'h2',
170170
runSteps: {
171-
cambpmRunMavenByStageType('db-unit', 'h2')
171+
cambpmRunMavenByStageType('db-unit', 'h2', jdkVersion: 'jdk-17-latest')
172172
},
173173
postFailure: {
174174
cambpmPublishTestResult()
@@ -187,7 +187,7 @@ pipeline {
187187
cambpmConditionalRetry([
188188
agentLabel: 'h2',
189189
runSteps: {
190-
cambpmRunMaven('engine/', 'verify -Pcfghistoryaudit', runtimeStash: true)
190+
cambpmRunMaven('engine/', 'verify -Pcfghistoryaudit', runtimeStash: true, jdkVersion: 'jdk-17-latest')
191191
},
192192
postFailure: {
193193
cambpmPublishTestResult()
@@ -205,7 +205,7 @@ pipeline {
205205
cambpmConditionalRetry([
206206
agentLabel: 'h2',
207207
runSteps: {
208-
cambpmRunMaven('engine/', 'verify -Pcfghistoryactivity', runtimeStash: true)
208+
cambpmRunMaven('engine/', 'verify -Pcfghistoryactivity', runtimeStash: true, jdkVersion: 'jdk-17-latest')
209209
},
210210
postFailure: {
211211
cambpmPublishTestResult()
@@ -241,7 +241,11 @@ pipeline {
241241
cambpmConditionalRetry([
242242
agentLabel: 'postgresql_142',
243243
runSteps: {
244-
cambpmRunMaven('qa/', 'clean install -Ptomcat9,postgresql,engine-integration', runtimeStash: true, archiveStash: true)
244+
cambpmRunMaven('qa/',
245+
'clean install -Ptomcat9,postgresql,engine-integration',
246+
runtimeStash: true,
247+
archiveStash: true,
248+
jdkVersion: 'jdk-11-latest')
245249
},
246250
postFailure: {
247251
cambpmPublishTestResult()
@@ -303,7 +307,11 @@ pipeline {
303307
cambpmConditionalRetry([
304308
agentLabel: 'postgresql_142',
305309
runSteps: {
306-
cambpmRunMaven('qa/', 'clean install -Pwildfly26,postgresql,engine-integration', runtimeStash: true, archiveStash: true)
310+
cambpmRunMaven('qa/',
311+
'clean install -Pwildfly26,postgresql,engine-integration',
312+
runtimeStash: true,
313+
archiveStash: true,
314+
jdkVersion: 'jdk-11-latest')
307315
},
308316
postFailure: {
309317
cambpmPublishTestResult()
@@ -366,7 +374,11 @@ pipeline {
366374
cambpmConditionalRetry([
367375
agentLabel: 'chrome_112',
368376
runSteps: {
369-
cambpmRunMaven('qa/', 'clean install -Ptomcat9,h2,webapps-integration', runtimeStash: true, archiveStash: true)
377+
cambpmRunMaven('qa/',
378+
'clean install -Ptomcat9,h2,webapps-integration',
379+
runtimeStash: true,
380+
archiveStash: true,
381+
jdkVersion: 'jdk-17-latest')
370382
},
371383
postFailure: {
372384
cambpmPublishTestResult()
@@ -385,7 +397,11 @@ pipeline {
385397
cambpmConditionalRetry([
386398
agentLabel: 'chrome_112',
387399
runSteps: {
388-
cambpmRunMaven('qa/', 'clean install -Ptomcat,h2,webapps-integration', runtimeStash: true, archiveStash: true)
400+
cambpmRunMaven('qa/',
401+
'clean install -Ptomcat,h2,webapps-integration',
402+
runtimeStash: true,
403+
archiveStash: true,
404+
jdkVersion: 'jdk-17-latest')
389405
},
390406
postFailure: {
391407
cambpmPublishTestResult()
@@ -406,7 +422,7 @@ pipeline {
406422
agentLabel: 'chrome_112',
407423
runSteps: {
408424
cambpmRunMaven('qa/',
409-
"clean install -Pwildfly,h2,webapps-integration -pl '!integration-tests-engine-jakarta'",
425+
"clean install -Pwildfly,h2,webapps-integration",
410426
runtimeStash: true,
411427
archiveStash: true,
412428
jdkVersion: 'jdk-17-latest')
@@ -428,7 +444,11 @@ pipeline {
428444
cambpmConditionalRetry([
429445
agentLabel: 'chrome_112',
430446
runSteps: {
431-
cambpmRunMaven('qa/', 'clean install -Pwildfly26,h2,webapps-integration', runtimeStash: true, archiveStash: true)
447+
cambpmRunMaven('qa/',
448+
'clean install -Pwildfly26,h2,webapps-integration',
449+
runtimeStash: true,
450+
archiveStash: true,
451+
jdkVersion: 'jdk-11-latest')
432452
},
433453
postFailure: {
434454
cambpmPublishTestResult()
@@ -514,7 +534,7 @@ pipeline {
514534
cambpmConditionalRetry([
515535
agentLabel: 'h2',
516536
runSteps: {
517-
cambpmRunMaven('engine/', 'clean verify -Pcheck-api-compatibility', runtimeStash: true)
537+
cambpmRunMaven('engine/', 'clean verify -Pcheck-api-compatibility', runtimeStash: true, jdkVersion: 'jdk-17-latest')
518538
}
519539
])
520540
}
@@ -529,7 +549,7 @@ pipeline {
529549
cambpmConditionalRetry([
530550
agentLabel: 'h2',
531551
runSteps: {
532-
cambpmRunMaven('engine/', 'clean test -Pdb-table-prefix', runtimeStash: true)
552+
cambpmRunMaven('engine/', 'clean test -Pdb-table-prefix', runtimeStash: true, jdkVersion: 'jdk-17-latest')
533553
},
534554
postFailure: {
535555
cambpmPublishTestResult()

engine-spring/core/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198

199199
<profiles>
200200
<profile>
201-
<id>java15</id>
201+
<id>exclude-post-jdk15-tests</id>
202202
<activation>
203203
<jdk>[15,)</jdk>
204204
</activation>

engine/pom.xml

+27-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<dependency>
2727
<groupId>org.springframework</groupId>
2828
<artifactId>spring-framework-bom</artifactId>
29-
<version>${version.spring.framework}</version>
29+
<version>${version.spring.framework6}</version>
3030
<type>pom</type>
3131
<scope>import</scope>
3232
</dependency>
@@ -333,6 +333,13 @@
333333
<version>${project.version}</version>
334334
<scope>test</scope>
335335
</dependency>
336+
337+
<dependency>
338+
<groupId>com.github.h-thurow</groupId>
339+
<artifactId>simple-jndi</artifactId>
340+
<version>0.24.0</version>
341+
<scope>test</scope>
342+
</dependency>
336343
</dependencies>
337344

338345

@@ -875,7 +882,7 @@
875882
</profile>
876883

877884
<profile>
878-
<id>java15</id>
885+
<id>exclude-post-jdk15-tests</id>
879886
<activation>
880887
<jdk>[15,)</jdk>
881888
</activation>
@@ -946,6 +953,24 @@
946953
</properties>
947954
</profile>
948955

956+
<profile>
957+
<id>java11</id>
958+
<activation>
959+
<jdk>11</jdk>
960+
</activation>
961+
<dependencyManagement>
962+
<dependencies>
963+
<dependency>
964+
<groupId>org.springframework</groupId>
965+
<artifactId>spring-framework-bom</artifactId>
966+
<version>${version.spring.framework}</version>
967+
<type>pom</type>
968+
<scope>import</scope>
969+
</dependency>
970+
</dependencies>
971+
</dependencyManagement>
972+
</profile>
973+
949974
</profiles>
950975

951976
</project>

engine/src/test/java/org/camunda/bpm/container/impl/jmx/deployment/BpmPlatformXmlLocationTest.java

+15-6
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
import java.net.URLDecoder;
3636

3737
import org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep;
38-
import org.junit.Rule;
38+
import org.junit.After;
39+
import org.junit.Before;
3940
import org.junit.Test;
40-
import org.springframework.mock.jndi.SimpleNamingContext;
4141

4242
/**
4343
* Checks the correct retrieval of bpm-platform.xml file through JNDI,
@@ -63,8 +63,19 @@ public class BpmPlatformXmlLocationTest {
6363
private static final String BPM_PLATFORM_XML_LOCATION_URL_HTTP_PROTOCOL = "http://localhost:8080/camunda/" + BPM_PLATFORM_XML_FILE;
6464
private static final String BPM_PLATFORM_XML_LOCATION_URL_HTTPS_PROTOCOL = "https://localhost:8080/camunda/" + BPM_PLATFORM_XML_FILE;
6565

66-
@Rule
67-
public MockInitialContextRule initialContextRule = new MockInitialContextRule(new SimpleNamingContext());
66+
protected Context context;
67+
68+
@Before
69+
public void setUp() throws NamingException {
70+
context = new InitialContext();
71+
}
72+
73+
@After
74+
public void close() throws NamingException {
75+
if (context != null) {
76+
context.close();
77+
}
78+
}
6879

6980
@Test
7081
public void checkValidBpmPlatformXmlResourceLocationForUrl() throws NamingException, MalformedURLException {
@@ -121,7 +132,6 @@ public void checkValidBpmPlatformXmlResourceLocation() throws NamingException, M
121132

122133
@Test
123134
public void getBpmPlatformXmlLocationFromJndi() throws NamingException, MalformedURLException {
124-
Context context = new InitialContext();
125135
context.bind("java:comp/env/" + BPM_PLATFORM_XML_LOCATION, BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);
126136

127137
URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXmlLocationFromJndi();
@@ -184,7 +194,6 @@ public void getBpmPlatformXmlFromCatalinaConfDirectory() throws MalformedURLExce
184194

185195
@Test
186196
public void lookupBpmPlatformXml() throws NamingException, MalformedURLException {
187-
Context context = new InitialContext();
188197
context.bind("java:comp/env/" + BPM_PLATFORM_XML_LOCATION, BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);
189198

190199
URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXml();

engine/src/test/java/org/camunda/bpm/container/impl/jmx/deployment/MockInitialContextFactory.java

-42
This file was deleted.

engine/src/test/java/org/camunda/bpm/container/impl/jmx/deployment/MockInitialContextRule.java

-50
This file was deleted.

0 commit comments

Comments
 (0)