Skip to content

Commit

Permalink
JAVA-2982: Follow-up to recent PR making ESRI an optional dependency (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
absurdfarce authored Jan 25, 2022
1 parent cbb8194 commit 415f789
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 37 deletions.
42 changes: 7 additions & 35 deletions core-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@
-->
<include>com.datastax.oss:java-driver-core</include>
<include>io.netty:*</include>
<include>com.esri.geometry:*</include>
<include>org.json:*</include>
<include>org.codehaus.jackson:*</include>
<include>com.fasterxml.jackson.core:*</include>
</includes>
</artifactSet>
Expand All @@ -161,18 +158,6 @@
<pattern>io.netty</pattern>
<shadedPattern>com.datastax.oss.driver.shaded.netty</shadedPattern>
</relocation>
<relocation>
<pattern>com.esri</pattern>
<shadedPattern>com.datastax.oss.driver.shaded.esri</shadedPattern>
</relocation>
<relocation>
<pattern>org.json</pattern>
<shadedPattern>com.datastax.oss.driver.shaded.json</shadedPattern>
</relocation>
<relocation>
<pattern>org.codehaus.jackson</pattern>
<shadedPattern>com.datastax.oss.driver.shaded.codehaus.jackson</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>com.datastax.oss.driver.shaded.fasterxml.jackson</shadedPattern>
Expand All @@ -194,24 +179,6 @@
<exclude>META-INF/**</exclude>
</excludes>
</filter>
<filter>
<artifact>com.esri.geometry:*</artifact>
<excludes>
<exclude>META-INF/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.json:*</artifact>
<excludes>
<exclude>META-INF/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.codehaus.jackson:*</artifact>
<excludes>
<exclude>META-INF/**</exclude>
</excludes>
</filter>
<filter>
<artifact>com.fasterxml.jackson.core:*</artifact>
<excludes>
Expand Down Expand Up @@ -311,6 +278,11 @@
<artifactId>jctools-core</artifactId>
<version>2.1.2</version>
</additionalDependency>
<additionalDependency>
<groupId>com.esri.geometry</groupId>
<artifactId>esri-geometry-api</artifactId>
<version>1.2.1</version>
</additionalDependency>
</additionalDependencies>
</configuration>
</execution>
Expand Down Expand Up @@ -340,7 +312,7 @@
<!--
1) Don't import packages shaded in the driver bundle. Note that shaded-guava lives
in its own bundle, so we must explicitly *not* mention it here.
-->!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.*,
-->!com.datastax.oss.driver.shaded.netty.*, !com.datastax.oss.driver.shaded.fasterxml.jackson.*,
<!--
2) Don't include the packages below because they contain annotations only and are
not required at runtime.
Expand All @@ -366,7 +338,7 @@
1) The driver's packages (API and internal);
2) All shaded packages, except Guava which resides in a separate bundle.
-->
<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>
<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>
</instructions>
<rebuildBundle>true</rebuildBundle>
</configuration>
Expand Down
5 changes: 5 additions & 0 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@
<artifactId>blockhound-junit-platform</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.esri.geometry</groupId>
<artifactId>esri-geometry-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
21 changes: 19 additions & 2 deletions manual/core/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,9 @@ don't use any of the above features, you can safely exclude the dependency:
Our [geospatial types](../dse/geotypes/) implementation is based on the [Esri Geometry
API](https://github.com/Esri/geometry-api-java).

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

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

Starting with driver 4.14.0 Esri has been changed to an optional dependency. You no longer have to
explicitly exclude the dependency if it's not used, but if you do wish to make use of the Esri
library you must now explicitly specify it as a dependency :

```xml
<dependency>
<groupId>com.esri.geometry</groupId>
<artifactId>esri-geometry-api</artifactId>
<version>${esri.version}</version>
</dependency>
```

In the dependency specification above you should use any 1.2.x version of Esri (we recommend
1.2.1). These versions are older than the current 2.x versions of the library but they are
guaranteed to be fully compatible with DSE.

#### TinkerPop

[Apache TinkerPop™](http://tinkerpop.apache.org/) is used in our [graph API](../dse/graph/),
Expand Down
20 changes: 20 additions & 0 deletions upgrade_guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@ request cannot be executed because all nodes tried were busy. Previously you wou
`NoNodeAvailableException` but you will now get back an `AllNodesFailedException` where the
`getAllErrors` map contains a `NodeUnavailableException` for that node.

#### Esri Geometry dependency now optional

Previous versions of the Java driver defined a mandatory dependency on the Esri geometry library.
This library offered support for primitive geometric types supported by DSE. As of driver 4.14.0
this dependency is now optional.

If you do not use DSE (or if you do but do not use the support for geometric types within DSE) you
should experience no disruption. If you are using geometric types with DSE you'll now need to
explicitly declare a dependency on the Esri library:

```xml
<dependency>
<groupId>com.esri.geometry</groupId>
<artifactId>esri-geometry-api</artifactId>
<version>${esri.version}</version>
</dependency>
```

See the [integration](../manual/core/integration/#esri) section in the manual for more details.

### 4.13.0

#### Enhanced support for GraalVM native images
Expand Down

0 comments on commit 415f789

Please sign in to comment.