Skip to content

Commit 4264080

Browse files
committed
Branch 5.0.x.
1 parent bf08000 commit 4264080

22 files changed

+120
-78
lines changed

Diff for: Jenkinsfile

+33-5
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'
@@ -119,12 +119,12 @@ pipeline {
119119
options { timeout(time: 20, unit: 'MINUTES') }
120120

121121
environment {
122-
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
122+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
123123
}
124124

125125
steps {
126126
script {
127-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
127+
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
128128
docker.image(p['docker.java.lts.image']).inside(p['docker.java.inside.basic']) {
129129
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 ' +
130130
'-Dartifactory.server=https://repo.spring.io ' +
@@ -139,6 +139,34 @@ pipeline {
139139
}
140140
}
141141
}
142+
stage('Publish documentation') {
143+
when {
144+
branch 'main'
145+
}
146+
agent {
147+
label 'data'
148+
}
149+
options { timeout(time: 20, unit: 'MINUTES') }
150+
151+
environment {
152+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
153+
}
154+
155+
steps {
156+
script {
157+
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
158+
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
159+
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 ' +
160+
'-Dartifactory.server=https://repo.spring.io ' +
161+
"-Dartifactory.username=${ARTIFACTORY_USR} " +
162+
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
163+
"-Dartifactory.distribution-repository=temp-private-local " +
164+
'-Dmaven.test.skip=true clean deploy -U -B'
165+
}
166+
}
167+
}
168+
}
169+
}
142170
}
143171

144172
post {

Diff for: 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>

Diff for: 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">

Diff for: 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
*

Diff for: 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}.

Diff for: 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

Diff for: 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}.

Diff for: src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchOperations.java

-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ default <T> Flux<SearchHit<T>> search(Query query, Class<T> entityType, IndexCoo
126126
*
127127
* @param query must not be {@literal null}.
128128
* @param entityType must not be {@literal null}.
129-
* @param <T>
130129
* @return a {@link Mono} emitting matching entities in a {@link SearchHits}.
131130
* @since 4.1
132131
*/
@@ -140,7 +139,6 @@ default <T> Mono<SearchPage<T>> searchForPage(Query query, Class<T> entityType)
140139
* @param query must not be {@literal null}.
141140
* @param entityType must not be {@literal null}.
142141
* @param resultType the projection result type.
143-
* @param <T>
144142
* @return a {@link Mono} emitting matching entities in a {@link SearchHits}.
145143
* @since 4.1
146144
*/
@@ -152,7 +150,6 @@ default <T> Mono<SearchPage<T>> searchForPage(Query query, Class<T> entityType)
152150
* @param query must not be {@literal null}.
153151
* @param entityType must not be {@literal null}.
154152
* @param index the target index, must not be {@literal null}
155-
* @param <T>
156153
* @return a {@link Mono} emitting matching entities in a {@link SearchHits}.
157154
* @since 4.1
158155
*/

Diff for: 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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +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
24-
* Data Mongodb
23+
* Interface definition for structures defined in <a href="https://geojson.org">GeoJSON</a>
24+
* format. copied from Spring Data Mongodb
2525
*
2626
* @author Christoph Strobl
2727
* @since 1.7

Diff for: 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;

Diff for: 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

Diff for: 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)