[Backport] Remove dependency substitutions 7.x (#42866)

* Remove unnecessary usage of Gradle dependency substitution rules (#42773)

(cherry picked from commit 12d583dbf6f7d44f00aa365e34fc7e937c3c61f7)
This commit is contained in:
Mark Vieira 2019-06-04 13:50:23 -07:00 committed by GitHub
parent 1514d1a1be
commit e44b8b1e2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
95 changed files with 277 additions and 353 deletions

View File

@ -27,7 +27,7 @@ archivesBaseName = 'elasticsearch-benchmarks'
test.enabled = false
dependencies {
compile("org.elasticsearch:elasticsearch:${version}") {
compile(project(":server")) {
// JMH ships with the conflicting version 4.6. This prevents us from using jopt-simple in benchmarks (which should be ok) but allows
// us to invoke the JMH uberjar as usual.
exclude group: 'net.sf.jopt-simple', module: 'jopt-simple'

View File

@ -209,69 +209,7 @@ allprojects {
javadoc.options.addStringOption('Xdoclint:all,-missing', '-quiet')
}
/* Sets up the dependencies that we build as part of this project but
register as though they were external to resolve internally. We register
them as external dependencies so the build plugin that we use can be used
to build elasticsearch plugins outside of the elasticsearch source tree. */
ext.projectSubstitutions = [
"org.elasticsearch.gradle:build-tools:${version}": ':build-tools',
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
"org.elasticsearch:elasticsearch:${version}": ':server',
"org.elasticsearch:elasticsearch-cli:${version}": ':libs:elasticsearch-cli',
"org.elasticsearch:elasticsearch-core:${version}": ':libs:core',
"org.elasticsearch:elasticsearch-nio:${version}": ':libs:nio',
"org.elasticsearch:elasticsearch-x-content:${version}": ':libs:x-content',
"org.elasticsearch:elasticsearch-geo:${version}": ':libs:elasticsearch-geo',
"org.elasticsearch:elasticsearch-secure-sm:${version}": ':libs:secure-sm',
"org.elasticsearch:elasticsearch-ssl-config:${version}": ':libs:elasticsearch-ssl-config',
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
"org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level',
"org.elasticsearch.client:test:${version}": ':client:test',
"org.elasticsearch.client:transport:${version}": ':client:transport',
"org.elasticsearch.plugin:elasticsearch-scripting-painless-spi:${version}": ':modules:lang-painless:spi',
"org.elasticsearch.test:framework:${version}": ':test:framework',
"org.elasticsearch.test:logger-usage:${version}": ':test:logger-usage',
"org.elasticsearch.xpack.test:feature-aware:${version}": ':x-pack:test:feature-aware',
// for transport client
"org.elasticsearch.plugin:transport-netty4-client:${version}": ':modules:transport-netty4',
"org.elasticsearch.plugin:reindex-client:${version}": ':modules:reindex',
"org.elasticsearch.plugin:lang-mustache-client:${version}": ':modules:lang-mustache',
"org.elasticsearch.plugin:parent-join-client:${version}": ':modules:parent-join',
"org.elasticsearch.plugin:aggs-matrix-stats-client:${version}": ':modules:aggs-matrix-stats',
"org.elasticsearch.plugin:percolator-client:${version}": ':modules:percolator',
"org.elasticsearch.plugin:rank-eval-client:${version}": ':modules:rank-eval',
// for security example plugins
"org.elasticsearch.plugin:x-pack-core:${version}": ':x-pack:plugin:core',
"org.elasticsearch.client:x-pack-transport:${version}": ':x-pack:transport-client'
]
/*
* Gradle only resolve project substitutions during dependency resolution but
* we sometimes want to do the resolution at other times. This creates a
* convenient method we can call to do it.
*/
ext.dependencyToProject = { Dependency dep ->
if (dep instanceof ProjectDependency) {
return dep.dependencyProject
} else {
String substitution = projectSubstitutions.get("${dep.group}:${dep.name}:${dep.version}")
if (substitution != null) {
return findProject(substitution)
}
return null
}
}
project.afterEvaluate {
configurations.matching { it.canBeResolved }.all {
resolutionStrategy.dependencySubstitution { DependencySubstitutions subs ->
projectSubstitutions.each { k,v ->
subs.substitute(subs.module(k)).with(subs.project(v))
}
}
}
// Handle javadoc dependencies across projects. Order matters: the linksOffline for
// org.elasticsearch:elasticsearch must be the last one or all the links for the
// other packages (e.g org.elasticsearch.client) will point to server rather than
@ -280,10 +218,10 @@ allprojects {
String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
Closure sortClosure = { a, b -> b.group <=> a.group }
Closure depJavadocClosure = { shadowed, dep ->
if (dep.group == null || false == dep.group.startsWith('org.elasticsearch')) {
if ((dep instanceof ProjectDependency) == false) {
return
}
Project upstreamProject = project.ext.dependencyToProject(dep)
Project upstreamProject = dep.dependencyProject
if (upstreamProject == null) {
return
}
@ -339,8 +277,8 @@ gradle.projectsEvaluated {
integTest.mustRunAfter test
}
configurations.matching { it.canBeResolved }.all { Configuration configuration ->
dependencies.all { Dependency dep ->
Project upstreamProject = dependencyToProject(dep)
dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
Project upstreamProject = dep.dependencyProject
if (upstreamProject != null) {
if (project.path == upstreamProject.path) {
// TODO: distribution integ tests depend on themselves (!), fix that

View File

@ -148,6 +148,11 @@ if (project != rootProject) {
distribution project(':distribution:archives:linux-tar')
distribution project(':distribution:archives:oss-linux-tar')
}
// for external projects we want to remove the marker file indicating we are running the Elasticsearch project
processResources {
exclude 'buildSrc.marker'
}
String localDownloads = "${rootProject.buildDir}/local-downloads"
task setupLocalDownloads(type:Copy) {

View File

@ -27,6 +27,7 @@ import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.test.RestIntegTestTask
import org.elasticsearch.gradle.test.RunTask
import org.elasticsearch.gradle.testclusters.TestClustersPlugin
import org.elasticsearch.gradle.tool.ClasspathUtils
import org.gradle.api.InvalidUserDataException
import org.gradle.api.Plugin
import org.gradle.api.Project
@ -154,8 +155,13 @@ class PluginBuildPlugin implements Plugin<Project> {
private static void configureDependencies(Project project) {
project.dependencies {
compileOnly "org.elasticsearch:elasticsearch:${project.versions.elasticsearch}"
testCompile "org.elasticsearch.test:framework:${project.versions.elasticsearch}"
if (ClasspathUtils.isElasticsearchProject()) {
compileOnly project.project(':server')
testCompile project.project(':test:framework')
} else {
compileOnly "org.elasticsearch:elasticsearch:${project.versions.elasticsearch}"
testCompile "org.elasticsearch.test:framework:${project.versions.elasticsearch}"
}
// we "upgrade" these optional deps to provided for plugins, since they will run
// with a full elasticsearch server that includes optional deps
compileOnly "org.locationtech.spatial4j:spatial4j:${project.versions.spatial4j}"

View File

@ -23,11 +23,13 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
import de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin
import org.elasticsearch.gradle.ExportElasticsearchBuildResourcesTask
import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.tool.ClasspathUtils
import org.gradle.api.JavaVersion
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.plugins.JavaBasePlugin
import org.gradle.api.plugins.quality.Checkstyle
/**
* Validation tasks which should be run before committing. These run before tests.
*/
@ -40,18 +42,18 @@ class PrecommitTasks {
public static Task create(Project project, boolean includeDependencyLicenses) {
project.configurations.create("forbiddenApisCliJar")
project.dependencies {
forbiddenApisCliJar ('de.thetaphi:forbiddenapis:2.6')
forbiddenApisCliJar('de.thetaphi:forbiddenapis:2.6')
}
List<Task> precommitTasks = [
configureCheckstyle(project),
configureForbiddenApisCli(project),
project.tasks.create('forbiddenPatterns', ForbiddenPatternsTask.class),
project.tasks.create('licenseHeaders', LicenseHeadersTask.class),
project.tasks.create('filepermissions', FilePermissionsTask.class),
configureJarHell(project),
configureThirdPartyAudit(project),
configureTestingConventions(project)
configureCheckstyle(project),
configureForbiddenApisCli(project),
project.tasks.create('forbiddenPatterns', ForbiddenPatternsTask.class),
project.tasks.create('licenseHeaders', LicenseHeadersTask.class),
project.tasks.create('filepermissions', FilePermissionsTask.class),
configureJarHell(project),
configureThirdPartyAudit(project),
configureTestingConventions(project)
]
// tasks with just tests don't need dependency licenses, so this flag makes adding
@ -85,10 +87,10 @@ class PrecommitTasks {
}
return project.tasks.create([
name: 'precommit',
group: JavaBasePlugin.VERIFICATION_GROUP,
description: 'Runs all non-test checks.',
dependsOn: precommitTasks
name : 'precommit',
group : JavaBasePlugin.VERIFICATION_GROUP,
description: 'Runs all non-test checks.',
dependsOn : precommitTasks
])
}
@ -168,7 +170,7 @@ class PrecommitTasks {
)
}
}
Task forbiddenApis = project.tasks.getByName("forbiddenApis")
Task forbiddenApis = project.tasks.getByName("forbiddenApis")
forbiddenApis.group = ""
return forbiddenApis
}
@ -211,7 +213,7 @@ class PrecommitTasks {
project.checkstyle {
config = project.resources.text.fromFile(checkstyleConf, 'UTF-8')
configProperties = [
suppressions: checkstyleSuppressions
suppressions: checkstyleSuppressions
]
toolVersion = CHECKSTYLE_VERSION
}
@ -229,9 +231,11 @@ class PrecommitTasks {
}
private static Task configureLoggerUsage(Project project) {
Object dependency = ClasspathUtils.isElasticsearchProject() ? project.project(':test:logger-usage') :
"org.elasticsearch.test:logger-usage:${VersionProperties.elasticsearch}"
project.configurations.create('loggerUsagePlugin')
project.dependencies.add('loggerUsagePlugin',
"org.elasticsearch.test:logger-usage:${VersionProperties.elasticsearch}")
project.dependencies.add('loggerUsagePlugin', dependency)
return project.tasks.create('loggerUsageCheck', LoggerUsageTask.class) {
classpath = project.configurations.loggerUsagePlugin
}

View File

@ -249,7 +249,7 @@ class RestIntegTestTask extends DefaultTask {
restSpec
}
project.dependencies {
restSpec "org.elasticsearch:rest-api-spec:${VersionProperties.elasticsearch}"
restSpec project.project(':rest-api-spec')
}
Task copyRestSpec = project.tasks.findByName('copyRestSpec')
if (copyRestSpec != null) {

View File

@ -79,7 +79,7 @@ class StandaloneRestTestPlugin implements Plugin<Project> {
// create a compileOnly configuration as others might expect it
project.configurations.create("compileOnly")
project.dependencies.add('testCompile', "org.elasticsearch.test:framework:${VersionProperties.elasticsearch}")
project.dependencies.add('testCompile', project.project(':test:framework'))
EclipseModel eclipse = project.extensions.getByType(EclipseModel)
eclipse.classpath.sourceSets = [testSourceSet]

View File

@ -0,0 +1,23 @@
package org.elasticsearch.gradle.tool;
public class ClasspathUtils {
private static boolean isElasticsearchProject;
static {
// look for buildSrc marker file, if it exists then we are running in the context of the elastic/elasticsearch build
isElasticsearchProject = ClasspathUtils.class.getResource("/buildSrc.marker") != null;
}
private ClasspathUtils() {
}
/**
* Determine if we are running in the context of the `elastic/elasticsearch` project. This method will return {@code false} when
* the build-tools project is pulled in as an external dependency.
*
* @return if we are currently running in the `elastic/elasticsearch` project
*/
public static boolean isElasticsearchProject() {
return isElasticsearchProject;
}
}

View File

@ -34,12 +34,12 @@ test.enabled = false
dependencies {
compile 'org.apache.commons:commons-math3:3.2'
compile("org.elasticsearch.client:elasticsearch-rest-client:${version}")
compile project(":client:rest")
// bottleneck should be the client, not Elasticsearch
compile project(path: ':client:client-benchmark-noop-api-plugin')
// for transport client
compile("org.elasticsearch:elasticsearch:${version}")
compile("org.elasticsearch.client:transport:${version}")
compile project(":server")
compile project(":client:transport")
compile project(path: ':modules:transport-netty4', configuration: 'runtime')
compile project(path: ':modules:reindex', configuration: 'runtime')
compile project(path: ':modules:lang-mustache', configuration: 'runtime')

View File

@ -50,24 +50,24 @@ dependencies {
* Everything in the "shadow" configuration is *not* copied into the
* shadowJar.
*/
compile "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
compile "org.elasticsearch.plugin:parent-join-client:${version}"
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
compile "org.elasticsearch.plugin:rank-eval-client:${version}"
compile "org.elasticsearch.plugin:lang-mustache-client:${version}"
compile project(':server')
compile project(':client:rest')
compile project(':modules:parent-join')
compile project(':modules:aggs-matrix-stats')
compile project(':modules:rank-eval')
compile project(':modules:lang-mustache')
testCompile "org.elasticsearch.client:test:${version}"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(':client:test')
testCompile project(':test:framework')
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"
//this is needed to make RestHighLevelClientTests#testApiNamingConventions work from IDEs
testCompile "org.elasticsearch:rest-api-spec:${version}"
// Needed for serialization tests:
testCompile project(":rest-api-spec")
// Needed for serialization tests:
// (In order to serialize a server side class to a client side class or the other way around)
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(':x-pack:plugin:core')
restSpec "org.elasticsearch:rest-api-spec:${version}"
restSpec project(':rest-api-spec')
}
//we need to copy the yaml spec so we can check naming (see RestHighlevelClientTests#testApiNamingConventions)

View File

@ -44,7 +44,7 @@ dependencies {
compile "commons-codec:commons-codec:${versions.commonscodec}"
compile "commons-logging:commons-logging:${versions.commonslogging}"
testCompile "org.elasticsearch.client:test:${version}"
testCompile project(":client:test")
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
@ -68,7 +68,7 @@ forbiddenApisTest {
}
// JarHell is part of es server, which we don't want to pull in
// TODO: Not anymore. Now in :libs:core
// TODO: Not anymore. Now in :libs:elasticsearch-core
jarHell.enabled=false
testingConventions {

View File

@ -35,14 +35,14 @@ publishing {
}
dependencies {
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
compile project(":client:rest")
compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
compile "commons-codec:commons-codec:${versions.commonscodec}"
compile "commons-logging:commons-logging:${versions.commonslogging}"
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
testCompile "org.elasticsearch.client:test:${version}"
testCompile project(":client:test")
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"
testCompile "org.elasticsearch:securemock:${versions.securemock}"
@ -68,7 +68,7 @@ dependencyLicenses {
}
// JarHell is part of es server, which we don't want to pull in
// TODO: Not anymore. Now in :libs:core
// TODO: Not anymore. Now in :libs:elasticsearch-core
jarHell.enabled=false
testingConventions {

View File

@ -44,7 +44,7 @@ forbiddenApisTest {
}
// JarHell is part of es server, which we don't want to pull in
// TODO: Not anymore. Now in :libs:core
// TODO: Not anymore. Now in :libs:elasticsearch-core
jarHell.enabled=false
// TODO: should we have licenses for our test deps?

View File

@ -23,13 +23,13 @@ apply plugin: 'nebula.maven-scm'
group = 'org.elasticsearch.client'
dependencies {
compile "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch.plugin:transport-netty4-client:${version}"
compile "org.elasticsearch.plugin:reindex-client:${version}"
compile "org.elasticsearch.plugin:lang-mustache-client:${version}"
compile "org.elasticsearch.plugin:percolator-client:${version}"
compile "org.elasticsearch.plugin:parent-join-client:${version}"
compile "org.elasticsearch.plugin:rank-eval-client:${version}"
compile project(":server")
compile project(":modules:transport-netty4")
compile project(":modules:reindex")
compile project(":modules:lang-mustache")
compile project(":modules:percolator")
compile project(":modules:parent-join")
compile project(":modules:rank-eval")
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"

View File

@ -241,7 +241,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
// delay by using closures, since they have not yet been configured, so no jar task exists yet
from { project(':server').jar }
from { project(':server').configurations.runtime }
from { project(':libs:plugin-classloader').jar }
from { project(':libs:elasticsearch-plugin-classloader').jar }
from { project(':distribution:tools:java-version-checker').jar }
from { project(':distribution:tools:launchers').jar }
into('tools/plugin-cli') {

View File

@ -22,11 +22,11 @@ apply plugin: 'elasticsearch.build'
archivesBaseName = 'elasticsearch-plugin-cli'
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
compileOnly "org.elasticsearch:elasticsearch-cli:${version}"
compileOnly project(":server")
compileOnly project(":libs:elasticsearch-cli")
compile "org.bouncycastle:bcpg-jdk15on:${versions.bouncycastle}"
compile "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
testCompile 'com.google.jimfs:jimfs:1.1'
testCompile 'com.google.guava:guava:18.0'
}

View File

@ -26,19 +26,19 @@ subprojects {
/*
* Subprojects may depend on the "core" lib but may not depend on any
* other libs. This keeps are dependencies simpler.
* other libs. This keeps our dependencies simpler.
*/
project.afterEvaluate {
configurations.all { Configuration conf ->
dependencies.all { Dependency dep ->
Project depProject = dependencyToProject(dep)
dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
Project depProject = dep.dependencyProject
if (depProject != null
&& false == depProject.path.equals(':libs:core')
&& false == depProject.path.equals(':libs:elasticsearch-core')
&& false == isEclipse
&& depProject.path.startsWith(':libs')) {
throw new InvalidUserDataException("projects in :libs "
+ "may not depend on other projects libs except "
+ ":libs:core but "
+ ":libs:elasticsearch-core but "
+ "${project.path} depends on ${depProject.path}")
}
}

View File

@ -23,7 +23,7 @@ apply plugin: 'nebula.maven-scm'
dependencies {
compile 'net.sf.jopt-simple:jopt-simple:5.0.2'
compile "org.elasticsearch:elasticsearch-core:${version}"
compile project(':libs:elasticsearch-core')
}
test.enabled = false

View File

@ -82,14 +82,14 @@ dependencies {
}
if (isEclipse == false || project.path == ":libs:core-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-core'
}
}
}
forbiddenApisMain {
// :libs:core does not depend on server
// :libs:elasticsearch-core does not depend on server
// TODO: Need to decide how we want to handle for forbidden signatures with the changes to server
replaceSignatureFiles 'jdk-signatures'
}
@ -97,7 +97,7 @@ forbiddenApisMain {
if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets
sourceSets {
if (project.path == ":libs:core") {
if (project.path == ":libs:elasticsearch-core") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -17,17 +17,15 @@
* under the License.
*/
archivesBaseName = 'elasticsearch-dissect'
dependencies {
if (isEclipse == false || project.path == ":libs:dissect-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
exclude group: 'org.elasticsearch', module: 'dissect'
if (isEclipse == false || project.path == ":libs:elasticsearch-dissect-tests") {
testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-dissect'
}
}
testCompile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
testCompile("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
testCompile("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")
testCompile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
testCompile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
}
forbiddenApisMain {
@ -37,7 +35,7 @@ forbiddenApisMain {
if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets
sourceSets {
if (project.path == ":libs:dissect") {
if (project.path == ":libs:elasticsearch-dissect") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -22,8 +22,8 @@ apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-scm'
dependencies {
if (isEclipse == false || project.path == ":libs:geo-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
if (isEclipse == false || project.path == ":libs:elasticsearch-geo-tests") {
testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-geo'
}
}
@ -38,7 +38,7 @@ forbiddenApisMain {
if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets
sourceSets {
if (project.path == ":libs:geo") {
if (project.path == ":libs:elasticsearch-geo") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -17,16 +17,14 @@
* under the License.
*/
archivesBaseName = 'elasticsearch-grok'
dependencies {
compile 'org.jruby.joni:joni:2.1.6'
// joni dependencies:
compile 'org.jruby.jcodings:jcodings:1.0.12'
if (isEclipse == false || project.path == ":libs:grok-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
exclude group: 'org.elasticsearch', module: 'grok'
if (isEclipse == false || project.path == ":libs:elasticsearch-grok-tests") {
testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-grok'
}
}
}
@ -38,7 +36,7 @@ forbiddenApisMain {
if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets
sourceSets {
if (project.path == ":libs:grok") {
if (project.path == ":libs:elasticsearch-grok") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -19,25 +19,15 @@
apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-scm'
archivesBaseName = 'elasticsearch-nio'
publishing {
publications {
nebula {
artifactId = archivesBaseName
}
}
}
dependencies {
compile "org.elasticsearch:elasticsearch-core:${version}"
compile project(':libs:elasticsearch-core')
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
if (isEclipse == false || project.path == ":libs:nio-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
if (isEclipse == false || project.path == ":libs:elasticsearch-nio-tests") {
testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-nio'
}
}
@ -46,7 +36,7 @@ dependencies {
if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets
sourceSets {
if (project.path == ":libs:nio") {
if (project.path == ":libs:elasticsearch-nio") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -19,16 +19,6 @@
apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-scm'
archivesBaseName = 'elasticsearch-secure-sm'
publishing {
publications {
nebula {
artifactId = archivesBaseName
}
}
}
dependencies {
// do not add non-test compile dependencies to secure-sm without a good reason to do so
@ -36,9 +26,9 @@ dependencies {
testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
if (isEclipse == false || project.path == ":libs:secure-sm-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
exclude group: 'org.elasticsearch', module: 'secure-sm'
if (isEclipse == false || project.path == ":libs:elasticsearch-secure-sm-tests") {
testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-secure-sm'
}
}
}
@ -50,7 +40,7 @@ forbiddenApisMain {
if (isEclipse) {
// in Eclipse the project is under a fake root so we need to change around the source sets
sourceSets {
if (project.path == ":libs:secure-sm") {
if (project.path == ":libs:elasticsearch-secure-sm") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -19,10 +19,10 @@
apply plugin: "nebula.maven-scm"
dependencies {
compile "org.elasticsearch:elasticsearch-core:${version}"
compile project(':libs:elasticsearch-core')
if (isEclipse == false || project.path == ":libs:ssl-config-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
if (isEclipse == false || project.path == ":libs:elasticsearch-ssl-config-tests") {
testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-ssl-config'
}
}
@ -35,7 +35,7 @@ dependencies {
if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets
sourceSets {
if (project.path == ":libs:ssl-config") {
if (project.path == ":libs:elasticsearch-ssl-config") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -21,18 +21,8 @@ apply plugin: 'elasticsearch.build'
apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-scm'
archivesBaseName = 'elasticsearch-x-content'
publishing {
publications {
nebula {
artifactId = archivesBaseName
}
}
}
dependencies {
compile "org.elasticsearch:elasticsearch-core:${version}"
compile project(':libs:elasticsearch-core')
compile "org.yaml:snakeyaml:${versions.snakeyaml}"
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
@ -44,8 +34,8 @@ dependencies {
testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
if (isEclipse == false || project.path == ":libs:x-content-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
if (isEclipse == false || project.path == ":libs:elasticsearch-x-content-tests") {
testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content'
}
}
@ -61,7 +51,7 @@ forbiddenApisMain {
if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets
sourceSets {
if (project.path == ":libs:x-content") {
if (project.path == ":libs:elasticsearch-x-content") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -25,6 +25,6 @@ esplugin {
dependencies {
compileOnly project(':modules:lang-painless')
compile project(':libs:grok')
compile project(':libs:dissect')
compile project(':libs:elasticsearch-grok')
compile project(':libs:elasticsearch-dissect')
}

View File

@ -69,7 +69,7 @@ sourceSets {
}
dependencies {
docCompile "org.elasticsearch:elasticsearch:${project.versions.elasticsearch}"
docCompile project(':server')
docCompile project(':modules:lang-painless')
}

View File

@ -33,7 +33,7 @@ publishing {
}
dependencies {
compile "org.elasticsearch:elasticsearch:${version}"
compile project(":server")
}
// no tests...yet?

View File

@ -55,8 +55,8 @@ test {
}
dependencies {
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
compile "org.elasticsearch:elasticsearch-ssl-config:${version}"
compile project(":client:rest")
compile project(":libs:elasticsearch-ssl-config")
// for http - testing reindex from remote
testCompile project(path: ':modules:transport-netty4', configuration: 'runtime')
// for parent/child testing

View File

@ -7,3 +7,22 @@ gradle.projectsEvaluated {
}
}
}
configure(project('painless-whitelist')) {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute module('org.elasticsearch.plugin:elasticsearch-scripting-painless-spi') with project(':modules:lang-painless:spi')
substitute module('org.elasticsearch.test:logger-usage') with project(':test:logger-usage')
}
}
}
configure(project('security-authorization-engine')) {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute module('org.elasticsearch.plugin:x-pack-core') with project(':x-pack:plugin:core')
substitute module('org.elasticsearch.client:x-pack-transport') with project(':x-pack:transport-client')
substitute module('org.elasticsearch.test:logger-usage') with project(':test:logger-usage')
}
}
}

View File

@ -25,7 +25,7 @@ esplugin {
}
dependencies {
compile "org.elasticsearch:elasticsearch-nio:${version}"
compile project(':libs:elasticsearch-nio')
// network stack
compile "io.netty:netty-buffer:${versions.netty}"

View File

@ -21,5 +21,5 @@ apply plugin: 'elasticsearch.rest-test'
apply plugin: 'elasticsearch.test-with-dependencies'
dependencies {
testCompile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}"
testCompile project(":client:rest-high-level")
}

View File

@ -22,7 +22,7 @@ import org.elasticsearch.gradle.test.RestIntegTestTask
apply plugin: 'elasticsearch.standalone-test'
dependencies {
testCompile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}"
testCompile project(":client:rest-high-level")
}
task remoteClusterTest(type: RestIntegTestTask) {

View File

@ -35,7 +35,7 @@ dependencies {
compile "commons-codec:commons-codec:${versions.commonscodec}"
compile "commons-logging:commons-logging:${versions.commonslogging}"
compile project(':libs:core')
compile project(':libs:elasticsearch-core')
// pulls in the jar built by this project and its dependencies
packagingTest project(path: project.path, configuration: 'runtime')

View File

@ -72,7 +72,7 @@ dependencies {
compile "org.apache.logging.log4j:log4j-core:${versions.log4j}"
compile project(path: ':client:transport', configuration: 'runtime')
wildfly "org.jboss:wildfly:${wildflyVersion}@zip"
testCompile "org.elasticsearch.test:framework:${VersionProperties.elasticsearch}"
testCompile project(':test:framework')
}
task unzipWildfly(type: Sync) {

View File

@ -74,13 +74,13 @@ if (!isEclipse && !isIdea) {
dependencies {
compile "org.elasticsearch:elasticsearch-core:${version}"
compile "org.elasticsearch:elasticsearch-secure-sm:${version}"
compile "org.elasticsearch:elasticsearch-x-content:${version}"
compile "org.elasticsearch:elasticsearch-geo:${version}"
compile project(':libs:elasticsearch-core')
compile project(':libs:elasticsearch-secure-sm')
compile project(':libs:elasticsearch-x-content')
compile project(":libs:elasticsearch-geo")
compileOnly project(':libs:plugin-classloader')
testRuntime project(':libs:plugin-classloader')
compileOnly project(':libs:elasticsearch-plugin-classloader')
testRuntime project(':libs:elasticsearch-plugin-classloader')
// lucene
compile "org.apache.lucene:lucene-core:${versions.lucene}"
@ -100,7 +100,7 @@ dependencies {
compile "org.apache.lucene:lucene-suggest:${versions.lucene}"
// utilities
compile "org.elasticsearch:elasticsearch-cli:${version}"
compile project(":libs:elasticsearch-cli")
compile 'com.carrotsearch:hppc:0.7.1'
// time handling, remove with java 8 time
@ -127,9 +127,9 @@ dependencies {
}
if (isEclipse == false || project.path == ":server-tests") {
testCompile("org.elasticsearch.test:framework:${version}") {
testCompile(project(":test:framework")) {
// tests use the locally compiled version of server
exclude group: 'org.elasticsearch', module: 'elasticsearch'
exclude group: 'org.elasticsearch', module: 'server'
}
}
testCompile 'com.google.jimfs:jimfs:1.1'

View File

@ -47,7 +47,7 @@ grant codeBase "${codebase.lucene-misc}" {
permission java.nio.file.LinkPermission "hard";
};
grant codeBase "${codebase.plugin-classloader}" {
grant codeBase "${codebase.elasticsearch-plugin-classloader}" {
// needed to create the classloader which allows plugins to extend other plugins
permission java.lang.RuntimePermission "createClassLoader";
};

View File

@ -117,43 +117,47 @@ include projects.toArray(new String[0])
project(':build-tools').projectDir = new File(rootProject.projectDir, 'buildSrc')
project(":libs").children.each { libsProject ->
libsProject.name = "elasticsearch-${libsProject.name}"
}
if (isEclipse) {
project(":server").projectDir = new File(rootProject.projectDir, 'server/src/main')
project(":server").buildFileName = 'eclipse-build.gradle'
project(":server-tests").projectDir = new File(rootProject.projectDir, 'server/src/test')
project(":server-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:core").projectDir = new File(rootProject.projectDir, 'libs/core/src/main')
project(":libs:core").buildFileName = 'eclipse-build.gradle'
project(":libs:core-tests").projectDir = new File(rootProject.projectDir, 'libs/core/src/test')
project(":libs:core-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:dissect").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/main')
project(":libs:dissect").buildFileName = 'eclipse-build.gradle'
project(":libs:dissect-tests").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/test')
project(":libs:dissect-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:nio").projectDir = new File(rootProject.projectDir, 'libs/nio/src/main')
project(":libs:nio").buildFileName = 'eclipse-build.gradle'
project(":libs:nio-tests").projectDir = new File(rootProject.projectDir, 'libs/nio/src/test')
project(":libs:nio-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:x-content").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/main')
project(":libs:x-content").buildFileName = 'eclipse-build.gradle'
project(":libs:x-content-tests").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/test')
project(":libs:x-content-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:secure-sm").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/main')
project(":libs:secure-sm").buildFileName = 'eclipse-build.gradle'
project(":libs:secure-sm-tests").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/test')
project(":libs:secure-sm-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:grok").projectDir = new File(rootProject.projectDir, 'libs/grok/src/main')
project(":libs:grok").buildFileName = 'eclipse-build.gradle'
project(":libs:grok-tests").projectDir = new File(rootProject.projectDir, 'libs/grok/src/test')
project(":libs:grok-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:geo").projectDir = new File(rootProject.projectDir, 'libs/geo/src/main')
project(":libs:geo").buildFileName = 'eclipse-build.gradle'
project(":libs:geo-tests").projectDir = new File(rootProject.projectDir, 'libs/geo/src/test')
project(":libs:geo-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:ssl-config").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/main')
project(":libs:ssl-config").buildFileName = 'eclipse-build.gradle'
project(":libs:ssl-config-tests").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/test')
project(":libs:ssl-config-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-core").projectDir = new File(rootProject.projectDir, 'libs/core/src/main')
project(":libs:elasticsearch-core").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-core-tests").projectDir = new File(rootProject.projectDir, 'libs/core/src/test')
project(":libs:elasticsearch-core-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-dissect").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/main')
project(":libs:elasticsearch-dissect").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-dissect-tests").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/test')
project(":libs:elasticsearch-dissect-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-nio").projectDir = new File(rootProject.projectDir, 'libs/nio/src/main')
project(":libs:elasticsearch-nio").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-nio-tests").projectDir = new File(rootProject.projectDir, 'libs/nio/src/test')
project(":libs:elasticsearch-nio-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-x-content").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/main')
project(":libs:elasticsearch-x-content").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-x-content-tests").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/test')
project(":libs:elasticsearch-x-content-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-secure-sm").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/main')
project(":libs:elasticsearch-secure-sm").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-secure-sm-tests").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/test')
project(":libs:elasticsearch-secure-sm-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-grok").projectDir = new File(rootProject.projectDir, 'libs/grok/src/main')
project(":libs:elasticsearch-grok").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-grok-tests").projectDir = new File(rootProject.projectDir, 'libs/grok/src/test')
project(":libs:elasticsearch-grok-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-geo").projectDir = new File(rootProject.projectDir, 'libs/geo/src/main')
project(":libs:elasticsearch-geo").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-geo-tests").projectDir = new File(rootProject.projectDir, 'libs/geo/src/test')
project(":libs:elasticsearch-geo-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-ssl-config").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/main')
project(":libs:elasticsearch-ssl-config").buildFileName = 'eclipse-build.gradle'
project(":libs:elasticsearch-ssl-config-tests").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/test')
project(":libs:elasticsearch-ssl-config-tests").buildFileName = 'eclipse-build.gradle'
}
// look for extra plugins for elasticsearch
@ -163,7 +167,3 @@ if (extraProjects.exists()) {
addSubProjects('', extraProjectDir)
}
}
project(":libs:cli").name = 'elasticsearch-cli'
project(":libs:geo").name = 'elasticsearch-geo'
project(":libs:ssl-config").name = 'elasticsearch-ssl-config'

View File

@ -18,11 +18,11 @@
*/
dependencies {
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
compile "org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}"
compile "org.elasticsearch:elasticsearch-nio:${version}"
compile "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch:elasticsearch-cli:${version}"
compile project(":client:rest")
compile project(":client:sniffer")
compile project(':libs:elasticsearch-nio')
compile project(":server")
compile project(":libs:elasticsearch-cli")
compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
compile "junit:junit:${versions.junit}"
compile "org.hamcrest:hamcrest:${versions.hamcrest}"

View File

@ -20,7 +20,7 @@
dependencies {
compile 'org.ow2.asm:asm-debug-all:5.0.4' // use asm-debug-all as asm-all is broken
compile "org.apache.logging.log4j:log4j-api:${versions.log4j}"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
}
loggerUsageCheck.enabled = false

View File

@ -26,17 +26,3 @@ subprojects {
project.ext.licenseFile = rootProject.file('licenses/ELASTIC-LICENSE.txt')
project.ext.noticeFile = xpackRootProject.file('NOTICE.txt')
}
subprojects {
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-ccr:${version}": xpackModule('ccr')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-core:${version}": xpackModule('core')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-deprecation:${version}": xpackModule('deprecation')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-graph:${version}": xpackModule('graph')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-ilm:${version}": xpackModule('ilm')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-logstash:${version}": xpackModule('logstash')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-ml:${version}": xpackModule('ml')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-monitoring:${version}": xpackModule('monitoring')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-security:${version}": xpackModule('security')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-sql:${version}": xpackModule('sql')]
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-watcher:${version}": xpackModule('watcher')]
}

View File

@ -18,7 +18,6 @@ buildRestTests.expectedUnconvertedCandidates = [
]
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackProject('plugin').path, configuration: 'testArtifacts')

View File

@ -1,9 +1,9 @@
apply plugin: 'elasticsearch.build'
dependencies {
compile "org.elasticsearch.plugin:x-pack-core:${version}"
compile "org.elasticsearch:elasticsearch:${version}"
testCompile "org.elasticsearch.test:framework:${version}"
compile project(':x-pack:plugin:core')
compile project(':server')
testCompile project(':test:framework')
}
project.forbiddenPatterns {

View File

@ -19,9 +19,7 @@ subprojects {
// see the root Gradle file for additional logic regarding this configuration
project.configurations.create('featureAwarePlugin')
project.dependencies.add('featureAwarePlugin', project.configurations.compileClasspath)
project.dependencies.add(
'featureAwarePlugin',
"org.elasticsearch.xpack.test:feature-aware:${org.elasticsearch.gradle.VersionProperties.elasticsearch}")
project.dependencies.add('featureAwarePlugin', project(':x-pack:test:feature-aware'))
project.dependencies.add('featureAwarePlugin', project.sourceSets.main.output.getClassesDirs())
final Task featureAwareTask = project.tasks.create("featureAwareCheck", LoggedExec) {

View File

@ -48,7 +48,7 @@ gradle.projectsEvaluated {
}
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
compileOnly project(":server")
compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View File

@ -23,7 +23,7 @@ dependencyLicenses {
}
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
compileOnly project(":server")
compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
compile "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}"
@ -95,7 +95,7 @@ forbiddenApisMain {
if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets
sourceSets {
if (project.path == ":libs:core") {
if (project.path == ":libs:elasticsearch-core") {
main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources']
} else {

View File

@ -9,7 +9,7 @@ esplugin {
}
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
compileOnly project(":server")
compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View File

@ -5,7 +5,7 @@ dependencies {
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('data-frame'), configuration: 'runtime')
testCompile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${versions.elasticsearch}"
testCompile project(':client:rest-high-level')
}
// location for keys and certificates

View File

@ -5,7 +5,7 @@ dependencies {
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('data-frame'), configuration: 'runtime')
testCompile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${versions.elasticsearch}"
testCompile project(':client:rest-high-level')
}
integTestCluster {

View File

@ -10,7 +10,7 @@ esplugin {
archivesBaseName = 'x-pack-deprecation'
dependencies {
compileOnly "org.elasticsearch.plugin:x-pack-core:${version}"
compileOnly project(":x-pack:plugin:core")
}
integTest.enabled = false

View File

@ -10,7 +10,6 @@ esplugin {
archivesBaseName = 'x-pack-graph'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
}

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(":x-pack:plugin:core")
}
// bring in graph rest test suite

View File

@ -13,7 +13,6 @@ esplugin {
archivesBaseName = 'x-pack-ilm'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
}

View File

@ -10,7 +10,6 @@ esplugin {
archivesBaseName = 'x-pack-logstash'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
}

View File

@ -49,15 +49,14 @@ compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(':modules:lang-painless:spi')
compileOnly project(path: xpackModule('core'), configuration: 'default')
compileOnly "org.elasticsearch.plugin:elasticsearch-scripting-painless-spi:${versions.elasticsearch}"
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
// This should not be here
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
// ml deps
compile project(':libs:grok')
compile project(':libs:elasticsearch-grok')
compile "com.ibm.icu:icu4j:${versions.icu4j}"
compile "net.sf.supercsv:super-csv:${versions.supercsv}"
nativeBundle "org.elasticsearch.ml:ml-cpp:${project.version}@zip"

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(":x-pack:plugin:core")
testCompile project(path: xpackModule('ml'), configuration: 'runtime')
}

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(":x-pack:plugin:core")
testCompile project(path: xpackModule('ml'), configuration: 'runtime')
}

View File

@ -2,7 +2,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackProject('plugin').path, configuration: 'testArtifacts')

View File

@ -2,7 +2,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('ml'), configuration: 'runtime')

View File

@ -1,6 +1,6 @@
apply plugin: 'elasticsearch.standalone-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(":x-pack:plugin:core")
testCompile project(path: xpackModule('ml'), configuration: 'runtime')
}

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(":x-pack:plugin:core")
testCompile project(path: xpackModule('ml'), configuration: 'runtime')
}

View File

@ -10,18 +10,17 @@ esplugin {
archivesBaseName = 'x-pack-monitoring'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
// monitoring deps
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
compile "org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}"
compile project(':client:rest')
compile project(':client:sniffer')
// baz - this goes away after we separate out the actions #27759
testCompile "org.elasticsearch.plugin:x-pack-watcher:${version}"
testCompile project(xpackModule('watcher'))
testCompile "org.elasticsearch.plugin:x-pack-ilm:${version}"
testCompile project(xpackModule('ilm'))
}
compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"

View File

@ -14,9 +14,8 @@ compileTestJava.options.compilerArgs << "-Xlint:-rawtypes"
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(":server")
compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
}

View File

@ -13,7 +13,6 @@ esplugin {
archivesBaseName = 'x-pack-security'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(path: xpackModule('core'), configuration: 'default')
compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime')
compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime')

View File

@ -5,13 +5,12 @@ apply plugin: 'elasticsearch.build'
archivesBaseName = 'elasticsearch-security-cli'
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(":server")
compileOnly project(path: xpackModule('core'), configuration: 'default')
compile "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}"
compile "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}"
testImplementation 'com.google.jimfs:jimfs:1.1'
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
}

View File

@ -4,7 +4,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View File

@ -4,7 +4,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View File

@ -4,7 +4,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View File

@ -38,16 +38,15 @@ task internalClusterTest(type: Test) {
check.dependsOn internalClusterTest
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(path: xpackModule('core'), configuration: 'default')
compileOnly(project(':modules:lang-painless')) {
// exclude ASM to not affect featureAware task on Java 10+
exclude group: "org.ow2.asm"
}
compile project('sql-action')
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
compile project(':modules:aggs-matrix-stats')
compile "org.antlr:antlr4-runtime:4.5.3"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(':test:framework')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: ':modules:reindex', configuration: 'runtime')

View File

@ -18,15 +18,15 @@ dependencies {
compile (xpackProject('plugin:sql:sql-proto')) {
transitive = false
}
compile (project(':libs:x-content')) {
compile (project(':libs:elasticsearch-x-content')) {
transitive = false
}
compile (project(':libs:elasticsearch-geo')) {
transitive = false
}
compile project(':libs:core')
compile project(':libs:elasticsearch-core')
runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
}

View File

@ -6,7 +6,7 @@ archivesBaseName = 'qa-sql'
group = "org.elasticsearch.x-pack.qa.sql"
dependencies {
compile "org.elasticsearch.test:framework:${version}"
compile project(":test:framework")
// JDBC testing dependencies
compile project(path: xpackModule('sql:jdbc'), configuration: 'nodeps')
@ -59,7 +59,7 @@ subprojects {
testCompile(xpackProject('plugin:sql:qa')) {
transitive = false
}
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
// JDBC testing dependencies
testRuntime "net.sourceforge.csvjdbc:csvjdbc:${csvjdbcVersion}"

View File

@ -1,5 +1,5 @@
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(':x-pack:plugin:core')
}
Project mainProject = project
@ -26,7 +26,7 @@ subprojects {
}
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(":x-pack:plugin:core")
}
integTestCluster {

View File

@ -13,10 +13,10 @@ dependencies {
compile (project(':server')) {
transitive = false
}
compile (project(':libs:core')) {
compile (project(':libs:elasticsearch-core')) {
transitive = false
}
compile (project(':libs:x-content')) {
compile (project(':libs:elasticsearch-x-content')) {
transitive = false
}
compile xpackProject('plugin:sql:sql-proto')
@ -26,7 +26,7 @@ dependencies {
runtime "org.apache.logging.log4j:log4j-api:${versions.log4j}"
runtime "org.apache.logging.log4j:log4j-core:${versions.log4j}"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
}
forbiddenApisMain {

View File

@ -25,10 +25,10 @@ dependencies {
compile xpackProject('plugin:sql:sql-client')
compile xpackProject('plugin:sql:sql-action')
compile "org.elasticsearch:elasticsearch-cli:${version}"
compile project(":libs:elasticsearch-cli")
runtime "org.elasticsearch:jna:${versions.jna}"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
}
dependencyLicenses {

View File

@ -10,7 +10,7 @@ description = 'Code shared between jdbc and cli'
dependencies {
compile xpackProject('plugin:sql:sql-proto')
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
}
dependencyLicenses {

View File

@ -8,15 +8,15 @@ description = 'Request and response objects shared by the cli, jdbc ' +
'and the Elasticsearch plugin'
dependencies {
compile (project(':libs:core')) {
compile (project(':libs:elasticsearch-core')) {
transitive = false
}
compile (project(':libs:x-content')) {
compile (project(':libs:elasticsearch-x-content')) {
transitive = false
}
runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
testCompile "org.elasticsearch.test:framework:${version}"
testCompile project(":test:framework")
}
forbiddenApisMain {

View File

@ -23,15 +23,13 @@ dependencyLicenses {
}
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
compileOnly project(':server')
compileOnly project(path: xpackModule('core'), configuration: 'default')
compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime')
compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile "org.elasticsearch.plugin:x-pack-ilm:${version}"
testCompile project(xpackModule('ilm'))
// watcher deps
compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239'

View File

@ -12,7 +12,7 @@ testFixtures.useFixture ":test:fixtures:krb5kdc-fixture"
integTest.enabled = false
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(':x-pack:plugin:core')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
}

View File

@ -5,7 +5,6 @@ apply plugin: 'elasticsearch.rest-test'
apply plugin: 'elasticsearch.test.fixtures'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')

View File

@ -2,7 +2,6 @@ apply plugin: 'elasticsearch.standalone-test'
apply plugin: 'elasticsearch.test.fixtures'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View File

@ -4,7 +4,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View File

@ -11,7 +11,7 @@ test.enabled = false
dependencies {
testCompile project(':x-pack:qa')
testCompile ("org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}")
testCompile project(':client:rest-high-level')
}
Closure waitWithAuth = { NodeInfo node, AntBuilder ant ->

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(xpackModule('core'))
testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime')
}

View File

@ -8,7 +8,7 @@ esplugin {
}
dependencies {
compileOnly "org.elasticsearch.plugin:x-pack-core:${version}"
compileOnly project(':x-pack:plugin:core')
testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime')
}

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(xpackModule('core'))
testCompile project(path: xpackModule('security'), configuration: 'runtime')
testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime')
}

View File

@ -2,7 +2,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
testCompile project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('security'), configuration: 'runtime')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View File

@ -6,7 +6,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(':x-pack:plugin:core')
}
String outputDir = "${buildDir}/generated-resources/${project.name}"

View File

@ -7,7 +7,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(':x-pack:plugin:core')
testCompile project(path: xpackModule('watcher'), configuration: 'runtime')
}

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(':x-pack:plugin:core')
testCompile project(path: xpackModule('watcher'), configuration: 'runtime')
}

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(':x-pack:plugin:core')
testCompile project(path: xpackModule('watcher'), configuration: 'runtime')
}

View File

@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(xpackModule('core'))
testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime')
}

View File

@ -2,9 +2,9 @@ apply plugin: 'elasticsearch.build'
dependencies {
compile 'org.ow2.asm:asm:7.1'
compile "org.elasticsearch:elasticsearch:${version}"
compile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile "org.elasticsearch.test:framework:${version}"
compile project(':server')
compile project(':x-pack:plugin:core')
testCompile project(':test:framework')
}
forbiddenApisMain.enabled = true

View File

@ -8,8 +8,8 @@ archivesBaseName = 'x-pack-transport'
dependencies {
// this "api" dependency looks weird, but it is correct, as it contains
// all of x-pack for now, and transport client will be going away in the future.
compile "org.elasticsearch.plugin:x-pack-core:${version}"
compile "org.elasticsearch.client:transport:${version}"
compile project(xpackModule('core'))
compile project(':client:transport')
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"