Skip to content

Commit 29d3531

Browse files
committed
Fix revapi surious complaints about optional dependencies
patch by Abe Ratnofsky; reviewed by Bret McGuire for CASSJAVA-102
1 parent bb9bb11 commit 29d3531

File tree

6 files changed

+61
-30
lines changed

6 files changed

+61
-30
lines changed

Jenkinsfile-datastax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def initializeEnvironment() {
2727
env.GITHUB_BRANCH_URL = "${GITHUB_PROJECT_URL}/tree/${env.BRANCH_NAME}"
2828
env.GITHUB_COMMIT_URL = "${GITHUB_PROJECT_URL}/commit/${env.GIT_COMMIT}"
2929

30-
env.MAVEN_HOME = "${env.HOME}/.mvn/apache-maven-3.6.3"
30+
env.MAVEN_HOME = "${env.HOME}/.mvn/apache-maven-3.8.8"
3131
env.PATH = "${env.MAVEN_HOME}/bin:${env.PATH}"
3232

3333
/*

core/revapi.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
2-
// successive driver versions.
31
{
42
"revapi": {
53
"java": {
@@ -7386,6 +7384,29 @@
73867384
"old": "method <T extends java.lang.Number> com.datastax.oss.driver.api.core.type.reflect.GenericType<com.datastax.oss.driver.api.core.data.CqlVector<T>> com.datastax.oss.driver.api.core.type.reflect.GenericType<T>::vectorOf(java.lang.Class<T>)",
73877385
"new": "method <T> com.datastax.oss.driver.api.core.type.reflect.GenericType<com.datastax.oss.driver.api.core.data.CqlVector<T>> com.datastax.oss.driver.api.core.type.reflect.GenericType<T>::vectorOf(java.lang.Class<T>)",
73887386
"justification": "JAVA-3143: Extend driver vector support to arbitrary subtypes and fix handling of variable length types (OSS C* 5.0)"
7387+
},
7388+
{
7389+
"code": "java.class.nonPublicPartOfAPI",
7390+
"old": "class com.datastax.oss.driver.internal.core.config.typesafe.TypesafeDriverExecutionProfile.Base",
7391+
"justification": "CASSJAVA-102: Fix spurious complaints about optional dependencies"
7392+
},
7393+
{
7394+
"code": "java.class.nonPublicPartOfAPI",
7395+
"old": "class com.fasterxml.jackson.databind.type.TypeParser.MyTokenizer",
7396+
"justification": "CASSJAVA-102: Fix spurious complaints about optional dependencies"
7397+
},
7398+
{
7399+
"code": "java.class.nonPublicPartOfAPI",
7400+
"old": "class org.apache.tinkerpop.shaded.jackson.databind.type.TypeParser.MyTokenizer",
7401+
"justification": "CASSJAVA-102: Fix spurious complaints about optional dependencies"
7402+
},
7403+
{
7404+
"code": "java.class.externalClassExposedInAPI",
7405+
"justification": "CASSJAVA-102: Migrate revapi config into dedicated config files, ported from pom.xml"
7406+
},
7407+
{
7408+
"code": "java.method.varargOverloadsOnlyDifferInVarargParameter",
7409+
"justification": "CASSJAVA-102: Migrate revapi config into dedicated config files, ported from pom.xml"
73897410
}
73907411
]
73917412
}

mapper-runtime/revapi.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
2-
// successive driver versions.
31
{
42
"revapi": {
53
"java": {
@@ -11,7 +9,7 @@
119
"com\\.datastax\\.(oss|dse)\\.driver\\.internal(\\..+)?",
1210
"com\\.datastax\\.oss\\.driver\\.shaded(\\..+)?",
1311
"com\\.datastax\\.oss\\.simulacron(\\..+)?",
14-
// Don't re-check sibling modules that this module depends on
12+
"// Don't re-check sibling modules that this module depends on",
1513
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.core(\\..+)?",
1614
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.querybuilder(\\..+)?"
1715
]
@@ -22,7 +20,7 @@
2220
{
2321
"regex": true,
2422
"code": "java.annotation.attributeValueChanged",
25-
"old": "@interface com\.datastax\.oss\.driver\.api\.mapper\.annotations\..*",
23+
"old": "@interface com\\.datastax\\.oss\\.driver\\.api\\.mapper\\.annotations\\..*",
2624
"annotationType": "java.lang.annotation.Retention",
2725
"attribute": "value",
2826
"oldValue": "java.lang.annotation.RetentionPolicy.CLASS",

pom.xml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -561,28 +561,23 @@
561561
<plugin>
562562
<groupId>org.revapi</groupId>
563563
<artifactId>revapi-maven-plugin</artifactId>
564-
<version>0.10.5</version>
564+
<version>0.15.1</version>
565565
<configuration>
566566
<outputNonIdentifyingDifferenceInfo>false</outputNonIdentifyingDifferenceInfo>
567567
<versionFormat>\d+\.\d+\.\d+</versionFormat>
568-
<analysisConfiguration>
569-
<revapi.ignore>
570-
<item>
571-
<!-- We don't consider this a problem -->
572-
<code>java.class.externalClassExposedInAPI</code>
573-
</item>
574-
</revapi.ignore>
575-
</analysisConfiguration>
576568
<oldArtifacts>
577569
<!-- The previous release used DataStax groupId, remove this after the next release -->
578570
<artifact>${project.groupId}:${project.artifactId}:RELEASE</artifact>
579571
</oldArtifacts>
572+
<analysisConfigurationFiles>
573+
<file>revapi.json</file>
574+
</analysisConfigurationFiles>
580575
</configuration>
581576
<dependencies>
582577
<dependency>
583578
<groupId>org.revapi</groupId>
584579
<artifactId>revapi-java</artifactId>
585-
<version>0.22.1</version>
580+
<version>0.28.4</version>
586581
</dependency>
587582
</dependencies>
588583
</plugin>
@@ -596,9 +591,33 @@
596591
<artifactId>flatten-maven-plugin</artifactId>
597592
<version>1.2.1</version>
598593
</plugin>
594+
<plugin>
595+
<groupId>org.apache.maven.plugins</groupId>
596+
<artifactId>maven-enforcer-plugin</artifactId>
597+
<version>3.5.0</version>
598+
</plugin>
599599
</plugins>
600600
</pluginManagement>
601601
<plugins>
602+
<plugin>
603+
<artifactId>maven-enforcer-plugin</artifactId>
604+
<executions>
605+
<execution>
606+
<id>enforce-maven</id>
607+
<goals>
608+
<goal>enforce</goal>
609+
</goals>
610+
<configuration>
611+
<rules>
612+
<requireMavenVersion>
613+
<!-- revapi 0.15.1 requires Maven version 3.8.1 -->
614+
<version>[3.8.1,)</version>
615+
</requireMavenVersion>
616+
</rules>
617+
</configuration>
618+
</execution>
619+
</executions>
620+
</plugin>
602621
<plugin>
603622
<artifactId>maven-compiler-plugin</artifactId>
604623
<configuration>
@@ -901,12 +920,6 @@ limitations under the License.]]></inlineHeader>
901920
<goals>
902921
<goal>check</goal>
903922
</goals>
904-
<configuration>
905-
<analysisConfigurationFiles>
906-
<!-- Present at the root of each module that doesn't skip this goal -->
907-
<analysisConfigurationFile>revapi.json</analysisConfigurationFile>
908-
</analysisConfigurationFiles>
909-
</configuration>
910923
</execution>
911924
</executions>
912925
</plugin>

query-builder/revapi.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
2-
// successive driver versions.
31
{
42
"revapi": {
53
"java": {
@@ -11,7 +9,7 @@
119
"com\\.datastax\\.(oss|dse)\\.driver\\.internal(\\..+)?",
1210
"com\\.datastax\\.oss\\.driver\\.shaded(\\..+)?",
1311
"org\\.assertj(\\..+)?",
14-
// Don't re-check sibling modules that this module depends on
12+
"// Don't re-check sibling modules that this module depends on",
1513
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.core(\\..+)?"
1614
]
1715
}
@@ -2782,8 +2780,11 @@
27822780
"code": "java.method.addedToInterface",
27832781
"new": "method com.datastax.oss.driver.api.querybuilder.select.Select com.datastax.oss.driver.api.querybuilder.select.Select::orderByAnnOf(com.datastax.oss.driver.api.core.CqlIdentifier, com.datastax.oss.driver.api.core.data.CqlVector<?>)",
27842782
"justification": "JAVA-3118: Add support for vector data type in Schema Builder, QueryBuilder"
2783+
},
2784+
{
2785+
"code": "java.method.varargOverloadsOnlyDifferInVarargParameter",
2786+
"justification": "CASSJAVA-102: Suppress newly-supported varargs check"
27852787
}
27862788
]
27872789
}
27882790
}
2789-

test-infra/revapi.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
2-
// successive driver versions.
31
{
42
"revapi": {
53
"java": {
@@ -12,7 +10,7 @@
1210
"com\\.datastax\\.oss\\.driver\\.shaded(\\..+)?",
1311
"com\\.datastax\\.oss\\.simulacron(\\..+)?",
1412
"org\\.assertj(\\..+)?",
15-
// Don't re-check sibling modules that this module depends on
13+
"// Don't re-check sibling modules that this module depends on",
1614
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.core(\\..+)?"
1715
]
1816
}

0 commit comments

Comments
 (0)