Skip to content

Commit 8265325

Browse files
committed
ci: restore Java 11 and JDK 17 validation
Update maintained CI paths for the Java 11 baseline, including JDK 17 compiler flags, javadoc skips, authenticated version lookup, examples compilation, and runtime-specific reports.
1 parent a6c2792 commit 8265325

7 files changed

Lines changed: 51 additions & 5 deletions

File tree

.github/workflows/tests@v1.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
steps:
4242
- name: Checkout source
4343
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
44+
with:
45+
persist-credentials: false
4446

4547
- name: Set up JDK ${{ matrix.java-version }}
4648
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
@@ -115,6 +117,8 @@ jobs:
115117
steps:
116118
- name: Checkout source
117119
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
120+
with:
121+
persist-credentials: false
118122

119123
- name: Set up JDK ${{ matrix.java-version }}
120124
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
@@ -182,6 +186,11 @@ jobs:
182186
cassandra-version: [3-LATEST, 4-LATEST]
183187
java-version: [11, 17]
184188
test-group: [parallelizable, serial, isolated]
189+
exclude:
190+
- cassandra-version: 3-LATEST
191+
java-version: 17
192+
- cassandra-version: 4-LATEST
193+
java-version: 11
185194
fail-fast: false
186195

187196
steps:
@@ -212,6 +221,7 @@ jobs:
212221
id: cassandra-version
213222
env:
214223
CASSANDRA_VERSION: ${{ matrix.cassandra-version }}
224+
GET_VERSION_VERSION: 0.4.5
215225
GH_TOKEN: ${{ github.token }}
216226
run: make resolve-cassandra-version
217227

@@ -226,6 +236,7 @@ jobs:
226236
if: steps.ccm-cache.outputs.cache-hit != 'true'
227237
env:
228238
CASSANDRA_VERSION_RESOLVED: ${{ steps.cassandra-version.outputs.value }}
239+
GET_VERSION_VERSION: 0.4.5
229240
run: make download-cassandra
230241

231242
- name: Save CCM image into the cache
@@ -249,6 +260,7 @@ jobs:
249260
env:
250261
CASSANDRA_VERSION: ${{ matrix.cassandra-version }}
251262
CASSANDRA_VERSION_RESOLVED: ${{ steps.cassandra-version.outputs.value }}
263+
GET_VERSION_VERSION: 0.4.5
252264
GH_TOKEN: ${{ github.token }}
253265
MAVEN_EXTRA_ARGS: ${{ steps.test-skip-args.outputs.value }}
254266
run: make test-integration-cassandra
@@ -297,6 +309,13 @@ jobs:
297309
scylla-version: [LTS-LATEST, LTS-PRIOR, LATEST]
298310
java-version: [11, 17]
299311
test-group: [parallelizable, serial, isolated]
312+
exclude:
313+
- scylla-version: LTS-PRIOR
314+
java-version: 17
315+
- scylla-version: LTS-LATEST
316+
java-version: 17
317+
- scylla-version: LATEST
318+
java-version: 11
300319
fail-fast: false
301320

302321
steps:

.mvn/jvm.config

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
2+
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
3+
--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
4+
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
5+
--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
6+
--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
7+
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
8+
--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
9+
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
10+
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
11+
--add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED

examples/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
<artifactId>java-driver-examples</artifactId>
3434
<name>Java driver for Scylla and Apache Cassandra(R) - examples.</name>
3535
<description>A collection of examples to demonstrate Java Driver for Scylla and Apache Cassandra(R).</description>
36+
<properties>
37+
<api.plumber.skip>true</api.plumber.skip>
38+
</properties>
3639
<dependencies>
3740
<!-- driver dependencies -->
3841
<dependency>

mapper-processor/src/main/java/com/datastax/oss/driver/internal/mapper/processor/MapperProcessor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.datastax.oss.driver.api.mapper.annotations.Dao;
2121
import com.datastax.oss.driver.api.mapper.annotations.Entity;
2222
import com.datastax.oss.driver.api.mapper.annotations.Mapper;
23-
import com.datastax.oss.driver.shaded.guava.common.base.Strings;
2423
import com.datastax.oss.driver.shaded.guava.common.base.Throwables;
2524
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableSet;
2625
import java.lang.annotation.Annotation;
@@ -167,7 +166,7 @@ private String computeIndent(Map<String, String> options) {
167166
if (amountSpec != null) {
168167
try {
169168
int amount = Integer.parseInt(amountSpec);
170-
return Strings.repeat(tabs ? "\t" : " ", amount);
169+
return (tabs ? "\t" : " ").repeat(amount);
171170
} catch (NumberFormatException e) {
172171
messager.warn(
173172
"Could not parse %s: expected a number, got '%s'. Defaulting to %s.",

mapper-processor/src/main/java/com/datastax/oss/driver/internal/mapper/processor/dao/DaoReturnTypeKind.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public interface DaoReturnTypeKind {
4040
* @param helperFieldName the name of the helper for entity conversions (might not get used for
4141
* certain kinds, in that case it's ok to pass null).
4242
* @param methodElement the return type of the method (in case the result must be cast).
43-
* @param typeParameters
43+
* @param typeParameters the type parameters declared on the DAO method.
4444
*/
4545
void addExecuteStatement(
4646
CodeBlock.Builder methodBuilder,

osgi-tests/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
<artifactId>java-driver-osgi-tests</artifactId>
3434
<packaging>jar</packaging>
3535
<name>Java driver for Scylla and Apache Cassandra(R) - OSGi tests</name>
36+
<properties>
37+
<api.plumber.skip>true</api.plumber.skip>
38+
</properties>
3639
<dependencies>
3740
<dependency>
3841
<groupId>com.scylladb</groupId>

pom.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
<release.autopublish>false</release.autopublish>
102102
<pushChanges>false</pushChanges>
103103
<mockitoopens.argline/>
104+
<api.plumber.skip>false</api.plumber.skip>
104105
</properties>
105106
<dependencyManagement>
106107
<dependencies>
@@ -717,8 +718,7 @@
717718
<plugin>
718719
<artifactId>maven-compiler-plugin</artifactId>
719720
<configuration>
720-
<source>11</source>
721-
<target>11</target>
721+
<release>11</release>
722722
<compilerArgs combine.children="override">
723723
<compilerArg>-XDcompilePolicy=simple</compilerArg>
724724
<compilerArg>--should-stop=ifError=FLOW</compilerArg>
@@ -879,6 +879,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
879879
</goals>
880880
<phase>process-classes</phase>
881881
<configuration>
882+
<skip>${api.plumber.skip}</skip>
882883
<doclet>com.datastax.oss.doclet.ApiPlumber</doclet>
883884
<docletArtifact>
884885
<groupId>com.datastax.oss</groupId>
@@ -1082,6 +1083,16 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
10821083
<jdk>[11,)</jdk>
10831084
</activation>
10841085
</profile>
1086+
<profile>
1087+
<!-- ApiPlumber uses the legacy com.sun.javadoc doclet API removed in JDK 13. -->
1088+
<id>skip-api-plumber-on-jdk-13</id>
1089+
<activation>
1090+
<jdk>[13,)</jdk>
1091+
</activation>
1092+
<properties>
1093+
<api.plumber.skip>true</api.plumber.skip>
1094+
</properties>
1095+
</profile>
10851096
<profile>
10861097
<!-- workarounds for running tests with JDK14 -->
10871098
<id>test-jdk-14</id>

0 commit comments

Comments
 (0)