Remove misc dependency related deprecation warnings (7.x backport) (#59122)
* Fix dependency related deprecations (#58892) * Fix classpath setup for forbiddenapi usage
This commit is contained in:
parent
eb169ae226
commit
a896df53ac
|
@ -37,8 +37,8 @@ dependencies {
|
|||
api "org.openjdk.jmh:jmh-core:$versions.jmh"
|
||||
annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh"
|
||||
// Dependencies of JMH
|
||||
runtime 'net.sf.jopt-simple:jopt-simple:4.6'
|
||||
runtime 'org.apache.commons:commons-math3:3.2'
|
||||
runtimeOnly 'net.sf.jopt-simple:jopt-simple:4.6'
|
||||
runtimeOnly 'org.apache.commons:commons-math3:3.2'
|
||||
}
|
||||
|
||||
// enable the JMH's BenchmarkProcessor to generate the final benchmark classes
|
||||
|
|
|
@ -280,14 +280,6 @@ public class ElasticsearchJavaPlugin implements Plugin<Project> {
|
|||
compilerArgs.add(targetCompatibilityVersion.getMajorVersion());
|
||||
});
|
||||
});
|
||||
|
||||
project.getPluginManager().withPlugin("com.github.johnrengelman.shadow", plugin -> {
|
||||
// Ensure that when we are compiling against the "original" JAR that we also include any "shadow" dependencies on the compile
|
||||
// classpath
|
||||
Configuration shadowConfig = project.getConfigurations().getByName(ShadowBasePlugin.getCONFIGURATION_NAME());
|
||||
Configuration apiConfig = project.getConfigurations().getByName(JavaPlugin.API_ELEMENTS_CONFIGURATION_NAME);
|
||||
shadowConfig.getDependencies().all(dependency -> apiConfig.getDependencies().add(dependency));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -84,8 +84,8 @@ sourceSets {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
docCompile project(':server')
|
||||
docCompile project(':modules:lang-painless')
|
||||
docImplementation project(':server')
|
||||
docImplementation project(':modules:lang-painless')
|
||||
}
|
||||
|
||||
testClusters {
|
||||
|
|
|
@ -71,7 +71,7 @@ dependencies {
|
|||
// Set the keytab files in the classpath so that we can access them from test code without the security manager
|
||||
// freaking out.
|
||||
if (isEclipse == false) {
|
||||
testRuntime files(project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs", "hdfs_hdfs.build.elastic.co.keytab").parent)
|
||||
testRuntimeOnly files(project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs", "hdfs_hdfs.build.elastic.co.keytab").parent)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,11 +45,11 @@ if (!isEclipse) {
|
|||
}
|
||||
|
||||
configurations {
|
||||
java11Compile.extendsFrom(api)
|
||||
java11Implementation.extendsFrom(api)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
java11Compile sourceSets.main.output
|
||||
java11Implementation sourceSets.main.output
|
||||
}
|
||||
|
||||
compileJava11Java {
|
||||
|
@ -122,11 +122,7 @@ dependencies {
|
|||
|
||||
// repackaged jna with native bits linked against all elastic supported platforms
|
||||
api "org.elasticsearch:jna:${versions.jna}"
|
||||
|
||||
if (!isEclipse) {
|
||||
java11Compile sourceSets.main.output
|
||||
}
|
||||
|
||||
|
||||
testImplementation(project(":test:framework")) {
|
||||
// tests use the locally compiled version of server
|
||||
exclude group: 'org.elasticsearch', module: 'server'
|
||||
|
|
|
@ -25,7 +25,7 @@ dependencies {
|
|||
}
|
||||
api project(':libs:elasticsearch-core')
|
||||
api "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}"
|
||||
runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
||||
runtimeOnly "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
||||
testImplementation project(":test:framework")
|
||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ subprojects {
|
|||
}
|
||||
testImplementation project(":test:framework")
|
||||
|
||||
testRuntime project(path: xpackModule('sql:jdbc'))
|
||||
testRuntimeOnly project(path: xpackModule('sql:jdbc'))
|
||||
}
|
||||
|
||||
if (project.name != 'security') {
|
||||
|
|
|
@ -30,7 +30,7 @@ dependencies {
|
|||
api "org.jline:jline-reader:${jlineVersion}"
|
||||
api "org.jline:jline-style:${jlineVersion}"
|
||||
|
||||
testRuntime "org.elasticsearch:jna:${versions.jna}"
|
||||
testRuntimeOnly "org.elasticsearch:jna:${versions.jna}"
|
||||
}
|
||||
|
||||
/* disable unit tests because these are all integration tests used
|
||||
|
@ -55,7 +55,7 @@ subprojects {
|
|||
configurations.testRuntimeClasspath {
|
||||
resolutionStrategy.force "org.slf4j:slf4j-api:1.7.25"
|
||||
}
|
||||
configurations.testRuntime {
|
||||
configurations.testRuntimeOnly {
|
||||
// This is also required to make resolveAllDependencies work
|
||||
resolutionStrategy.force "org.slf4j:slf4j-api:1.7.25"
|
||||
}
|
||||
|
@ -70,35 +70,35 @@ subprojects {
|
|||
testImplementation project(":test:framework")
|
||||
|
||||
// JDBC testing dependencies
|
||||
testRuntime "net.sourceforge.csvjdbc:csvjdbc:${csvjdbcVersion}"
|
||||
testRuntime "com.h2database:h2:${h2Version}"
|
||||
testRuntimeOnly "net.sourceforge.csvjdbc:csvjdbc:${csvjdbcVersion}"
|
||||
testRuntimeOnly "com.h2database:h2:${h2Version}"
|
||||
|
||||
// H2GIS testing dependencies
|
||||
testRuntime("org.orbisgis:h2gis:${h2gisVersion}") {
|
||||
testRuntimeOnly("org.orbisgis:h2gis:${h2gisVersion}") {
|
||||
exclude group: "org.locationtech.jts"
|
||||
exclude group: "com.fasterxml.jackson.core"
|
||||
}
|
||||
|
||||
testRuntime project(path: xpackModule('sql:jdbc'))
|
||||
testRuntime xpackProject('plugin:sql:sql-client')
|
||||
testRuntimeOnly project(path: xpackModule('sql:jdbc'))
|
||||
testRuntimeOnly xpackProject('plugin:sql:sql-client')
|
||||
|
||||
// CLI testing dependencies
|
||||
testRuntime project(path: xpackModule('sql:sql-cli'))
|
||||
testRuntime(xpackProject('plugin:sql:sql-action')) {
|
||||
testRuntimeOnly project(path: xpackModule('sql:sql-cli'))
|
||||
testRuntimeOnly(xpackProject('plugin:sql:sql-action')) {
|
||||
transitive = false
|
||||
}
|
||||
|
||||
testRuntime("org.jline:jline-terminal-jna:${jlineVersion}") {
|
||||
testRuntimeOnly("org.jline:jline-terminal-jna:${jlineVersion}") {
|
||||
exclude group: "net.java.dev.jna"
|
||||
}
|
||||
testRuntime "org.jline:jline-terminal:${jlineVersion}"
|
||||
testRuntime "org.jline:jline-reader:${jlineVersion}"
|
||||
testRuntime "org.jline:jline-style:${jlineVersion}"
|
||||
testRuntimeOnly "org.jline:jline-terminal:${jlineVersion}"
|
||||
testRuntimeOnly "org.jline:jline-reader:${jlineVersion}"
|
||||
testRuntimeOnly "org.jline:jline-style:${jlineVersion}"
|
||||
|
||||
testRuntime "org.elasticsearch:jna:${versions.jna}"
|
||||
testRuntimeOnly "org.elasticsearch:jna:${versions.jna}"
|
||||
|
||||
// spatial dependency
|
||||
testRuntime project(path: xpackModule('spatial'))
|
||||
testRuntimeOnly project(path: xpackModule('spatial'))
|
||||
}
|
||||
|
||||
if (project.name != 'security') {
|
||||
|
|
|
@ -21,9 +21,9 @@ dependencies {
|
|||
api xpackProject('plugin:sql:sql-proto')
|
||||
api "org.apache.lucene:lucene-core:${versions.lucene}"
|
||||
api "joda-time:joda-time:${versions.joda}"
|
||||
runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
||||
runtime "org.apache.logging.log4j:log4j-api:${versions.log4j}"
|
||||
runtime "org.apache.logging.log4j:log4j-core:${versions.log4j}"
|
||||
runtimeOnly "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
||||
runtimeOnly "org.apache.logging.log4j:log4j-api:${versions.log4j}"
|
||||
runtimeOnly "org.apache.logging.log4j:log4j-core:${versions.log4j}"
|
||||
|
||||
testImplementation project(":test:framework")
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ dependencies {
|
|||
api xpackProject('plugin:sql:sql-action')
|
||||
api project(":libs:elasticsearch-cli")
|
||||
api project(':libs:elasticsearch-x-content')
|
||||
runtime "org.elasticsearch:jna:${versions.jna}"
|
||||
runtimeOnly "org.elasticsearch:jna:${versions.jna}"
|
||||
testImplementation project(":test:framework")
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ dependencies {
|
|||
api( project(':libs:elasticsearch-x-content')) {
|
||||
transitive = false
|
||||
}
|
||||
runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
||||
runtimeOnly "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
||||
|
||||
testImplementation project(":test:framework")
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ apply plugin: 'elasticsearch.rest-resources'
|
|||
|
||||
dependencies {
|
||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||
testImplementation project(path: xpackModule('stack'), configuration: 'runtime')
|
||||
testImplementation project(xpackModule('stack'))
|
||||
}
|
||||
|
||||
restResources {
|
||||
|
|
Loading…
Reference in New Issue