Skip to content

Commit 5dc17b1

Browse files
committed
Upgrade dependencies to major versions for Spring Batch 5
* Upgrade to Jakarta EE 9 * Upgrade to Spring Framework 6 * Upgrade to Spring Integration 6 * Upgrade to Spring Data 3 * Upgrade to Spring AMQP 3 * Upgrade to Spring for Apache Kafka 3 LDIF support is still in progress waiting for the next major version of Spring LDAP. Closes #4027 Closes #3656
1 parent 2a9904b commit 5dc17b1

File tree

197 files changed

+1299
-1176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+1299
-1176
lines changed

pom.xml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,29 @@
5252
<java.version>17</java.version>
5353

5454
<!-- production dependencies -->
55-
<spring-framework.version>5.3.10-SNAPSHOT</spring-framework.version>
55+
<spring-framework.version>6.0.0-SNAPSHOT</spring-framework.version>
5656
<spring-retry.version>1.3.1</spring-retry.version>
57-
<spring-integration.version>5.5.4-SNAPSHOT</spring-integration.version>
57+
<spring-integration.version>6.0.0-SNAPSHOT</spring-integration.version>
5858
<micrometer.version>1.7.4-SNAPSHOT</micrometer.version>
5959
<jackson.version>2.12.3</jackson.version>
6060

6161
<!-- optional production dependencies -->
62-
<spring-data-geode.version>2.6.0-SNAPSHOT</spring-data-geode.version>
63-
<spring-data-commons.version>2.6.0-SNAPSHOT</spring-data-commons.version>
64-
<spring-data-jpa.version>2.6.0-SNAPSHOT</spring-data-jpa.version>
65-
<spring-data-mongodb.version>3.3.0-SNAPSHOT</spring-data-mongodb.version>
66-
<spring-kafka.version>2.7.7-SNAPSHOT</spring-kafka.version>
67-
<spring-amqp.version>2.4.0-SNAPSHOT</spring-amqp.version>
62+
<spring-data-geode.version>3.0.0-SNAPSHOT</spring-data-geode.version>
63+
<spring-data-commons.version>3.0.0-SNAPSHOT</spring-data-commons.version>
64+
<spring-data-jpa.version>3.0.0-SNAPSHOT</spring-data-jpa.version>
65+
<spring-data-mongodb.version>4.0.0-SNAPSHOT</spring-data-mongodb.version>
66+
<spring-kafka.version>3.0.0-SNAPSHOT</spring-kafka.version>
67+
<spring-amqp.version>3.0.0-SNAPSHOT</spring-amqp.version>
6868
<spring-ldap.version>2.3.5.BUILD-SNAPSHOT</spring-ldap.version>
6969
<avro.version>1.9.2</avro.version>
7070
<gson.version>2.8.6</gson.version>
71-
<hibernate-core.version>5.4.30.Final</hibernate-core.version>
72-
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
73-
<javax.mail-api.version>1.6.2</javax.mail-api.version>
74-
<javax.jms-api.version>2.0.1</javax.jms-api.version>
75-
<javax.batch-api.version>1.0</javax.batch-api.version>
76-
<validation-api.version>2.0.1.Final</validation-api.version>
71+
<hibernate-core-jakarta.version>5.6.1.Final</hibernate-core-jakarta.version>
72+
<jakarta.annotation-api.version>2.0.0</jakarta.annotation-api.version>
73+
<jakarta.mail-api.version>2.0.1</jakarta.mail-api.version>
74+
<jakarta.jms-api.version>3.0.0</jakarta.jms-api.version>
75+
<jakarta.batch-api.version>2.0.0</jakarta.batch-api.version>
76+
<jakarta.validation-api.version>3.0.0</jakarta.validation-api.version>
77+
<jakarta.persistence-api.version>3.0.0</jakarta.persistence-api.version>
7778
<neo4j-ogm-core.version>3.2.21</neo4j-ogm-core.version>
7879
<mongodb-driver-sync.version>4.2.3</mongodb-driver-sync.version>
7980
<xstream.version>1.4.16</xstream.version>
@@ -92,12 +93,15 @@
9293
<h2.version>1.4.200</h2.version>
9394
<sqlite.version>3.34.0</sqlite.version>
9495
<derby.version>10.14.2.0</derby.version>
95-
<activemq.version>5.15.14</activemq.version>
96-
<jaxb-api.version>2.3.1</jaxb-api.version>
97-
<jaxb-core.version>2.3.0.1</jaxb-core.version>
96+
<artemis.version>2.19.0</artemis.version>
97+
<jaxb-core.version>3.0.0</jaxb-core.version>
9898
<log4j.version>2.14.1</log4j.version>
99-
<hibernate-validator.version>6.2.0.Final</hibernate-validator.version>
100-
<javax.el.version>3.0.0</javax.el.version>
99+
<hibernate-validator.version>7.0.1.Final</hibernate-validator.version>
100+
<jakarta.el-api.version>4.0.0</jakarta.el-api.version>
101+
<jakarta.el.version>4.0.2</jakarta.el.version>
102+
<jakarta.inject-api.version>2.0.0</jakarta.inject-api.version>
103+
<jakarta.xml.bind-api.version>3.0.1</jakarta.xml.bind-api.version>
104+
<jakarta.mail.version>2.0.1</jakarta.mail.version>
101105
<woodstox-core.version>6.2.5</woodstox-core.version>
102106
<aspectj.version>1.9.6</aspectj.version>
103107
<mysql-connector-java.version>8.0.23</mysql-connector-java.version>
@@ -108,12 +112,10 @@
108112
<jtds.version>1.3.1</jtds.version>
109113
<testcontainers.version>1.15.3</testcontainers.version>
110114
<com.ibm.jbatch-tck-spi.version>1.0</com.ibm.jbatch-tck-spi.version>
111-
<javax.inject.version>1</javax.inject.version>
112115
<jsonassert.version>1.5.0</jsonassert.version>
113116

