-
Notifications
You must be signed in to change notification settings - Fork 873
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark spotbugs-annotation and jcip-annotations as provided dependencies
patch by Henry Hughes; reviewed by Mick Semb Wever for CASSANDRA-18969
- Loading branch information
1 parent
2bf500e
commit 1991537
Showing
17 changed files
with
367 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.datastax.oss</groupId> | ||
<artifactId>java-driver-parent</artifactId> | ||
<version>4.17.1-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>java-driver-distribution-tests</artifactId> | ||
<name>Apache Cassandra Java Driver - distribution tests</name> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>java-driver-bom</artifactId> | ||
<version>${project.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.datastax.oss</groupId> | ||
<artifactId>java-driver-test-infra</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.datastax.oss</groupId> | ||
<artifactId>java-driver-query-builder</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.datastax.oss</groupId> | ||
<artifactId>java-driver-mapper-processor</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.datastax.oss</groupId> | ||
<artifactId>java-driver-mapper-runtime</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.datastax.oss</groupId> | ||
<artifactId>java-driver-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.datastax.oss</groupId> | ||
<artifactId>java-driver-metrics-micrometer</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.datastax.oss</groupId> | ||
<artifactId>java-driver-metrics-microprofile</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<jvm>${testing.jvm}/bin/java</jvm> | ||
<argLine>${mockitoopens.argline}</argLine> | ||
<threadCount>1</threadCount> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.revapi</groupId> | ||
<artifactId>revapi-maven-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-install-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.sonatype.plugins</groupId> | ||
<artifactId>nexus-staging-maven-plugin</artifactId> | ||
<configuration> | ||
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
84 changes: 84 additions & 0 deletions
84
distribution-tests/src/test/java/com/datastax/oss/driver/api/core/DriverDependencyTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.datastax.oss.driver.api.core; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.datastax.oss.driver.api.core.session.Session; | ||
import com.datastax.oss.driver.api.mapper.MapperBuilder; | ||
import com.datastax.oss.driver.api.querybuilder.QueryBuilder; | ||
import com.datastax.oss.driver.api.testinfra.CassandraResourceRule; | ||
import com.datastax.oss.driver.internal.core.util.Reflection; | ||
import com.datastax.oss.driver.internal.mapper.processor.MapperProcessor; | ||
import com.datastax.oss.driver.internal.metrics.micrometer.MicrometerMetricsFactory; | ||
import com.datastax.oss.driver.internal.metrics.microprofile.MicroProfileMetricsFactory; | ||
import org.junit.Test; | ||
|
||
public class DriverDependencyTest { | ||
@Test | ||
public void should_include_core_jar() { | ||
assertThat(Reflection.loadClass(null, "com.datastax.oss.driver.api.core.session.Session")) | ||
.isEqualTo(Session.class); | ||
} | ||
|
||
@Test | ||
public void should_include_query_builder_jar() { | ||
assertThat(Reflection.loadClass(null, "com.datastax.oss.driver.api.querybuilder.QueryBuilder")) | ||
.isEqualTo(QueryBuilder.class); | ||
} | ||
|
||
@Test | ||
public void should_include_mapper_processor_jar() { | ||
assertThat( | ||
Reflection.loadClass( | ||
null, "com.datastax.oss.driver.internal.mapper.processor.MapperProcessor")) | ||
.isEqualTo(MapperProcessor.class); | ||
} | ||
|
||
@Test | ||
public void should_include_mapper_runtime_jar() { | ||
assertThat(Reflection.loadClass(null, "com.datastax.oss.driver.api.mapper.MapperBuilder")) | ||
.isEqualTo(MapperBuilder.class); | ||
} | ||
|
||
@Test | ||
public void should_include_metrics_micrometer_jar() { | ||
assertThat( | ||
Reflection.loadClass( | ||
null, | ||
"com.datastax.oss.driver.internal.metrics.micrometer.MicrometerMetricsFactory")) | ||
.isEqualTo(MicrometerMetricsFactory.class); | ||
} | ||
|
||
@Test | ||
public void should_include_metrics_microprofile_jar() { | ||
assertThat( | ||
Reflection.loadClass( | ||
null, | ||
"com.datastax.oss.driver.internal.metrics.microprofile.MicroProfileMetricsFactory")) | ||
.isEqualTo(MicroProfileMetricsFactory.class); | ||
} | ||
|
||
@Test | ||
public void should_include_test_infra_jar() { | ||
assertThat( | ||
Reflection.loadClass( | ||
null, "com.datastax.oss.driver.api.testinfra.CassandraResourceRule")) | ||
.isEqualTo(CassandraResourceRule.class); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
...ribution-tests/src/test/java/com/datastax/oss/driver/api/core/OptionalDependencyTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.datastax.oss.driver.api.core; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.datastax.oss.driver.internal.core.util.Dependency; | ||
import com.datastax.oss.driver.internal.core.util.Reflection; | ||
import org.junit.Test; | ||
|
||
public class OptionalDependencyTest { | ||
@Test | ||
public void should_not_include_snappy_jar() { | ||
Dependency.SNAPPY | ||
.classes() | ||
.forEach(clazz -> assertThat(Reflection.loadClass(null, clazz)).isNull()); | ||
} | ||
|
||
@Test | ||
public void should_not_include_l4z_jar() { | ||
Dependency.LZ4 | ||
.classes() | ||
.forEach(clazz -> assertThat(Reflection.loadClass(null, clazz)).isNull()); | ||
} | ||
|
||
@Test | ||
public void should_not_include_esri_jar() { | ||
Dependency.ESRI | ||
.classes() | ||
.forEach(clazz -> assertThat(Reflection.loadClass(null, clazz)).isNull()); | ||
} | ||
|
||
@Test | ||
public void should_not_include_tinkerpop_jar() { | ||
Dependency.TINKERPOP | ||
.classes() | ||
.forEach(clazz -> assertThat(Reflection.loadClass(null, clazz)).isNull()); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...ribution-tests/src/test/java/com/datastax/oss/driver/api/core/ProvidedDependencyTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.datastax.oss.driver.api.core; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.datastax.oss.driver.internal.core.util.Reflection; | ||
import org.junit.Test; | ||
|
||
public class ProvidedDependencyTest { | ||
@Test | ||
public void should_not_include_graal_sdk_jar() { | ||
assertThat(Reflection.loadClass(null, "org.graalvm.nativeimage.VMRuntime")).isNull(); | ||
} | ||
|
||
@Test | ||
public void should_not_include_spotbugs_annotations_jar() { | ||
assertThat(Reflection.loadClass(null, "edu.umd.cs.findbugs.annotations.NonNull")).isNull(); | ||
} | ||
|
||
@Test | ||
public void should_not_include_jicp_annotations_jar() { | ||
assertThat(Reflection.loadClass(null, "net.jcip.annotations.ThreadSafe")).isNull(); | ||
} | ||
|
||
@Test | ||
public void should_not_include_blockhound_jar() { | ||
assertThat(Reflection.loadClass(null, "reactor.blockhound.BlockHoundRuntime")).isNull(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.