Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-bom</artifactId>
<packaging>pom</packaging>
Expand All @@ -33,47 +33,47 @@
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core-shaded</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-mapper-processor</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-mapper-runtime</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-query-builder</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-test-infra</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-metrics-micrometer</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-metrics-microprofile</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
Expand Down
2 changes: 1 addition & 1 deletion core-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-core-shaded</artifactId>
<name>Apache Cassandra Java Driver - core with shaded deps</name>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-core</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion distribution-source/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-distribution-source</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion distribution-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-distribution-tests</artifactId>
<name>Apache Cassandra Java Driver - distribution tests</name>
Expand Down
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-distribution</artifactId>
<!-- Should be pom but Javadoc generation requires a "classpath-capable" package -->
Expand Down
2 changes: 1 addition & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>java-driver-parent</artifactId>
<groupId>org.apache.cassandra</groupId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-examples</artifactId>
<name>Apache Cassandra Java Driver - examples.</name>
Expand Down
2 changes: 1 addition & 1 deletion guava-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-guava-shaded</artifactId>
<name>Apache Cassandra Java Driver - guava shaded dep</name>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-integration-tests</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion mapper-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-mapper-processor</artifactId>
<name>Apache Cassandra Java Driver - object mapper processor</name>
Expand Down
2 changes: 1 addition & 1 deletion mapper-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-mapper-runtime</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion metrics/micrometer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<artifactId>java-driver-metrics-micrometer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion metrics/microprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<artifactId>java-driver-metrics-microprofile</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion osgi-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-osgi-tests</artifactId>
<packaging>jar</packaging>
Expand Down
85 changes: 8 additions & 77 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Cassandra Java Driver</name>
<url>https://github.com/datastax/java-driver</url>
Expand All @@ -51,6 +51,7 @@
<module>bom</module>
</modules>
<properties>
<maven.compiler.release>17</maven.compiler.release>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change replaces the source + target designations used in earlier Maven builds

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<config.version>1.4.1</config.version>
Expand Down Expand Up @@ -459,7 +460,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.15.0</version>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
Expand All @@ -486,7 +487,7 @@
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.3</version>
<version>3.6.2</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -616,30 +617,21 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced by "forceLegacyJavaApi" use below

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this is no longer needed now that we've moved to the new mechanism for deploying errorprone with Java17.

<source>1.8</source>
<target>1.8</target>
<compilerArgs combine.children="override">
<compilerArg>-Xep:FutureReturnValueIgnored:OFF</compilerArg>
<compilerArg>-Xep:PreferJavaTimeOverload:OFF</compilerArg>
<compilerArg>-Xep:AnnotateFormatMethod:OFF</compilerArg>
<compilerArg>-Xep:WildcardImport:WARN</compilerArg>
<compilerArg>-XepExcludedPaths:.*/target/(?:generated-sources|generated-test-sources)/.*</compilerArg>
</compilerArgs>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compiler args above were removed because they didn't seem to be supported on Java17 javac. I need to run back through these again to see if I missed something here.

<forceLegacyJavacApi>true</forceLegacyJavacApi>
<showWarnings>true</showWarnings>
<failOnWarning>true</failOnWarning>
<failOnWarning>false</failOnWarning>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like this change but I couldn't find another way around it.

Without this change the build fails as follows:

[INFO] --- compiler:3.15.0:compile (default-compile) @ java-driver-core ---
[INFO] Compiling 799 source files with javac-with-errorprone [debug release 17] to target/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] Supported source version 'RELEASE_8' from annotation processor 'org.apache.tinkerpop.gremlin.process.traversal.dsl.GremlinDslProcessor' less than -source '17'
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] error: warnings found and -Werror specified
[INFO] 1 error

Problem here stems from the GremlinDsl usage in the graph test code. The annotation processor for the version of Tinkerpop we use states that it produces Java8 code and apparently Maven considers this a warning.

Thing is that upgrading Tinkerpop is a fairly involved process... and perhaps more importantly newer versions of the annotation processor aren't any different. I'm not opposed to a Tinkerpop upgrade in general but I don't think it'll help much for this specific issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've subsequently worked around the original issue by removing the annotation and bringing in static code (more on that elsewhere) but I'm inclined to keep "failOnWarning" set to false. With this setting we still try to run through the entire test suite meaning a single run can give us more useful info about the full range of test failures for the entire source at a given git commit. Perhaps as importantly it also prevents the build from cratering if a single "sketchy" test happens to act up during the current build.

