Skip to content

Commit 415f789

Browse files
authored
JAVA-2982: Follow-up to recent PR making ESRI an optional dependency (#1580)
1 parent cbb8194 commit 415f789

File tree

4 files changed

+51
-37
lines changed

4 files changed

+51
-37
lines changed

core-shaded/pom.xml

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@
146146
-->
147147
<include>com.datastax.oss:java-driver-core</include>
148148
<include>io.netty:*</include>
149-
<include>com.esri.geometry:*</include>
150-
<include>org.json:*</include>
151-
<include>org.codehaus.jackson:*</include>
152149
<include>com.fasterxml.jackson.core:*</include>
153150
</includes>
154151
</artifactSet>
@@ -161,18 +158,6 @@
161158
<pattern>io.netty</pattern>
162159
<shadedPattern>com.datastax.oss.driver.shaded.netty</shadedPattern>
163160
</relocation>
164-
<relocation>
165-
<pattern>com.esri</pattern>
166-
<shadedPattern>com.datastax.oss.driver.shaded.esri</shadedPattern>
167-
</relocation>
168-
<relocation>
169-
<pattern>org.json</pattern>
170-
<shadedPattern>com.datastax.oss.driver.shaded.json</shadedPattern>
171-
</relocation>
172-
<relocation>
173-
<pattern>org.codehaus.jackson</pattern>
174-
<shadedPattern>com.datastax.oss.driver.shaded.codehaus.jackson</shadedPattern>
175-
</relocation>
176161
<relocation>
177162
<pattern>com.fasterxml.jackson</pattern>
178163
<shadedPattern>com.datastax.oss.driver.shaded.fasterxml.jackson</shadedPattern>
@@ -194,24 +179,6 @@
194179
<exclude>META-INF/**</exclude>
195180
</excludes>
196181
</filter>
197-
<filter>
198-
<artifact>com.esri.geometry:*</artifact>
199-
<excludes>
200-
<exclude>META-INF/**</exclude>
201-
</excludes>
202-
</filter>
203-
<filter>
204-
<artifact>org.json:*</artifact>
205-
<excludes>
206-
<exclude>META-INF/**</exclude>
207-
</excludes>
208-
</filter>
209-
<filter>
210-
<artifact>org.codehaus.jackson:*</artifact>
211-
<excludes>
212-
<exclude>META-INF/**</exclude>
213-
</excludes>
214-
</filter>
215182
<filter>
216183
<artifact>com.fasterxml.jackson.core:*</artifact>
217184
<excludes>
@@ -311,6 +278,11 @@
311278
<artifactId>jctools-core</artifactId>
312279
<version>2.1.2</version>
313280
</additionalDependency>
281+
<additionalDependency>
282+
<groupId>com.esri.geometry</groupId>
283+
<artifactId>esri-geometry-api</artifactId>
284+
<version>1.2.1</version>
285+
</additionalDependency>
314286
</additionalDependencies>
315287
</configuration>
316288
</execution>
@@ -340,7 +312,7 @@
340312
<!--
341313
1) Don't import packages shaded in the driver bundle. Note that shaded-guava lives
342314
in its own bundle, so we must explicitly *not* mention it here.
343-
-->!com.datastax.oss.driver.shaded.netty.*, !com.datastax.oss.driver.shaded.esri.*, !com.datastax.oss.driver.shaded.json.*, !com.datastax.oss.driver.shaded.codehaus.jackson.*, !com.datastax.oss.driver.shaded.fasterxml.jackson.*,
315+
-->!com.datastax.oss.driver.shaded.netty.*, !com.datastax.oss.driver.shaded.fasterxml.jackson.*,
344316
<!--
345317
2) Don't include the packages below because they contain annotations only and are
346318
not required at runtime.
@@ -366,7 +338,7 @@
366338
1) The driver's packages (API and internal);
367339
2) All shaded packages, except Guava which resides in a separate bundle.
368340
-->
369-
<Export-Package>com.datastax.oss.driver.api.core.*, com.datastax.oss.driver.internal.core.*, com.datastax.dse.driver.api.core.*, com.datastax.dse.driver.internal.core.*, com.datastax.oss.driver.shaded.netty.*, com.datastax.oss.driver.shaded.esri.*, com.datastax.oss.driver.shaded.json.*, com.datastax.oss.driver.shaded.codehaus.jackson.*, com.datastax.oss.driver.shaded.fasterxml.jackson.*,</Export-Package>
341+
<Export-Package>com.datastax.oss.driver.api.core.*, com.datastax.oss.driver.internal.core.*, com.datastax.dse.driver.api.core.*, com.datastax.dse.driver.internal.core.*, com.datastax.oss.driver.shaded.netty.*, com.datastax.oss.driver.shaded.fasterxml.jackson.*,</Export-Package>
370342
</instructions>
371343
<rebuildBundle>true</rebuildBundle>
372344
</configuration>

integration-tests/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@
211211
<artifactId>blockhound-junit-platform</artifactId>
212212
<scope>test</scope>
213213
</dependency>
214+
<dependency>
215+
<groupId>com.esri.geometry</groupId>
216+
<artifactId>esri-geometry-api</artifactId>
217+
<scope>test</scope>
218+
</dependency>
214219
</dependencies>
215220
<build>
216221
<plugins>

manual/core/integration/README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,9 @@ don't use any of the above features, you can safely exclude the dependency:
479479
Our [geospatial types](../dse/geotypes/) implementation is based on the [Esri Geometry
480480
API](https://github.com/Esri/geometry-api-java).
481481

482-
Esri is declared as a required dependency, but the driver can operate normally without it. If you
483-
don't use geospatial types anywhere in your application, you can exclude the dependency:
482+
For driver versions >= 4.4.0 and < 4.14.0 Esri is declared as a required dependency,
483+
although the driver can operate normally without it. If you don't use geospatial types
484+
anywhere in your application you can exclude the dependency:
484485

485486
```xml
486487
<dependency>
@@ -496,6 +497,22 @@ don't use geospatial types anywhere in your application, you can exclude the dep
496497
</dependency>
497498
```
498499

500+
Starting with driver 4.14.0 Esri has been changed to an optional dependency. You no longer have to
501+
explicitly exclude the dependency if it's not used, but if you do wish to make use of the Esri
502+
library you must now explicitly specify it as a dependency :
503+
504+
```xml
505+
<dependency>
506+
<groupId>com.esri.geometry</groupId>
507+
<artifactId>esri-geometry-api</artifactId>
508+
<version>${esri.version}</version>
509+
</dependency>
510+
```
511+
512+
In the dependency specification above you should use any 1.2.x version of Esri (we recommend
513+
1.2.1). These versions are older than the current 2.x versions of the library but they are
514+
guaranteed to be fully compatible with DSE.
515+
499516
#### TinkerPop
500517

501518
[Apache TinkerPop™](http://tinkerpop.apache.org/) is used in our [graph API](../dse/graph/),

upgrade_guide/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ request cannot be executed because all nodes tried were busy. Previously you wou
99
`NoNodeAvailableException` but you will now get back an `AllNodesFailedException` where the
1010
`getAllErrors` map contains a `NodeUnavailableException` for that node.
1111

12+
#### Esri Geometry dependency now optional
13+
14+
Previous versions of the Java driver defined a mandatory dependency on the Esri geometry library.
15+
This library offered support for primitive geometric types supported by DSE. As of driver 4.14.0
16+
this dependency is now optional.
17+
18+
If you do not use DSE (or if you do but do not use the support for geometric types within DSE) you
19+
should experience no disruption. If you are using geometric types with DSE you'll now need to
20+
explicitly declare a dependency on the Esri library:
21+
22+
```xml
23+
<dependency>
24+
<groupId>com.esri.geometry</groupId>
25+
<artifactId>esri-geometry-api</artifactId>
26+
<version>${esri.version}</version>
27+
</dependency>
28+
```
29+
30+
See the [integration](../manual/core/integration/#esri) section in the manual for more details.
31+
1232
### 4.13.0
1333

1434
#### Enhanced support for GraalVM native images

0 commit comments

Comments
 (0)