Skip to content

Commit f113931

Browse files
authored
Merge pull request #5 from Nheverest/master
Fix #4
2 parents 023d49c + 9febd4a commit f113931

13 files changed

Lines changed: 234 additions & 46 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sudo: true
22

33
language: java
44

5-
jdk: oraclejdk8
5+
jdk: openjdk11
66

77
cache:
88
directories:
@@ -17,6 +17,6 @@ install:
1717
- if [[ $TRAVIS_PULL_REQUEST = false ]] && [[ $TRAVIS_BRANCH = master ]] || [[ $TRAVIS_TAG = v* ]]; then GOAL=deploy; else GOAL=install; fi
1818
- if [[ $TRAVIS_TAG = v* ]]; then ADDITIONAL_PROFILES=release; mvn -q -U org.seedstack:seedstack-maven-plugin:release; else ADDITIONAL_PROFILES=snapshots; fi
1919

20-
script: mvn -q -U -T 2 -Pbuild-number,compatibility,bintray,javadoc,$ADDITIONAL_PROFILES $GOAL jacoco:report
20+
script: mvn -q -U -T 2 -Pbuild-number,compatibility,bintray,javadoc,v2,$ADDITIONAL_PROFILES $GOAL jacoco:report
2121

2222
after_success: mvn -q coveralls:report -DrepoToken=$COVERALLS_TOKEN

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Version 3.1.0 (2020-10-29)
2+
3+
* [chg] Update for SeedStack 20.7
4+
* [chg] Compatibility with transport client from elasticsearch v2 to v7
5+
16
# Version 3.0.0 (2017-01-13)
27

38
* [brk] Update to new configuration system.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44

55
ElasticSearch official persistence integration for SeedStack.
66

7+
This addon provides a transport client compatible with elasticsearch from v2 to v7.
8+
9+
It has been tested against following elasticsearch servers:
10+
11+
- 2.4.6
12+
- 5.6.2
13+
- 6.8.10
14+
- 7.9.1
15+
16+
Profiles have added in order to help build the addon with various elasticsearch jar versions.
17+
By default, Profile v2 is used in travis build configuration.
18+
719
# Copyright and license
820

