Skip to content

Commit 0320693

Browse files
bbuckoolim7t
authored andcommitted
JAVA-2435: Add automatic-module-names to the manifests
1 parent ffc4956 commit 0320693

10 files changed

Lines changed: 82 additions & 0 deletions

File tree

changelog/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### 4.6.0 (in progress)
66

7+
- [improvement] JAVA-2435: Add automatic-module-names to the manifests
78
- [new feature] JAVA-2054: Add now_in_seconds to protocol v5 query messages
89
- [bug] JAVA-2711: Fix handling of UDT keys in the mapper
910
- [improvement] JAVA-2631: Add getIndex() shortcuts to TableMetadata

core-shaded/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@
303303
</goals>
304304
<configuration>
305305
<instructions>
306+
<Automatic-Module-Name>com.datastax.oss.driver.core</Automatic-Module-Name>
306307
<Bundle-SymbolicName>com.datastax.oss.driver.core</Bundle-SymbolicName>
307308
<!--
308309
Allow importing code from other packages

core/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,13 @@
218218
<plugins>
219219
<plugin>
220220
<artifactId>maven-jar-plugin</artifactId>
221+
<configuration>
222+
<archive>
223+
<manifestEntries>
224+
<Automatic-Module-Name>com.datastax.oss.driver.core</Automatic-Module-Name>
225+
</manifestEntries>
226+
</archive>
227+
</configuration>
221228
<executions>
222229
<execution>
223230
<id>test-jar</id>

examples/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,16 @@
152152
</annotationProcessorPaths>
153153
</configuration>
154154
</plugin>
155+
<plugin>
156+
<artifactId>maven-jar-plugin</artifactId>
157+
<configuration>
158+
<archive>
159+
<manifestEntries>
160+
<Automatic-Module-Name>com.datastax.oss.driver.examples</Automatic-Module-Name>
161+
</manifestEntries>
162+
</archive>
163+
</configuration>
164+
</plugin>
155165
<plugin>
156166
<groupId>org.revapi</groupId>
157167
<artifactId>revapi-maven-plugin</artifactId>

integration-tests/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@
192192
<plugins>
193193
<plugin>
194194
<artifactId>maven-jar-plugin</artifactId>
195+
<configuration>
196+
<archive>
197+
<manifestEntries>
198+
<Automatic-Module-Name>com.datastax.oss.driver.tests.integration</Automatic-Module-Name>
199+
</manifestEntries>
200+
</archive>
201+
</configuration>
195202
<executions>
196203
<execution>
197204
<id>test-jar</id>

manual/core/integration/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,25 @@ If your build tool can't fetch dependencies from Maven central, we publish a bin
236236
The driver and its dependencies must be in the compile-time classpath. Application resources, such
237237
as `application.conf` and `logback.xml` in our previous examples, must be in the runtime classpath.
238238

239+
### JPMS support
240+
241+
All the driver's artifacts are JPMS automatic modules.
242+
243+
Note that TinkerPop cannot currently be used in a JPMS application. You will get the following
244+
error:
245+
246+
```
247+
Error occurred during initialization of boot layer
248+
java.lang.module.FindException: Unable to derive module descriptor for /path/to/gremlin-shaded-3.4.5.jar
249+
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class com.fasterxml.jackson.core.JsonFactory not in module
250+
```
251+
252+
This is a known issue that will be resolved in TinkerPop 3.4.7. The driver will upgrade as soon as
253+
possible, see [JAVA-2726](https://datastax-oss.atlassian.net/browse/JAVA-2726).
254+
255+
Unfortunately, the only workaround in the meantime is to exclude TinkerPop dependencies, as
256+
explained [here](#tinker-pop). Graph functionality won't be available.
257+
239258
### Driver dependencies
240259

241260
The driver depends on a number of third-party libraries; some of those dependencies are opt-in,

mapper-processor/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@
121121
</plugin>
122122
<plugin>
123123
<artifactId>maven-jar-plugin</artifactId>
124+
<configuration>
125+
<archive>
126+
<manifestEntries>
127+
<Automatic-Module-Name>com.datastax.oss.driver.mapper.processor</Automatic-Module-Name>
128+
</manifestEntries>
129+
</archive>
130+
</configuration>
124131
<executions>
125132
<!--
126133
This module only has internal classes, yet we need a javadoc JAR to pass Maven central

mapper-runtime/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@
110110
</testResource>
111111
</testResources>
112112
<plugins>
113+
<plugin>
114+
<artifactId>maven-jar-plugin</artifactId>
115+
<configuration>
116+
<archive>
117+
<manifestEntries>
118+
<Automatic-Module-Name>com.datastax.oss.driver.mapper.runtime</Automatic-Module-Name>
119+
</manifestEntries>
120+
</archive>
121+
</configuration>
122+
</plugin>
113123
<plugin>
114124
<artifactId>maven-surefire-plugin</artifactId>
115125
<configuration>

query-builder/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@
9595
</testResource>
9696
</testResources>
9797
<plugins>
98+
<plugin>
99+
<artifactId>maven-jar-plugin</artifactId>
100+
<configuration>
101+
<archive>
102+
<manifestEntries>
103+
<Automatic-Module-Name>com.datastax.oss.driver.querybuilder</Automatic-Module-Name>
104+
</manifestEntries>
105+
</archive>
106+
</configuration>
107+
</plugin>
98108
<plugin>
99109
<groupId>org.apache.felix</groupId>
100110
<artifactId>maven-bundle-plugin</artifactId>

test-infra/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@
6767
</dependencies>
6868
<build>
6969
<plugins>
70+
<plugin>
71+
<artifactId>maven-jar-plugin</artifactId>
72+
<configuration>
73+
<archive>
74+
<manifestEntries>
75+
<Automatic-Module-Name>com.datastax.oss.driver.tests.infrastructure</Automatic-Module-Name>
76+
</manifestEntries>
77+
</archive>
78+
</configuration>
79+
</plugin>
7080
<plugin>
7181
<groupId>org.apache.felix</groupId>
7282
<artifactId>maven-bundle-plugin</artifactId>

0 commit comments

Comments
 (0)