Skip to content

Commit 3357bfe

Browse files
committed
Branch 5.0.x.
1 parent c1a1ea9 commit 3357bfe

23 files changed

+95
-138
lines changed

Jenkinsfile

+7-65
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ pipeline {
3131
options { timeout(time: 30, unit: 'MINUTES') }
3232

3333
environment {
34-
DOCKER_HUB = credentials("${p['docker.credentials']}")
35-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
34+
DOCKER_HUB = credentials('hub.docker.com-springbuildmaster')
35+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
3636
}
3737

3838
steps {
3939
script {
40-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
40+
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
4141
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
4242
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
4343
sh 'PROFILE=none ci/verify.sh'
@@ -48,64 +48,6 @@ pipeline {
4848
}
4949
}
5050

51-
stage("Test other configurations") {
52-
when {
53-
allOf {
54-
branch 'main'
55-
not { triggeredBy 'UpstreamCause' }
56-
}
57-
}
58-
parallel {
59-
stage("test: baseline (next)") {
60-
agent {
61-
label 'data'
62-
}
63-
options { timeout(time: 30, unit: 'MINUTES') }
64-
65-
environment {
66-
DOCKER_HUB = credentials("${p['docker.credentials']}")
67-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
68-
}
69-
70-
steps {
71-
script {
72-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
73-
docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) {
74-
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
75-
sh 'PROFILE=java11 ci/verify.sh'
76-
sh "ci/clean.sh"
77-
}
78-
}
79-
}
80-
}
81-
}
82-
83-
stage("test: baseline (LTS)") {
84-
agent {
85-
label 'data'
86-
}
87-
options { timeout(time: 30, unit: 'MINUTES') }
88-
89-
environment {
90-
DOCKER_HUB = credentials("${p['docker.credentials']}")
91-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
92-
}
93-
94-
steps {
95-
script {
96-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
97-
docker.image(p['docker.java.lts.image']).inside(p['docker.java.inside.docker']) {
98-
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
99-
sh 'PROFILE=java11 ci/verify.sh'
100-
sh "ci/clean.sh"
101-
}
102-
}
103-
}
104-
}
105-
}
106-
}
107-
}
108-
10951
stage('Release to artifactory') {
11052
when {
11153
anyOf {
@@ -119,12 +61,12 @@ pipeline {
11961
options { timeout(time: 20, unit: 'MINUTES') }
12062

12163
environment {
122-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
64+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
12365
}
12466

12567
steps {
12668
script {
127-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
69+
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
12870
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
12971
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch-non-root ' +
13072
'-Dartifactory.server=https://repo.spring.io ' +
@@ -149,12 +91,12 @@ pipeline {
14991
options { timeout(time: 20, unit: 'MINUTES') }
15092

15193
environment {
152-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
94+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
15395
}
15496

15597
steps {
15698
script {
157-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
99+
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
158100
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
159101
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch-non-root ' +
160102
'-Dartifactory.server=https://repo.spring.io ' +

pom.xml

+25-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
<groupId>org.springframework.data</groupId>
77
<artifactId>spring-data-elasticsearch</artifactId>
8-
<version>4.4.0-SNAPSHOT</version>
8+
<version>5.0.0-SNAPSHOT</version>
99

1010
<parent>
1111
<groupId>org.springframework.data.build</groupId>
1212
<artifactId>spring-data-parent</artifactId>
13-
<version>2.7.0-SNAPSHOT</version>
13+
<version>3.0.0-SNAPSHOT</version>
1414
</parent>
1515

1616
<name>Spring Data Elasticsearch</name>
@@ -21,7 +21,7 @@
2121
<elasticsearch>7.17.0</elasticsearch>
2222
<log4j>2.17.1</log4j>
2323
<netty>4.1.65.Final</netty>
24-
<springdata.commons>2.7.0-SNAPSHOT</springdata.commons>
24+
<springdata.commons>3.0.0-SNAPSHOT</springdata.commons>
2525
<testcontainers>1.16.2</testcontainers>
2626
<blockhound-junit>1.0.6.RELEASE</blockhound-junit>
2727
<java-module-name>spring.data.elasticsearch</java-module-name>
@@ -174,23 +174,40 @@
174174
</dependency>
175175

176176
<dependency>
177-
<groupId>javax.enterprise</groupId>
178-
<artifactId>cdi-api</artifactId>
177+
<groupId>jakarta.enterprise</groupId>
178+
<artifactId>jakarta.enterprise.cdi-api</artifactId>
179179
<version>${cdi}</version>
180180
<scope>provided</scope>
181181
<optional>true</optional>
182182
</dependency>
183183

184184
<dependency>
185-
<groupId>javax.annotation</groupId>
186-
<artifactId>javax.annotation-api</artifactId>
187-
<version>${javax-annotation-api}</version>
185+
<groupId>jakarta.annotation</groupId>
186+
<artifactId>jakarta.annotation-api</artifactId>
187+
<version>${jakarta-annotation-api}</version>
188188
<scope>test</scope>
189189
</dependency>
190190

191191
<dependency>
192192
<groupId>org.apache.openwebbeans</groupId>
193193
<artifactId>openwebbeans-se</artifactId>
194+
<classifier>jakarta</classifier>
195+
<version>${webbeans}</version>
196+
<scope>test</scope>
197+
</dependency>
198+
199+
<dependency>
200+
<groupId>org.apache.openwebbeans</groupId>
201+
<artifactId>openwebbeans-spi</artifactId>
202+
<classifier>jakarta</classifier>
203+
<version>${webbeans}</version>
204+
<scope>test</scope>
205+
</dependency>
206+
207+
<dependency>
208+
<groupId>org.apache.openwebbeans</groupId>
209+
<artifactId>openwebbeans-impl</artifactId>
210+
<classifier>jakarta</classifier>
194211
<version>${webbeans}</version>
195212
<scope>test</scope>
196213
</dependency>

src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java

-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ static ClientConfigurationBuilderWithRequiredEndpoint builder() {
5454

5555
/**
5656
* Creates a new {@link ClientConfiguration} instance configured to localhost.
57-
* <p/>
5857
*
5958
* <pre class="code">
6059
* // "localhost:9200"
@@ -70,7 +69,6 @@ static ClientConfiguration localhost() {
7069

7170
/**
7271
* Creates a new {@link ClientConfiguration} instance configured to a single host given {@code hostAndPort}.
73-
* <p/>
7472
* For example given the endpoint http://localhost:9200
7573
*
7674
* <pre class="code">
@@ -85,7 +83,6 @@ static ClientConfiguration create(String hostAndPort) {
8583

8684
/**
8785
* Creates a new {@link ClientConfiguration} instance configured to a single host given {@link InetSocketAddress}.
88-
* <p/>
8986
* For example given the endpoint http://localhost:9200
9087
*
9188
* <pre class="code">

src/main/java/org/springframework/data/elasticsearch/client/reactive/WebClientProvider.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/**
2929
* Provider for {@link WebClient}s using a pre-configured {@code scheme}. This class returns {@link WebClient} for a
3030
* specific {@link InetSocketAddress endpoint} and encapsulates common configuration aspects of {@link WebClient} so
31-
* that code using {@link WebClient} is not required to apply further configuration to the actual client.
32-
* <p/>
31+
* that code using {@link WebClient} is not required to apply further configuration to the actual client. <br/>
3332
* Client instances are typically cached allowing reuse of pooled connections if configured on the
3433
* {@link ClientHttpConnector}.
3534
*

src/main/java/org/springframework/data/elasticsearch/core/AbstractElasticsearchTemplate.java

-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
148148
/**
149149
* Set the {@link EntityCallbacks} instance to use when invoking {@link EntityCallbacks callbacks} like the
150150
* {@link org.springframework.data.elasticsearch.core.event.BeforeConvertCallback}.
151-
* <p />
152151
* Overrides potentially existing {@link EntityCallbacks}.
153152
*
154153
* @param entityCallbacks must not be {@literal null}.

src/main/java/org/springframework/data/elasticsearch/core/Range.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static <T> Range<T> closed(T from, T to) {
5858
* @param <T>
5959
* @param value must not be {@literal null}.
6060
* @return
61-
* @see Range#closed(T, T)
61+
* @see Range#closed(Object, Object)
6262
*/
6363
public static <T> Range<T> just(T value) {
6464
return Range.closed(value, value);
@@ -231,8 +231,8 @@ public String toString() {
231231
}
232232

233233
/**
234-
* Value object representing a boundary. A boundary can either be {@link #unbounded() unbounded}, {@link #inclusive(T)
235-
* including its value} or {@link #exclusive(T) its value}.
234+
* Value object representing a boundary. A boundary can either be {@link #unbounded() unbounded}, {@link #inclusive(Object)}
235+
* including its value} or {@link #exclusive(Object)} its value}.
236236
*/
237237
public static final class Bound<T> {
238238

src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void setIndicesOptions(@Nullable IndicesOptions indicesOptions) {
213213
/**
214214
* Set the {@link ReactiveEntityCallbacks} instance to use when invoking {@link ReactiveEntityCallbacks callbacks}
215215
* like the {@link ReactiveBeforeConvertCallback}.
216-
* <p />
216+
* <br/>
217217
* Overrides potentially existing {@link ReactiveEntityCallbacks}.
218218
*
219219
* @param entityCallbacks must not be {@literal null}.

src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchOperations.java

-3
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ default <T> Flux<SearchHit<T>> search(Query query, Class<T> entityType, IndexCoo
127127
* @param <T>
128128
* @param query must not be {@literal null}.
129129
* @param entityType must not be {@literal null}.
130-
* @param <T>
131130
* @return a {@link Mono} emitting matching entities in a {@link SearchHits}.
132131
* @since 4.1
133132
*/
@@ -142,7 +141,6 @@ default <T> Mono<SearchPage<T>> searchForPage(Query query, Class<T> entityType)
142141
* @param query must not be {@literal null}.
143142
* @param entityType must not be {@literal null}.
144143
* @param resultType the projection result type.
145-
* @param <T>
146144
* @return a {@link Mono} emitting matching entities in a {@link SearchHits}.
147145
* @since 4.1
148146
*/
@@ -155,7 +153,6 @@ default <T> Mono<SearchPage<T>> searchForPage(Query query, Class<T> entityType)
155153
* @param query must not be {@literal null}.
156154
* @param entityType must not be {@literal null}.
157155
* @param index the target index, must not be {@literal null}
158-
* @param <T>
159156
* @return a {@link Mono} emitting matching entities in a {@link SearchHits}.
160157
* @since 4.1
161158
*/

src/main/java/org/springframework/data/elasticsearch/core/SearchOperations.java

-2
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ default <T> SearchHit<T> searchOne(Query query, Class<T> clazz, IndexCoordinates
205205

206206
/**
207207
* Executes the given {@link Query} against elasticsearch and return result as {@link SearchHitsIterator}.
208-
* <p>
209208
*
210209
* @param <T> element return type
211210
* @param query the query to execute
@@ -218,7 +217,6 @@ default <T> SearchHit<T> searchOne(Query query, Class<T> clazz, IndexCoordinates
218217

219218
/**
220219
* Executes the given {@link Query} against elasticsearch and return result as {@link SearchHitsIterator}.
221-
* <p>
222220
*
223221
* @param <T> element return type
224222
* @param query the query to execute

src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJson.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
import org.springframework.data.elasticsearch.core.document.Document;
2121

2222
/**
23-
* Interface definition for structures defined in <a href="https://geojson.org/>GeoJSON</a> format. copied from Spring
23+
* Interface definition for structures defined in <a href="https://geojson.org">GeoJSON</a>
24+
* format. copied from Spring
2425
* Data Mongodb
2526
*
2627
* @author Christoph Strobl

src/main/java/org/springframework/data/elasticsearch/core/index/MappingBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ private void buildPropertyMapping(ObjectNode propertiesNode, boolean isRootObjec
349349
}
350350

351351
if (isNestedOrObjectProperty) {
352-
Iterator<? extends TypeInformation<?>> iterator = property.getPersistentEntityTypes().iterator();
352+
Iterator<? extends TypeInformation<?>> iterator = property.getPersistentEntityTypeInformation().iterator();
353353
ElasticsearchPersistentEntity<?> persistentEntity = iterator.hasNext()
354354
? elasticsearchConverter.getMappingContext().getPersistentEntity(iterator.next())
355355
: null;

src/main/java/org/springframework/data/elasticsearch/core/query/Query.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static Query findAll() {
157157
float getMinScore();
158158

159159
/**
160-
* Get if scores will be computed and tracked, regardless of whether sorting on a field. Defaults to <tt>false</tt>.
160+
* Get if scores will be computed and tracked, regardless of whether sorting on a field. Defaults to <em>false</em>.
161161
*
162162
* @return
163163
* @since 3.1

src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQuery.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @author Mohsin Husen
3131
* @author Peter-Josef Meisch
3232
* @author Farid Faoudi
33-
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html>docs</a>
33+
* @see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html">docs</a>
3434
*/
3535
public class UpdateQuery {
3636

src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryBean.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
import java.util.Optional;
2020
import java.util.Set;
2121

22-
import javax.enterprise.context.spi.CreationalContext;
23-
import javax.enterprise.inject.spi.Bean;
24-
import javax.enterprise.inject.spi.BeanManager;
22+
import jakarta.enterprise.context.spi.CreationalContext;
23+
import jakarta.enterprise.inject.spi.Bean;
24+
import jakarta.enterprise.inject.spi.BeanManager;
2525

2626
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
2727
import org.springframework.data.elasticsearch.repository.support.ElasticsearchRepositoryFactory;
@@ -49,20 +49,20 @@ public class ElasticsearchRepositoryBean<T> extends CdiRepositoryBean<T> {
4949
* @param repositoryType must not be {@literal null}.
5050
* @param beanManager must not be {@literal null}.
5151
* @param detector detector for the custom {@link org.springframework.data.repository.Repository} implementations
52-
* {@link CustomRepositoryImplementationDetector}, can be {@literal null}.
52+
* {@link CustomRepositoryImplementationDetector}, can be {@link Optional#empty()}.
5353
*/
5454
public ElasticsearchRepositoryBean(Bean<ElasticsearchOperations> operations, Set<Annotation> qualifiers,
55-
Class<T> repositoryType, BeanManager beanManager, CustomRepositoryImplementationDetector detector) {
55+
Class<T> repositoryType, BeanManager beanManager, Optional<CustomRepositoryImplementationDetector> detector) {
5656

57-
super(qualifiers, repositoryType, beanManager, Optional.of(detector));
57+
super(qualifiers, repositoryType, beanManager, detector);
5858

5959
Assert.notNull(operations, "Cannot create repository with 'null' for ElasticsearchOperations.");
6060
this.elasticsearchOperationsBean = operations;
6161
}
6262

6363
/*
6464
* (non-Javadoc)
65-
* @see org.springframework.data.repository.cdi.CdiRepositoryBean#create(javax.enterprise.context.spi.CreationalContext, java.lang.Class)
65+
* @see org.springframework.data.repository.cdi.CdiRepositoryBean#create(jakarta.enterprise.context.spi.CreationalContext, java.lang.Class)
6666
*/
6767
@Override
6868
protected T create(CreationalContext<T> creationalContext, Class<T> repositoryType) {

0 commit comments

Comments
 (0)