-
Notifications
You must be signed in to change notification settings - Fork 890
Compile the driver with Java17 #2096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
01f1795
11e47da
182a8bf
495e68a
df1ec90
7a438b6
1c6f90d
c4ce2b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
|
@@ -51,6 +51,7 @@ | |
| <module>bom</module> | ||
| </modules> | ||
| <properties> | ||
| <maven.compiler.release>17</maven.compiler.release> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
| <config.version>1.4.1</config.version> | ||
|
|
@@ -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> | ||
|
|
@@ -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> | ||
|
|
@@ -615,33 +616,22 @@ | |
| <plugin> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <configuration> | ||
| <compilerId>javac-with-errorprone</compilerId> | ||
| <forceJavacCompilerUse>true</forceJavacCompilerUse> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replaced by "forceLegacyJavaApi" use below |
||
| <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> | ||
| <encoding>UTF-8</encoding> | ||
| <compilerArgs> | ||
| <arg>-XDcompilePolicy=simple -Xplugin:ErrorProne \ -Xep:FutureReturnValueIgnored:OFF \ -Xep:PreferJavaTimeOverload:OFF \ -Xep:AnnotateFormatMethod:OFF \ -Xep:WildcardImport:WARN \ -XepExcludedPaths:.*/target/(?:generated-sources|generated-test-sources)/.* \</arg> | ||
| </compilerArgs> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| <annotationProcessorPaths combine.children="append"> | ||
| <path> | ||
| <groupId>com.google.errorprone</groupId> | ||
| <artifactId>error_prone_core</artifactId> | ||
| <!-- ErrorProne 2.43.0 and up require JDK 21 (https://github.com/google/error-prone/releases/tag/v2.43.0) --> | ||
| <version>2.42.0</version> | ||
| </path> | ||
| </annotationProcessorPaths> | ||
| <showWarnings>true</showWarnings> | ||
| <failOnWarning>true</failOnWarning> | ||
| <failOnWarning>false</failOnWarning> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: 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. |
||
| <useIncrementalCompilation>false</useIncrementalCompilation> | ||
| </configuration> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.codehaus.plexus</groupId> | ||
| <artifactId>plexus-compiler-javac-errorprone</artifactId> | ||
| <version>2.8.6</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.errorprone</groupId> | ||
| <artifactId>error_prone_core</artifactId> | ||
| <version>2.3.4</version> | ||
| </dependency> | ||
| </dependencies> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>com.coveo</groupId> | ||
|
|
@@ -834,12 +824,13 @@ limitations under the License.]]></inlineHeader> | |
| <docletArtifact> | ||
| <groupId>com.datastax.oss</groupId> | ||
| <artifactId>api-plumber-doclet</artifactId> | ||
| <version>1.0.0</version> | ||
| <version>2.0.0</version> | ||
| </docletArtifact> | ||
| <additionalJOptions> | ||
| <!-- API types do not leak internal types --> | ||
| <additionalparam>-preventleak</additionalparam> | ||
| <additionalparam>com.datastax.oss.driver.internal</additionalparam> | ||
| <additionalparam>-preventleak</additionalparam> | ||
| <additionalparam>com.datastax.dse.driver.internal</additionalparam> | ||
| <!-- Shaded dependencies (Guava, Netty, etc.) --> | ||
| <additionalparam>-preventleak</additionalparam> | ||
|
|
||
There was a problem hiding this comment.
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