Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
31 changes: 6 additions & 25 deletions Jenkinsfile-datastax
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ def executeTests() {
. ${JABBA_SHELL}
jabba use 1.8

if [ "${JABBA_VERSION}" != "1.8" ]; then
SKIP_JAVADOCS=true
else
SKIP_JAVADOCS=false
fi

INTEGRATION_TESTS_FILTER_ARGUMENT=""
if [ ! -z "${INTEGRATION_TESTS_FILTER}" ]; then
INTEGRATION_TESTS_FILTER_ARGUMENT="-Dit.test=${INTEGRATION_TESTS_FILTER}"
Expand All @@ -148,7 +142,7 @@ def executeTests() {
-DtestJavaHome='''+testJavaHome+''' \
-DfailIfNoTests=false \
-Dmaven.test.failure.ignore=true \
-Dmaven.javadoc.skip=${SKIP_JAVADOCS} \
-Dmaven.javadoc.skip=true \
-Dccm.version=${CCM_CASSANDRA_VERSION} \
-Dccm.distribution=${CCM_SERVER_TYPE:cassandra} \
-Dproxy.path=${HOME}/proxy \
Expand Down Expand Up @@ -329,8 +323,6 @@ pipeline {
choice(
name: 'ADHOC_BUILD_AND_EXECUTE_TESTS_JABBA_VERSION',
choices: [
'1.8', // Oracle JDK version 1.8 (current default)
'openjdk@1.11', // OpenJDK version 11
'openjdk@1.17', // OpenJDK version 17
'openjdk@1.21' // OpenJDK version 21
],
Expand All @@ -342,14 +334,6 @@ pipeline {
<th align="left">Choice</th>
<th align="left">Description</th>
</tr>
<tr>
<td><strong>1.8</strong></td>
<td>Oracle JDK version 1.8 (<i>Used for compiling regardless of choice</i>)</td>
</tr>
<tr>
<td><strong>openjdk@1.11</strong></td>
<td>OpenJDK version 11</td>
</tr>
<tr>
<td><strong>openjdk@1.17</strong></td>
<td>OpenJDK version 17</td>
Expand Down Expand Up @@ -394,9 +378,8 @@ pipeline {
// schedules only run against release branches (i.e. 3.x, 4.x, 4.5.x, etc.)
parameterizedCron(branchPatternCron().matcher(env.BRANCH_NAME).matches() ? """
# Every weekend (Saturday, Sunday) around 2:00 AM
H 2 * * 0 %CI_SCHEDULE=WEEKENDS;CI_SCHEDULE_SERVER_VERSIONS=4.0 4.1 5.0 dse-4.8.16 dse-5.0.15 dse-5.1.35 dse-6.0.18 dse-6.7.17;CI_SCHEDULE_JABBA_VERSION=1.8
H 2 * * 0 %CI_SCHEDULE=WEEKENDS;CI_SCHEDULE_SERVER_VERSIONS=4.0 4.1 5.0 dse-4.8.16 dse-5.0.15 dse-5.1.35 dse-6.0.18 dse-6.7.17;CI_SCHEDULE_JABBA_VERSION=openjdk@1.17
# Every weeknight (Monday - Friday) around 12:00 PM noon
H 12 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;CI_SCHEDULE_SERVER_VERSIONS=4.1 5.0 dse-6.8.30 dse-6.9.0 hcd-1.0.0;CI_SCHEDULE_JABBA_VERSION=openjdk@1.11
H 12 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;CI_SCHEDULE_SERVER_VERSIONS=4.1 5.0 dse-6.8.30 dse-6.9.0 hcd-1.0.0;CI_SCHEDULE_JABBA_VERSION=openjdk@1.17
""" : "")
}
Expand Down Expand Up @@ -439,9 +422,7 @@ pipeline {
}
axis {
name 'JABBA_VERSION'
values '1.8', // jdk8
'openjdk@1.11', // jdk11
'openjdk@1.17', // jdk17
values 'openjdk@1.17', // jdk17
'openjdk@1.21' // jdk21
}
}
Expand All @@ -468,7 +449,7 @@ pipeline {
}
stage('Build-Driver') {
steps {
buildDriver('1.8')
buildDriver('openjdk@1.17')
}
}
stage('Execute-Tests') {
Expand Down Expand Up @@ -583,7 +564,7 @@ pipeline {
}
stage('Build-Driver') {
steps {
buildDriver('1.8')
buildDriver('openjdk@1.17')
}
}
stage('Execute-Tests') {
Expand Down Expand Up @@ -611,7 +592,7 @@ pipeline {
when {
allOf {
environment name: 'SERVER_VERSION', value: '4.0'
environment name: 'JABBA_VERSION', value: '1.8'
environment name: 'JABBA_VERSION', value: 'openjdk@1.17'
}
}
steps {
Expand Down
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
13 changes: 12 additions & 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 Expand Up @@ -326,6 +326,17 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-mapper-processor</artifactId>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
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
45 changes: 18 additions & 27 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 @@ -615,33 +616,22 @@
<plugin>
<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

<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>

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.

<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>

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.

<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>
Expand Down Expand Up @@ -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>
Expand Down
Loading