<useIncrementalCompilation>false</useIncrementalCompilation>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac-errorprone</artifactId>
<version>2.8.6</version>
<version>2.16.2</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.3.4</version>
<version>2.50.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -822,67 +814,6 @@ limitations under the License.]]></inlineHeader>
</tags>
</configuration>
<executions>
<execution>
<!-- Check that our "official" API (api.* packages) does not leak unwanted types -->
<id>check-api-leaks</id>
<goals>
<goal>javadoc</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<doclet>com.datastax.oss.doclet.ApiPlumber</doclet>
<docletArtifact>
<groupId>com.datastax.oss</groupId>
<artifactId>api-plumber-doclet</artifactId>
<version>1.0.0</version>
</docletArtifact>
<additionalJOptions>
<!-- API types do not leak internal types -->
<additionalparam>-preventleak</additionalparam>
<additionalparam>com.datastax.oss.driver.internal</additionalparam>
<additionalparam>com.datastax.dse.driver.internal</additionalparam>
<!-- Shaded dependencies (Guava, Netty, etc.) -->
<additionalparam>-preventleak</additionalparam>
<additionalparam>com.datastax.oss.driver.shaded</additionalparam>
<!--
Typesafe config: implementation detail, can be excluded if the user wrote a custom
DriverConfig implementation.
-->
<additionalparam>-preventleak</additionalparam>
<additionalparam>com.typesafe.config</additionalparam>
<!--
DropWizard metrics: can be excluded if metrics are disabled, or the user plugged
another framework.
-->
<additionalparam>-preventleak</additionalparam>
<additionalparam>com.codahale.metrics</additionalparam>
<!--
HDR Histogram: implementation detail of Timer metrics, can be excluded if they are
all disabled.
-->
<additionalparam>-preventleak</additionalparam>
<additionalparam>org.HdrHistogram</additionalparam>
<!-- Netty: implementation detail, only tweakable via internal classes. -->
<additionalparam>-preventleak</additionalparam>
<additionalparam>io.netty</additionalparam>
<!-- JNR: can be excluded, the driver will fallback to non-native alternatives -->
<additionalparam>-preventleak</additionalparam>
<additionalparam>jnr</additionalparam>
<additionalparam>-preventleak</additionalparam>
<additionalparam>com.kenai.constantine</additionalparam>
<additionalparam>-preventleak</additionalparam>
<additionalparam>com.kenai.jffi</additionalparam>
<additionalparam>-preventleak</additionalparam>
<additionalparam>com.kenai.jnr</additionalparam>
<!-- Compression libraries: optional dependencies -->
<additionalparam>-preventleak</additionalparam>
<additionalparam>net.jpountz</additionalparam>
<additionalparam>-preventleak</additionalparam>
<additionalparam>org.xerial.snappy</additionalparam>
</additionalJOptions>
<useStandardDocletOptions>false</useStandardDocletOptions>
</configuration>
</execution>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I had to remove the api-plumber-doclet ref entirely.

Using the version that was in the build (version 1.0.0) gives the following errors now:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.348 s
[INFO] Finished at: 2026-08-17T12:36:17-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc (check-api-leaks) on project java-driver-guava-shaded: An error has occurred in Javadoc report generation: 
[ERROR] Exit code: 1 - error: Class com.datastax.oss.doclet.ApiPlumber is not a valid doclet.
[ERROR]   Note: As of JDK 13, the com.sun.javadoc API is no longer supported.
[ERROR] 
[ERROR] Command line was: /home/mersault/.jabba/jdk/openjdk@17.0.2/bin/javadoc -preventleak com.datastax.oss.driver.internal com.datastax.dse.driver.internal -preventleak com.datastax.oss.driver.shaded -preventleak com.typesafe.config -preventleak com.codahale.metrics -preventleak org.HdrHistogram -preventleak io.netty -preventleak jnr -preventleak com.kenai.constantine -preventleak com.kenai.jffi -preventleak com.kenai.jnr -preventleak net.jpountz -preventleak org.xerial.snappy @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/home/mersault/work/git/cassandra-java-driver-absurdfarce/guava-shaded/target/site/apidocs' dir.
[ERROR] 
[ERROR] -> [Help 1]

Version 2.0.0 of the doclet was intended to address exactly this issue but it also seems to run aground:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.342 s
[INFO] Finished at: 2026-08-17T12:38:57-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc (check-api-leaks) on project java-driver-guava-shaded: An error has occurred in Javadoc report generation: 
[ERROR] Exit code: 2 - error: No source files for package com.datastax.dse.driver.internal
[ERROR] 1 error
[ERROR] 
[ERROR] Command line was: /home/mersault/.jabba/jdk/openjdk@17.0.2/bin/javadoc -preventleak com.datastax.oss.driver.internal com.datastax.dse.driver.internal -preventleak com.datastax.oss.driver.shaded -preventleak com.typesafe.config -preventleak com.codahale.metrics -preventleak org.HdrHistogram -preventleak io.netty -preventleak jnr -preventleak com.kenai.constantine -preventleak com.kenai.jffi -preventleak com.kenai.jnr -preventleak net.jpountz -preventleak org.xerial.snappy @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/home/mersault/work/git/cassandra-java-driver-absurdfarce/guava-shaded/target/site/apidocs' dir.
[ERROR] 
[ERROR] -> [Help 1]

I'm wondering if the underlying issue here isn't just that there's no real source in guava-shaded and if that's causing the plugin to barf.

For now I've simply disabled this doclet all together. This is another change I'd like to revisit (and ideally revert) at some point in the future.

<execution>
<!-- Generate aggregated Javadoc for specified modules -->
<id>aggregate-javadoc</id>
Expand Down
2 changes: 1 addition & 1 deletion query-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-query-builder</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion test-infra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-parent</artifactId>
<version>4.19.4-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>java-driver-test-infra</artifactId>
<packaging>bundle</packaging>
Expand Down