921
This source code is copyrighted by [The SeedStack Authors](https://github.com/seedstack/seedstack/blob/master/AUTHORS) and

pom.xml

Lines changed: 164 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
3-
Copyright (c) 2013-2016, The SeedStack authors <http://seedstack.org>
3+
Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
44
55
This Source Code Form is subject to the terms of the Mozilla Public
66
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -14,19 +14,18 @@
1414
<parent>
1515
<groupId>org.seedstack.poms</groupId>
1616
<artifactId>parent-internal</artifactId>
17-
<version>3.0.0</version>
17+
<version>3.4.9</version>
1818
</parent>
1919

2020
<groupId>org.seedstack.addons.elasticsearch</groupId>
2121
<artifactId>elasticsearch</artifactId>
22-
<version>3.0.0-SNAPSHOT</version>
22+
<version>3.1.0-SNAPSHOT</version>
2323

2424
<properties>
25-
<seed.version>3.0.1</seed.version>
26-
25+
<seed.version>3.10.0</seed.version>
2726
<compatibility.skip>true</compatibility.skip>
28-
2927
<bintray.package>elasticsearch-addon</bintray.package>
28+
<hibernate-validator.version>6.1.5.Final</hibernate-validator.version>
3029
</properties>
3130

3231
<build>
@@ -51,6 +50,7 @@
5150
<includedLicense>IGNORED_LICENSE</includedLicense>
5251
</includedLicenses>
5352
<licenseMerges>
53+
<licenseMerge>Apache 2|Apache 2.0</licenseMerge>
5454
<licenseMerge>Apache 2|Apache License, Version 2.0</licenseMerge>
5555
<licenseMerge>Apache 2|The Apache Software License, Version 2.0</licenseMerge>
5656
<licenseMerge>Apache 2|Apache License 2.0</licenseMerge>
@@ -59,6 +59,7 @@
5959
<licenseMerge>BSD|The New BSD License</licenseMerge>
6060
<licenseMerge>CDDL|CDDL + GPLv2 with classpath exception</licenseMerge>
6161
<licenseMerge>LGPL 3.0|GNU Lesser Public License</licenseMerge>
62+
<licenseMerge>MIT License|The MIT License</licenseMerge>
6263
<licenseMerge>IGNORED_LICENSE|MPL 1.1</licenseMerge>
6364
</licenseMerges>
6465
</configuration>
@@ -74,10 +75,14 @@
7475
<version>${seed.version}</version>
7576
</dependency>
7677
<dependency>
77-
<groupId>org.elasticsearch</groupId>
78-
<artifactId>elasticsearch</artifactId>
79-
<version>2.4.3</version>
80-
<scope>provided</scope>
78+
<groupId>org.hibernate.validator</groupId>
79+
<artifactId>hibernate-validator</artifactId>
80+
<version>${hibernate-validator.version}</version>
81+
</dependency>
82+
<dependency>
83+
<groupId>org.yaml</groupId>
84+
<artifactId>snakeyaml</artifactId>
85+
<version>1.26</version>
8186
</dependency>
8287

8388
<dependency>
@@ -88,10 +93,16 @@
8893
</dependency>
8994
<dependency>
9095
<groupId>org.seedstack.seed</groupId>
91-
<artifactId>seed-testing</artifactId>
96+
<artifactId>seed-testing-junit4</artifactId>
9297
<version>${seed.version}</version>
9398
<scope>test</scope>
9499
</dependency>
100+
<dependency>
101+
<groupId>org.assertj</groupId>
102+
<artifactId>assertj-core</artifactId>
103+
<version>${assertj.version}</version>
104+
<scope>test</scope>
105+
</dependency>
95106
<dependency>
96107
<groupId>ch.qos.logback</groupId>
97108
<artifactId>logback-classic</artifactId>
@@ -151,5 +162,147 @@
151162
</repository>
152163
</repositories>
153164
</profile>
165+
<profile>
166+
<id>v2</id>
167+
<activation>
168+
<activeByDefault>false</activeByDefault>
169+
</activation>
170+
<dependencies>
171+
<dependency>
172+
<groupId>org.elasticsearch</groupId>
173+
<artifactId>elasticsearch</artifactId>
174+
<version>2.4.3</version>
175+
<scope>provided</scope>
176+
</dependency>
177+
</dependencies>
178+
</profile>
179+
<profile>
180+
<id>v5</id>
181+
<activation>
182+
<activeByDefault>false</activeByDefault>
183+
</activation>
184+
<dependencies>
185+
<dependency>
186+
<groupId>org.elasticsearch</groupId>
187+
<artifactId>elasticsearch</artifactId>
188+
<version>5.6.16</version>
189+
<scope>provided</scope>
190+
</dependency>
191+
<dependency>
192+
<groupId>org.elasticsearch.client</groupId>
193+
<artifactId>transport</artifactId>
194+
<version>5.6.16</version>
195+
<scope>provided</scope>
196+
</dependency>
197+
<dependency>
198+
<groupId>org.apache.logging.log4j</groupId>
199+
<artifactId>log4j-api</artifactId>
200+
<version>2.11.1</version>
201+
<scope>provided</scope>
202+
</dependency>
203+
<dependency>
204+
<groupId>org.apache.logging.log4j</groupId>
205+
<artifactId>log4j-core</artifactId>
206+
<version>2.11.1</version>
207+
<scope>provided</scope>
208+
</dependency>
209+
</dependencies>
210+
</profile>
211+
<profile>
212+
<id>v60</id>
213+
<activation>
214+
<activeByDefault>false</activeByDefault>
215+
</activation>
216+
<dependencies>
217+
<dependency>
218+
<groupId>org.elasticsearch</groupId>
219+
<artifactId>elasticsearch</artifactId>
220+
<version>6.0.1</version>
221+
<scope>provided</scope>
222+
</dependency>
223+
<dependency>
224+
<groupId>org.elasticsearch.client</groupId>
225+
<artifactId>transport</artifactId>
226+
<version>6.0.1</version>
227+
<scope>provided</scope>
228+
</dependency>
229+
<dependency>
230+
<groupId>org.apache.logging.log4j</groupId>
231+
<artifactId>log4j-api</artifactId>
232+
<version>2.11.1</version>
233+
<scope>provided</scope>
234+
</dependency>
235+
<dependency>
236+
<groupId>org.apache.logging.log4j</groupId>
237+
<artifactId>log4j-core</artifactId>
238+
<version>2.11.1</version>
239+
<scope>provided</scope>
240+
</dependency>
241+
</dependencies>
242+
</profile>
243+
<profile>
244+
<id>v68</id>
245+
<activation>
246+
<activeByDefault>false</activeByDefault>
247+
</activation>
248+
<dependencies>
249+
<dependency>
250+
<groupId>org.elasticsearch</groupId>
251+
<artifactId>elasticsearch</artifactId>
252+
<version>6.8.10</version>
253+
<scope>provided</scope>
254+
</dependency>
255+
<dependency>
256+
<groupId>org.elasticsearch.client</groupId>
257+
<artifactId>transport</artifactId>
258+
<version>6.8.10</version>
259+
<scope>provided</scope>
260+
</dependency>
261+
<dependency>
262+
<groupId>org.apache.logging.log4j</groupId>
263+
<artifactId>log4j-api</artifactId>
264+
<version>2.11.1</version>
265+
<scope>provided</scope>
266+
</dependency>
267+
<dependency>
268+
<groupId>org.apache.logging.log4j</groupId>
269+
<artifactId>log4j-core</artifactId>
270+
<version>2.11.1</version>
271+
<scope>provided</scope>
272+
</dependency>
273+
</dependencies>
274+
</profile>
275+
<profile>
276+
<id>v79</id>
277+
<activation>
278+
<activeByDefault>false</activeByDefault>
279+
</activation>
280+
<dependencies>
281+
<dependency>
282+
<groupId>org.elasticsearch</groupId>
283+
<artifactId>elasticsearch</artifactId>
284+
<version>7.9.0</version>
285+
<scope>provided</scope>
286+
</dependency>
287+
<dependency>
288+
<groupId>org.elasticsearch.client</groupId>
289+
<artifactId>transport</artifactId>
290+
<version>7.9.0</version>
291+
<scope>provided</scope>
292+
</dependency>
293+
<dependency>
294+
<groupId>org.apache.logging.log4j</groupId>
295+
<artifactId>log4j-api</artifactId>
296+
<version>2.11.1</version>
297+
<scope>provided</scope>
298+
</dependency>
299+
<dependency>
300+
<groupId>org.apache.logging.log4j</groupId>
301+
<artifactId>log4j-core</artifactId>
302+
<version>2.11.1</version>
303+
<scope>provided</scope>
304+
</dependency>
305+
</dependencies>
306+
</profile>
154307
</profiles>
155308
</project>

src/main/java/org/seedstack/elasticsearch/ElasticSearchConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright (c) 2013-2016, The SeedStack authors <http://seedstack.org>
1+
/*
2+
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

src/main/java/org/seedstack/elasticsearch/internal/ElasticSearchClientProxy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright (c) 2013-2016, The SeedStack authors <http://seedstack.org>
1+
/*
2+
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

src/main/java/org/seedstack/elasticsearch/internal/ElasticSearchErrorCode.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright (c) 2013-2016, The SeedStack authors <http://seedstack.org>
1+
/*
2+
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -16,5 +16,7 @@ enum ElasticSearchErrorCode implements ErrorCode {
1616
FORBIDDEN_CLIENT_CLOSE,
1717
INVALID_HOST,
1818
INVALID_PORT,
19-
CANNOT_CREATE_CLIENT, UNKNOWN_HOST
19+
CANNOT_CREATE_CLIENT, UNKNOWN_HOST,
20+
NO_TRANSPORT_CLIENT_FOUND,
21+
CANNOT_CREATE_ADDRESS;
2022
}

src/main/java/org/seedstack/elasticsearch/internal/ElasticSearchModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* Copyright (c) 2013-2016, The SeedStack authors <http://seedstack.org>
1+
/*
2+
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

0 commit comments

Comments
 (0)