114117
<!-- samples dependencies -->
115-
<hibernate-entitymanager.version>5.4.30.Final</hibernate-entitymanager.version>
116-
<spring-rabbit.version>2.4.0-SNAPSHOT</spring-rabbit.version>
118+
<spring-rabbit.version>3.0.0-SNAPSHOT</spring-rabbit.version>
117119
<quartz.version>2.3.2</quartz.version>
118120
<prometheus_pushgateway.version>0.10.0</prometheus_pushgateway.version>
119121
<groovy.version>2.5.14</groovy.version>

spring-batch-core/pom.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
<version>${jackson.version}</version>
5252
</dependency>
5353
<dependency>
54-
<groupId>javax.batch</groupId>
55-
<artifactId>javax.batch-api</artifactId>
56-
<version>${javax.batch-api.version}</version>
54+
<groupId>jakarta.batch</groupId>
55+
<artifactId>jakarta.batch-api</artifactId>
56+
<version>${jakarta.batch-api.version}</version>
5757
</dependency>
5858
<dependency>
5959
<groupId>io.micrometer</groupId>
@@ -63,9 +63,9 @@
6363

6464
<!-- optional production dependencies -->
6565
<dependency>
66-
<groupId>javax.annotation</groupId>
67-
<artifactId>javax.annotation-api</artifactId>
68-
<version>${javax.annotation-api.version}</version>
66+
<groupId>jakarta.annotation</groupId>
67+
<artifactId>jakarta.annotation-api</artifactId>
68+
<version>${jakarta.annotation-api.version}</version>
6969
<optional>true</optional>
7070
</dependency>
7171
<dependency>
@@ -239,9 +239,9 @@
239239
<scope>test</scope>
240240
</dependency>
241241
<dependency>
242-
<groupId>javax.xml.bind</groupId>
243-
<artifactId>jaxb-api</artifactId>
244-
<version>${jaxb-api.version}</version>
242+
<groupId>jakarta.xml.bind</groupId>
243+
<artifactId>jakarta.xml.bind-api</artifactId>
244+
<version>${jakarta.xml.bind-api.version}</version>
245245
<scope>test</scope>
246246
</dependency>
247247
<dependency>
@@ -263,9 +263,9 @@
263263
<scope>test</scope>
264264
</dependency>
265265
<dependency>
266-
<groupId>javax.inject</groupId>
267-
<artifactId>javax.inject</artifactId>
268-
<version>${javax.inject.version}</version>
266+
<groupId>jakarta.inject</groupId>
267+
<artifactId>jakarta.inject-api</artifactId>
268+
<version>${jakarta.inject-api.version}</version>
269269
<scope>test</scope>
270270
</dependency>
271271
</dependencies>

spring-batch-core/src/main/java/org/springframework/batch/core/BatchStatus.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2018 the original author or authors.
2+
* Copyright 2006-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -113,21 +113,21 @@ public boolean isLessThanOrEqualTo(BatchStatus other) {
113113
*
114114
* @return JSR-352 equivalent to the current status
115115
*/
116-
public javax.batch.runtime.BatchStatus getBatchStatus() {
116+
public jakarta.batch.runtime.BatchStatus getBatchStatus() {
117117
if(this == ABANDONED) {
118-
return javax.batch.runtime.BatchStatus.ABANDONED;
118+
return jakarta.batch.runtime.BatchStatus.ABANDONED;
119119
} else if(this == COMPLETED) {
120-
return javax.batch.runtime.BatchStatus.COMPLETED;
120+
return jakarta.batch.runtime.BatchStatus.COMPLETED;
121121
} else if(this == STARTED) {
122-
return javax.batch.runtime.BatchStatus.STARTED;
122+
return jakarta.batch.runtime.BatchStatus.STARTED;
123123
} else if(this == STARTING) {
124-
return javax.batch.runtime.BatchStatus.STARTING;
124+
return jakarta.batch.runtime.BatchStatus.STARTING;
125125
} else if(this == STOPPED) {
126-
return javax.batch.runtime.BatchStatus.STOPPED;
126+
return jakarta.batch.runtime.BatchStatus.STOPPED;
127127
} else if(this == STOPPING) {
128-
return javax.batch.runtime.BatchStatus.STOPPING;
128+
return jakarta.batch.runtime.BatchStatus.STOPPING;
129129
} else {
130-
return javax.batch.runtime.BatchStatus.FAILED;
130+
return jakarta.batch.runtime.BatchStatus.FAILED;
131131
}
132132
}
133133

spring-batch-core/src/main/java/org/springframework/batch/core/JobInstance.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2018 the original author or authors.
2+
* Copyright 2006-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
3030
* @see Job
3131
* @see JobParameters
3232
* @see JobExecution
33-
* @see javax.batch.runtime.JobInstance
33+
* @see jakarta.batch.runtime.JobInstance
3434
*
3535
* @author Lucas Ward
3636
* @author Dave Syer
@@ -40,7 +40,7 @@
4040
*
4141
*/
4242
@SuppressWarnings("serial")
43-
public class JobInstance extends Entity implements javax.batch.runtime.JobInstance{
43+
public class JobInstance extends Entity implements jakarta.batch.runtime.JobInstance{
4444

4545
private final String jobName;
4646

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/DefaultBatchConfigurer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package org.springframework.batch.core.configuration.annotation;
1717

18-
import javax.annotation.PostConstruct;
18+
import jakarta.annotation.PostConstruct;
1919
import javax.sql.DataSource;
2020

2121
import org.springframework.batch.core.configuration.BatchConfigurationException;

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
import java.util.Queue;
2626
import java.util.Set;
2727
import java.util.concurrent.locks.ReentrantLock;
28-
import javax.batch.api.chunk.listener.RetryProcessListener;
29-
import javax.batch.api.chunk.listener.RetryReadListener;
30-
import javax.batch.api.chunk.listener.RetryWriteListener;
31-
import javax.batch.api.chunk.listener.SkipProcessListener;
32-
import javax.batch.api.chunk.listener.SkipReadListener;
33-
import javax.batch.api.chunk.listener.SkipWriteListener;
34-
import javax.batch.api.partition.PartitionCollector;
28+
import jakarta.batch.api.chunk.listener.RetryProcessListener;
29+
import jakarta.batch.api.chunk.listener.RetryReadListener;
30+
import jakarta.batch.api.chunk.listener.RetryWriteListener;
31+
import jakarta.batch.api.chunk.listener.SkipProcessListener;
32+
import jakarta.batch.api.chunk.listener.SkipReadListener;
33+
import jakarta.batch.api.chunk.listener.SkipWriteListener;
34+
import jakarta.batch.api.partition.PartitionCollector;
3535

3636
import org.springframework.batch.core.ChunkListener;
3737
import org.springframework.batch.core.ItemProcessListener;
@@ -242,14 +242,14 @@ public class StepParserStepFactoryBean<I, O> implements FactoryBean<Step>, BeanN
242242
private StepExecutionAggregator stepExecutionAggregator;
243243

244244
/**
245-
* @param queue The {@link Queue} that is used for communication between {@link javax.batch.api.partition.PartitionCollector} and {@link javax.batch.api.partition.PartitionAnalyzer}
245+
* @param queue The {@link Queue} that is used for communication between {@link jakarta.batch.api.partition.PartitionCollector} and {@link jakarta.batch.api.partition.PartitionAnalyzer}
246246
*/
247247
public void setPartitionQueue(Queue<Serializable> queue) {
248248
this.partitionQueue = queue;
249249
}
250250

251251
/**
252-
* Used to coordinate access to the partition queue between the {@link javax.batch.api.partition.PartitionCollector} and {@link javax.batch.api.partition.AbstractPartitionAnalyzer}
252+
* Used to coordinate access to the partition queue between the {@link jakarta.batch.api.partition.PartitionCollector} and {@link jakarta.batch.api.partition.AbstractPartitionAnalyzer}
253253
*
254254
* @param lock a lock that will be locked around accessing the partition queue
255255
*/
@@ -312,8 +312,8 @@ protected void enhanceCommonStep(StepBuilderHelper<?> builder) {
312312
for (Object listener : stepExecutionListeners) {
313313
if(listener instanceof StepExecutionListener) {
314314
builder.listener((StepExecutionListener) listener);
315-
} else if(listener instanceof javax.batch.api.listener.StepListener) {
316-
builder.listener(new StepListenerAdapter((javax.batch.api.listener.StepListener) listener));
315+
} else if(listener instanceof jakarta.batch.api.listener.StepListener) {
316+
builder.listener(new StepListenerAdapter((jakarta.batch.api.listener.StepListener) listener));
317317
}
318318
}
319319
}
@@ -833,40 +833,40 @@ public void setListeners(Object[] listeners) {
833833
StepExecutionListener stepExecutionListener = (StepExecutionListener) listener;
834834
stepExecutionListeners.add(stepExecutionListener);
835835
}
836-
if(listener instanceof javax.batch.api.listener.StepListener) {
837-
StepExecutionListener stepExecutionListener = new StepListenerAdapter((javax.batch.api.listener.StepListener) listener);
836+
if(listener instanceof jakarta.batch.api.listener.StepListener) {
837+
StepExecutionListener stepExecutionListener = new StepListenerAdapter((jakarta.batch.api.listener.StepListener) listener);
838838
stepExecutionListeners.add(stepExecutionListener);
839839
}
840840
if (listener instanceof ChunkListener) {
841841
ChunkListener chunkListener = (ChunkListener) listener;
842842
chunkListeners.add(chunkListener);
843843
}
844-
if(listener instanceof javax.batch.api.chunk.listener.ChunkListener) {
845-
ChunkListener chunkListener = new ChunkListenerAdapter((javax.batch.api.chunk.listener.ChunkListener) listener);
844+
if(listener instanceof jakarta.batch.api.chunk.listener.ChunkListener) {
845+
ChunkListener chunkListener = new ChunkListenerAdapter((jakarta.batch.api.chunk.listener.ChunkListener) listener);
846846
chunkListeners.add(chunkListener);
847847
}
848848
if (listener instanceof ItemReadListener) {
849849
ItemReadListener<I> readListener = (ItemReadListener<I>) listener;
850850
readListeners.add(readListener);
851851
}
852-
if(listener instanceof javax.batch.api.chunk.listener.ItemReadListener) {
853-
ItemReadListener<I> itemListener = new ItemReadListenerAdapter<>((javax.batch.api.chunk.listener.ItemReadListener) listener);
852+
if(listener instanceof jakarta.batch.api.chunk.listener.ItemReadListener) {
853+
ItemReadListener<I> itemListener = new ItemReadListenerAdapter<>((jakarta.batch.api.chunk.listener.ItemReadListener) listener);
854854
readListeners.add(itemListener);
855855
}
856856
if (listener instanceof ItemWriteListener) {
857857
ItemWriteListener<O> writeListener = (ItemWriteListener<O>) listener;
858858
writeListeners.add(writeListener);
859859
}
860-
if(listener instanceof javax.batch.api.chunk.listener.ItemWriteListener) {
861-
ItemWriteListener<O> itemListener = new ItemWriteListenerAdapter<>((javax.batch.api.chunk.listener.ItemWriteListener) listener);
860+
if(listener instanceof jakarta.batch.api.chunk.listener.ItemWriteListener) {
861+
ItemWriteListener<O> itemListener = new ItemWriteListenerAdapter<>((jakarta.batch.api.chunk.listener.ItemWriteListener) listener);
862862
writeListeners.add(itemListener);
863863
}
864864
if (listener instanceof ItemProcessListener) {
865865
ItemProcessListener<I, O> processListener = (ItemProcessListener<I, O>) listener;
866866
processListeners.add(processListener);
867867
}
868-
if(listener instanceof javax.batch.api.chunk.listener.ItemProcessListener) {
869-
ItemProcessListener<I,O> itemListener = new ItemProcessListenerAdapter<>((javax.batch.api.chunk.listener.ItemProcessListener) listener);
868+
if(listener instanceof jakarta.batch.api.chunk.listener.ItemProcessListener) {
869+
ItemProcessListener<I,O> itemListener = new ItemProcessListenerAdapter<>((jakarta.batch.api.chunk.listener.ItemProcessListener) listener);
870870
processListeners.add(itemListener);
871871
}
872872
if(listener instanceof RetryReadListener) {

spring-batch-core/src/main/java/org/springframework/batch/core/jsr/ChunkListenerAdapter.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2014 the original author or authors.
2+
* Copyright 2013-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,28 +15,29 @@
1515
*/
1616
package org.springframework.batch.core.jsr;
1717

18-
import javax.batch.operations.BatchRuntimeException;
18+
import jakarta.batch.operations.BatchRuntimeException;
1919

2020
import org.springframework.batch.core.ChunkListener;
2121
import org.springframework.batch.core.scope.context.ChunkContext;
2222
import org.springframework.batch.core.step.tasklet.UncheckedTransactionException;
2323
import org.springframework.util.Assert;
2424

2525
/**
26-
* Wrapper class to adapt the {@link javax.batch.api.chunk.listener.ChunkListener} to
26+
* Wrapper class to adapt the {@link jakarta.batch.api.chunk.listener.ChunkListener} to
2727
* a {@link ChunkListener}.
2828
*
2929
* @author Michael Minella
30+
* @author Mahmoud Ben Hassine
3031
* @since 3.0
3132
*/
3233
public class ChunkListenerAdapter implements ChunkListener {
3334

34-
private final javax.batch.api.chunk.listener.ChunkListener delegate;
35+
private final jakarta.batch.api.chunk.listener.ChunkListener delegate;
3536

3637
/**
3738
* @param delegate to be called within the step chunk lifecycle
3839
*/
39-
public ChunkListenerAdapter(javax.batch.api.chunk.listener.ChunkListener delegate) {
40+
public ChunkListenerAdapter(jakarta.batch.api.chunk.listener.ChunkListener delegate) {
4041
Assert.notNull(delegate, "A ChunkListener is required");
4142
this.delegate = delegate;
4243
}

spring-batch-core/src/main/java/org/springframework/batch/core/jsr/ItemProcessListenerAdapter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2018 the original author or authors.
2+
* Copyright 2013-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,14 +15,14 @@
1515
*/
1616
package org.springframework.batch.core.jsr;
1717

18-
import javax.batch.operations.BatchRuntimeException;
18+
import jakarta.batch.operations.BatchRuntimeException;
1919

2020
import org.springframework.batch.core.ItemProcessListener;
2121
import org.springframework.lang.Nullable;
2222
import org.springframework.util.Assert;
2323

2424
/**
25-
* Wrapper class for {@link javax.batch.api.chunk.listener.ItemProcessListener}
25+
* Wrapper class for {@link jakarta.batch.api.chunk.listener.ItemProcessListener}
2626
*
2727
* @author Michael Minella
2828
* @author Mahmoud Ben Hassine
@@ -33,12 +33,12 @@
3333
*/
3434
public class ItemProcessListenerAdapter<T,S> implements ItemProcessListener<T, S> {
3535

36-
private javax.batch.api.chunk.listener.ItemProcessListener delegate;
36+
private jakarta.batch.api.chunk.listener.ItemProcessListener delegate;
3737

3838
/**
3939
* @param delegate to be called within the batch lifecycle
4040
*/
41-
public ItemProcessListenerAdapter(javax.batch.api.chunk.listener.ItemProcessListener delegate) {
41+
public ItemProcessListenerAdapter(jakarta.batch.api.chunk.listener.ItemProcessListener delegate) {
4242
Assert.notNull(delegate, "An ItemProcessListener is required");
4343
this.delegate = delegate;
4444
}

0 commit comments

Comments
 (0)