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

This commit is contained in:
Mark Vieira 2019-06-03 16:18:45 -07:00 committed by GitHub
parent 69993049a8
commit 12d583dbf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
90 changed files with 274 additions and 359 deletions

View file

@ -27,7 +27,7 @@ archivesBaseName = 'elasticsearch-benchmarks'
test.enabled = false test.enabled = false
dependencies { 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 // 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. // us to invoke the JMH uberjar as usual.
exclude group: 'net.sf.jopt-simple', module: 'jopt-simple' exclude group: 'net.sf.jopt-simple', module: 'jopt-simple'

View file

@ -209,68 +209,7 @@ allprojects {
javadoc.options.addStringOption('Xdoclint:all,-missing', '-quiet') 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'
]
/*
* 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 { 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 // Handle javadoc dependencies across projects. Order matters: the linksOffline for
// org.elasticsearch:elasticsearch must be the last one or all the links for the // 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 // other packages (e.g org.elasticsearch.client) will point to server rather than
@ -279,10 +218,10 @@ allprojects {
String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co" String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
Closure sortClosure = { a, b -> b.group <=> a.group } Closure sortClosure = { a, b -> b.group <=> a.group }
Closure depJavadocClosure = { shadowed, dep -> Closure depJavadocClosure = { shadowed, dep ->
if (dep.group == null || false == dep.group.startsWith('org.elasticsearch')) { if ((dep instanceof ProjectDependency) == false) {
return return
} }
Project upstreamProject = project.ext.dependencyToProject(dep) Project upstreamProject = dep.dependencyProject
if (upstreamProject == null) { if (upstreamProject == null) {
return return
} }
@ -338,8 +277,8 @@ gradle.projectsEvaluated {
integTest.mustRunAfter test integTest.mustRunAfter test
} }
configurations.matching { it.canBeResolved }.all { Configuration configuration -> configurations.matching { it.canBeResolved }.all { Configuration configuration ->
dependencies.all { Dependency dep -> dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
Project upstreamProject = dependencyToProject(dep) Project upstreamProject = dep.dependencyProject
if (upstreamProject != null) { if (upstreamProject != null) {
if (project.path == upstreamProject.path) { if (project.path == upstreamProject.path) {
// TODO: distribution integ tests depend on themselves (!), fix that // TODO: distribution integ tests depend on themselves (!), fix that

View file

@ -149,6 +149,11 @@ if (project != rootProject) {
distribution project(':distribution:archives:oss-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" String localDownloads = "${rootProject.buildDir}/local-downloads"
task setupLocalDownloads(type:Copy) { task setupLocalDownloads(type:Copy) {
from configurations.distribution from configurations.distribution

View file

@ -26,6 +26,7 @@ import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.test.RestIntegTestTask import org.elasticsearch.gradle.test.RestIntegTestTask
import org.elasticsearch.gradle.test.RunTask import org.elasticsearch.gradle.test.RunTask
import org.elasticsearch.gradle.testclusters.TestClustersPlugin import org.elasticsearch.gradle.testclusters.TestClustersPlugin
import org.elasticsearch.gradle.tool.ClasspathUtils
import org.gradle.api.InvalidUserDataException import org.gradle.api.InvalidUserDataException
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
@ -136,8 +137,13 @@ class PluginBuildPlugin implements Plugin<Project> {
private static void configureDependencies(Project project) { private static void configureDependencies(Project project) {
project.dependencies { project.dependencies {
if (ClasspathUtils.isElasticsearchProject()) {
compileOnly project.project(':server')
testCompile project.project(':test:framework')
} else {
compileOnly "org.elasticsearch:elasticsearch:${project.versions.elasticsearch}" compileOnly "org.elasticsearch:elasticsearch:${project.versions.elasticsearch}"
testCompile "org.elasticsearch.test:framework:${project.versions.elasticsearch}" testCompile "org.elasticsearch.test:framework:${project.versions.elasticsearch}"
}
// we "upgrade" these optional deps to provided for plugins, since they will run // we "upgrade" these optional deps to provided for plugins, since they will run
// with a full elasticsearch server that includes optional deps // with a full elasticsearch server that includes optional deps
compileOnly "org.locationtech.spatial4j:spatial4j:${project.versions.spatial4j}" 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 de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin
import org.elasticsearch.gradle.ExportElasticsearchBuildResourcesTask import org.elasticsearch.gradle.ExportElasticsearchBuildResourcesTask
import org.elasticsearch.gradle.VersionProperties import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.tool.ClasspathUtils
import org.gradle.api.JavaVersion import org.gradle.api.JavaVersion
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.Task import org.gradle.api.Task
import org.gradle.api.plugins.JavaBasePlugin import org.gradle.api.plugins.JavaBasePlugin
import org.gradle.api.plugins.quality.Checkstyle import org.gradle.api.plugins.quality.Checkstyle
/** /**
* Validation tasks which should be run before committing. These run before tests. * Validation tasks which should be run before committing. These run before tests.
*/ */
@ -229,9 +231,11 @@ class PrecommitTasks {
} }
private static Task configureLoggerUsage(Project project) { 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.configurations.create('loggerUsagePlugin')
project.dependencies.add('loggerUsagePlugin', project.dependencies.add('loggerUsagePlugin', dependency)
"org.elasticsearch.test:logger-usage:${VersionProperties.elasticsearch}")
return project.tasks.create('loggerUsageCheck', LoggerUsageTask.class) { return project.tasks.create('loggerUsageCheck', LoggerUsageTask.class) {
classpath = project.configurations.loggerUsagePlugin classpath = project.configurations.loggerUsagePlugin
} }

View file

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

View file

@ -79,7 +79,7 @@ class StandaloneRestTestPlugin implements Plugin<Project> {
// create a compileOnly configuration as others might expect it // create a compileOnly configuration as others might expect it
project.configurations.create("compileOnly") 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) EclipseModel eclipse = project.extensions.getByType(EclipseModel)
eclipse.classpath.sourceSets = [testSourceSet] 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 { dependencies {
compile 'org.apache.commons:commons-math3:3.2' 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 // bottleneck should be the client, not Elasticsearch
compile project(path: ':client:client-benchmark-noop-api-plugin') compile project(path: ':client:client-benchmark-noop-api-plugin')
// for transport client // for transport client
compile("org.elasticsearch:elasticsearch:${version}") compile project(":server")
compile("org.elasticsearch.client:transport:${version}") compile project(":client:transport")
compile project(path: ':modules:transport-netty4', configuration: 'runtime') compile project(path: ':modules:transport-netty4', configuration: 'runtime')
compile project(path: ':modules:reindex', configuration: 'runtime') compile project(path: ':modules:reindex', configuration: 'runtime')
compile project(path: ':modules:lang-mustache', configuration: 'runtime') compile project(path: ':modules:lang-mustache', configuration: 'runtime')

View file

@ -46,34 +46,34 @@ idea {
} }
dependencies { dependencies {
compile "org.elasticsearch:elasticsearch:${version}" compile project(':server')
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile project(':client:rest')
compile project(':modules:parent-join') compile project(':modules:parent-join')
compile project(':modules:aggs-matrix-stats') compile project(':modules:aggs-matrix-stats')
compile project(':modules:rank-eval') compile project(':modules:rank-eval')
compile project(':modules:lang-mustache') compile project(':modules:lang-mustache')
shadow "org.elasticsearch:elasticsearch:${version}" shadow project(':server')
shadow "org.elasticsearch.client:elasticsearch-rest-client:${version}" shadow project(':client:rest')
bundle project(':modules:parent-join') bundle project(':modules:parent-join')
bundle project(':modules:aggs-matrix-stats') bundle project(':modules:aggs-matrix-stats')
bundle project(':modules:rank-eval') bundle project(':modules:rank-eval')
bundle project(':modules:lang-mustache') bundle project(':modules:lang-mustache')
testCompile "org.elasticsearch.client:test:${version}" testCompile project(':client:test')
testCompile "org.elasticsearch.test:framework:${version}" testCompile project(':test:framework')
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
//this is needed to make RestHighLevelClientTests#testApiNamingConventions work from IDEs //this is needed to make RestHighLevelClientTests#testApiNamingConventions work from IDEs
testCompile "org.elasticsearch:rest-api-spec:${version}" testCompile project(":rest-api-spec")
// Needed for serialization tests: // Needed for serialization tests:
// (In order to serialize a server side class to a client side class or the other way around) // (In order to serialize a server side class to a client side class or the other way around)
if (isEclipse == false || project.path == ":client:rest-high-level-tests") { if (isEclipse == false || project.path == ":client:rest-high-level-tests") {
testCompile("org.elasticsearch.plugin:x-pack-core:${version}") { testCompile(project(':x-pack:plugin:core')) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-rest-high-level-client' exclude group: 'org.elasticsearch', module: 'elasticsearch-rest-high-level-client'
} }
} }
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) //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-codec:commons-codec:${versions.commonscodec}"
compile "commons-logging:commons-logging:${versions.commonslogging}" 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 "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" 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 // 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 jarHell.enabled=false
testingConventions { testingConventions {

View file

@ -35,14 +35,14 @@ publishing {
} }
dependencies { dependencies {
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile project(":client:rest")
compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
compile "commons-codec:commons-codec:${versions.commonscodec}" compile "commons-codec:commons-codec:${versions.commonscodec}"
compile "commons-logging:commons-logging:${versions.commonslogging}" compile "commons-logging:commons-logging:${versions.commonslogging}"
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" 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 "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
testCompile "org.elasticsearch:securemock:${versions.securemock}" 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 // 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 jarHell.enabled=false
testingConventions { testingConventions {

View file

@ -44,7 +44,7 @@ forbiddenApisTest {
} }
// JarHell is part of es server, which we don't want to pull in // 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 jarHell.enabled=false
// TODO: should we have licenses for our test deps? // TODO: should we have licenses for our test deps?

View file

@ -23,13 +23,13 @@ apply plugin: 'nebula.maven-scm'
group = 'org.elasticsearch.client' group = 'org.elasticsearch.client'
dependencies { dependencies {
compile "org.elasticsearch:elasticsearch:${version}" compile project(":server")
compile "org.elasticsearch.plugin:transport-netty4-client:${version}" compile project(":modules:transport-netty4")
compile "org.elasticsearch.plugin:reindex-client:${version}" compile project(":modules:reindex")
compile "org.elasticsearch.plugin:lang-mustache-client:${version}" compile project(":modules:lang-mustache")
compile "org.elasticsearch.plugin:percolator-client:${version}" compile project(":modules:percolator")
compile "org.elasticsearch.plugin:parent-join-client:${version}" compile project(":modules:parent-join")
compile "org.elasticsearch.plugin:rank-eval-client:${version}" compile project(":modules:rank-eval")
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" 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 // delay by using closures, since they have not yet been configured, so no jar task exists yet
from { project(':server').jar } from { project(':server').jar }
from { project(':server').configurations.runtime } 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:java-version-checker').jar }
from { project(':distribution:tools:launchers').jar } from { project(':distribution:tools:launchers').jar }
into('tools/plugin-cli') { into('tools/plugin-cli') {

View file

@ -20,9 +20,9 @@
apply plugin: 'elasticsearch.build' apply plugin: 'elasticsearch.build'
dependencies { dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}" compileOnly project(":server")
compileOnly "org.elasticsearch:elasticsearch-cli:${version}" compileOnly project(":libs:elasticsearch-cli")
testCompile "org.elasticsearch.test:framework:${version}" testCompile project(":test:framework")
testCompile 'com.google.jimfs:jimfs:1.1' testCompile 'com.google.jimfs:jimfs:1.1'
testCompile 'com.google.guava:guava:18.0' testCompile 'com.google.guava:guava:18.0'
} }

View file

@ -22,11 +22,11 @@ apply plugin: 'elasticsearch.build'
archivesBaseName = 'elasticsearch-plugin-cli' archivesBaseName = 'elasticsearch-plugin-cli'
dependencies { dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}" compileOnly project(":server")
compileOnly "org.elasticsearch:elasticsearch-cli:${version}" compileOnly project(":libs:elasticsearch-cli")
compile "org.bouncycastle:bcpg-jdk15on:${versions.bouncycastle}" compile "org.bouncycastle:bcpg-jdk15on:${versions.bouncycastle}"
compile "org.bouncycastle:bcprov-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.jimfs:jimfs:1.1'
testCompile 'com.google.guava:guava:18.0' 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 * 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 { project.afterEvaluate {
configurations.all { Configuration conf -> configurations.all { Configuration conf ->
dependencies.all { Dependency dep -> dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
Project depProject = dependencyToProject(dep) Project depProject = dep.dependencyProject
if (depProject != null if (depProject != null
&& false == depProject.path.equals(':libs:core') && false == depProject.path.equals(':libs:elasticsearch-core')
&& false == isEclipse && false == isEclipse
&& depProject.path.startsWith(':libs')) { && depProject.path.startsWith(':libs')) {
throw new InvalidUserDataException("projects in :libs " throw new InvalidUserDataException("projects in :libs "
+ "may not depend on other projects libs except " + "may not depend on other projects libs except "
+ ":libs:core but " + ":libs:elasticsearch-core but "
+ "${project.path} depends on ${depProject.path}") + "${project.path} depends on ${depProject.path}")
} }
} }

View file

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

View file

@ -21,30 +21,20 @@ apply plugin: 'nebula.optional-base'
apply plugin: 'nebula.maven-base-publish' apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-scm' apply plugin: 'nebula.maven-scm'
archivesBaseName = 'elasticsearch-core'
publishing {
publications {
nebula {
artifactId = archivesBaseName
}
}
}
dependencies { dependencies {
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
if (isEclipse == false || project.path == ":libs:core-tests") { if (isEclipse == false || project.path == ":libs:elasticsearch-core-tests") {
testCompile("org.elasticsearch.test:framework:${version}") { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-core' exclude group: 'org.elasticsearch', module: 'elasticsearch-core'
} }
} }
} }
forbiddenApisMain { 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 // TODO: Need to decide how we want to handle for forbidden signatures with the changes to server
replaceSignatureFiles 'jdk-signatures' replaceSignatureFiles 'jdk-signatures'
} }
@ -52,7 +42,7 @@ forbiddenApisMain {
if (isEclipse) { if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets // in eclipse the project is under a fake root, we need to change around the source sets
sourceSets { sourceSets {
if (project.path == ":libs:core") { if (project.path == ":libs:elasticsearch-core") {
main.java.srcDirs = ['java'] main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources'] main.resources.srcDirs = ['resources']
} else { } else {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -54,8 +54,8 @@ test {
} }
dependencies { dependencies {
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile project(":client:rest")
compile "org.elasticsearch:elasticsearch-ssl-config:${version}" compile project(":libs:elasticsearch-ssl-config")
// for http - testing reindex from remote // for http - testing reindex from remote
testCompile project(path: ':modules:transport-netty4', configuration: 'runtime') testCompile project(path: ':modules:transport-netty4', configuration: 'runtime')
// for parent/child testing // 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:elasticsearch-rest-high-level-client') with project(':client:rest-high-level')
substitute module('org.elasticsearch.test:logger-usage') with project(':test:logger-usage')
}
}
}

View file

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

View file

@ -21,5 +21,5 @@ apply plugin: 'elasticsearch.rest-test'
apply plugin: 'elasticsearch.test-with-dependencies' apply plugin: 'elasticsearch.test-with-dependencies'
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' apply plugin: 'elasticsearch.standalone-test'
dependencies { dependencies {
testCompile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}" testCompile project(":client:rest-high-level")
} }
task remoteClusterTest(type: RestIntegTestTask) { task remoteClusterTest(type: RestIntegTestTask) {

View file

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

View file

@ -70,9 +70,9 @@ dependencies {
compile "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${versions.jackson}" compile "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${versions.jackson}"
compile "org.apache.logging.log4j:log4j-api:${versions.log4j}" compile "org.apache.logging.log4j:log4j-api:${versions.log4j}"
compile "org.apache.logging.log4j:log4j-core:${versions.log4j}" compile "org.apache.logging.log4j:log4j-core:${versions.log4j}"
compile project(path: ':client:rest-high-level') compile project(':client:rest-high-level')
wildfly "org.jboss:wildfly:${wildflyVersion}@zip" wildfly "org.jboss:wildfly:${wildflyVersion}@zip"
testCompile "org.elasticsearch.test:framework:${VersionProperties.elasticsearch}" testCompile project(':test:framework')
} }
task unzipWildfly(type: Sync) { task unzipWildfly(type: Sync) {

View file

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

View file

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

View file

@ -120,43 +120,47 @@ include projects.toArray(new String[0])
project(':build-tools').projectDir = new File(rootProject.projectDir, 'buildSrc') project(':build-tools').projectDir = new File(rootProject.projectDir, 'buildSrc')
project(":libs").children.each { libsProject ->
libsProject.name = "elasticsearch-${libsProject.name}"
}
if (isEclipse) { if (isEclipse) {
project(":server").projectDir = new File(rootProject.projectDir, 'server/src/main') project(":server").projectDir = new File(rootProject.projectDir, 'server/src/main')
project(":server").buildFileName = 'eclipse-build.gradle' project(":server").buildFileName = 'eclipse-build.gradle'
project(":server-tests").projectDir = new File(rootProject.projectDir, 'server/src/test') project(":server-tests").projectDir = new File(rootProject.projectDir, 'server/src/test')
project(":server-tests").buildFileName = 'eclipse-build.gradle' project(":server-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:core").projectDir = new File(rootProject.projectDir, 'libs/core/src/main') project(":libs:elasticsearch-core").projectDir = new File(rootProject.projectDir, 'libs/core/src/main')
project(":libs:core").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-core").buildFileName = 'eclipse-build.gradle'
project(":libs:core-tests").projectDir = new File(rootProject.projectDir, 'libs/core/src/test') project(":libs:elasticsearch-core-tests").projectDir = new File(rootProject.projectDir, 'libs/core/src/test')
project(":libs:core-tests").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-core-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:dissect").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/main') project(":libs:elasticsearch-dissect").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/main')
project(":libs:dissect").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-dissect").buildFileName = 'eclipse-build.gradle'
project(":libs:dissect-tests").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/test') project(":libs:elasticsearch-dissect-tests").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/test')
project(":libs:dissect-tests").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-dissect-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:nio").projectDir = new File(rootProject.projectDir, 'libs/nio/src/main') project(":libs:elasticsearch-nio").projectDir = new File(rootProject.projectDir, 'libs/nio/src/main')
project(":libs:nio").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-nio").buildFileName = 'eclipse-build.gradle'
project(":libs:nio-tests").projectDir = new File(rootProject.projectDir, 'libs/nio/src/test') project(":libs:elasticsearch-nio-tests").projectDir = new File(rootProject.projectDir, 'libs/nio/src/test')
project(":libs:nio-tests").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-nio-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:x-content").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/main') project(":libs:elasticsearch-x-content").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/main')
project(":libs:x-content").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-x-content").buildFileName = 'eclipse-build.gradle'
project(":libs:x-content-tests").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/test') project(":libs:elasticsearch-x-content-tests").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/test')
project(":libs:x-content-tests").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-x-content-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:secure-sm").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/main') project(":libs:elasticsearch-secure-sm").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/main')
project(":libs:secure-sm").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-secure-sm").buildFileName = 'eclipse-build.gradle'
project(":libs:secure-sm-tests").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/test') project(":libs:elasticsearch-secure-sm-tests").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/test')
project(":libs:secure-sm-tests").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-secure-sm-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:grok").projectDir = new File(rootProject.projectDir, 'libs/grok/src/main') project(":libs:elasticsearch-grok").projectDir = new File(rootProject.projectDir, 'libs/grok/src/main')
project(":libs:grok").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-grok").buildFileName = 'eclipse-build.gradle'
project(":libs:grok-tests").projectDir = new File(rootProject.projectDir, 'libs/grok/src/test') project(":libs:elasticsearch-grok-tests").projectDir = new File(rootProject.projectDir, 'libs/grok/src/test')
project(":libs:grok-tests").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-grok-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:geo").projectDir = new File(rootProject.projectDir, 'libs/geo/src/main') project(":libs:elasticsearch-geo").projectDir = new File(rootProject.projectDir, 'libs/geo/src/main')
project(":libs:geo").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-geo").buildFileName = 'eclipse-build.gradle'
project(":libs:geo-tests").projectDir = new File(rootProject.projectDir, 'libs/geo/src/test') project(":libs:elasticsearch-geo-tests").projectDir = new File(rootProject.projectDir, 'libs/geo/src/test')
project(":libs:geo-tests").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-geo-tests").buildFileName = 'eclipse-build.gradle'
project(":libs:ssl-config").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/main') project(":libs:elasticsearch-ssl-config").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/main')
project(":libs:ssl-config").buildFileName = 'eclipse-build.gradle' project(":libs:elasticsearch-ssl-config").buildFileName = 'eclipse-build.gradle'
project(":libs:ssl-config-tests").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/test') project(":libs:elasticsearch-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-ssl-config-tests").buildFileName = 'eclipse-build.gradle'
project(":client:rest-high-level").projectDir = new File(rootProject.projectDir, 'client/rest-high-level/src/main') project(":client:rest-high-level").projectDir = new File(rootProject.projectDir, 'client/rest-high-level/src/main')
project(":client:rest-high-level").buildFileName = 'eclipse-build.gradle' project(":client:rest-high-level").buildFileName = 'eclipse-build.gradle'
project(":client:rest-high-level-tests").projectDir = new File(rootProject.projectDir, 'client/rest-high-level/src/test') project(":client:rest-high-level-tests").projectDir = new File(rootProject.projectDir, 'client/rest-high-level/src/test')
@ -175,7 +179,3 @@ if (extraProjects.exists()) {
addSubProjects('', extraProjectDir) 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 { dependencies {
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile project(":client:rest")
compile "org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}" compile project(":client:sniffer")
compile "org.elasticsearch:elasticsearch-nio:${version}" compile project(':libs:elasticsearch-nio')
compile "org.elasticsearch:elasticsearch:${version}" compile project(":server")
compile "org.elasticsearch:elasticsearch-cli:${version}" compile project(":libs:elasticsearch-cli")
compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
compile "junit:junit:${versions.junit}" compile "junit:junit:${versions.junit}"
compile "org.hamcrest:hamcrest:${versions.hamcrest}" compile "org.hamcrest:hamcrest:${versions.hamcrest}"

View file

@ -22,7 +22,7 @@ dependencies {
compile 'org.ow2.asm:asm-tree:7.1' compile 'org.ow2.asm:asm-tree:7.1'
compile 'org.ow2.asm:asm-analysis:7.1' compile 'org.ow2.asm:asm-analysis:7.1'
compile "org.apache.logging.log4j:log4j-api:${versions.log4j}" compile "org.apache.logging.log4j:log4j-api:${versions.log4j}"
testCompile "org.elasticsearch.test:framework:${version}" testCompile project(":test:framework")
} }
loggerUsageCheck.enabled = false loggerUsageCheck.enabled = false

View file

@ -26,17 +26,3 @@ subprojects {
project.ext.licenseFile = rootProject.file('licenses/ELASTIC-LICENSE.txt') project.ext.licenseFile = rootProject.file('licenses/ELASTIC-LICENSE.txt')
project.ext.noticeFile = xpackRootProject.file('NOTICE.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 { 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: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {

View file

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

View file

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

View file

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

View file

@ -23,7 +23,7 @@ dependencyLicenses {
} }
dependencies { dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}" compileOnly project(":server")
compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
compile "org.apache.httpcomponents:httpcore:${versions.httpcore}" compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
compile "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}" compile "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}"
@ -49,7 +49,7 @@ dependencies {
testCompile project(path: ':modules:parent-join', configuration: 'runtime') testCompile project(path: ':modules:parent-join', configuration: 'runtime')
testCompile project(path: ':modules:lang-mustache', configuration: 'runtime') testCompile project(path: ':modules:lang-mustache', configuration: 'runtime')
testCompile project(path: ':modules:analysis-common', configuration: 'runtime') testCompile project(path: ':modules:analysis-common', configuration: 'runtime')
testCompile ("org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}") testCompile project(":client:rest-high-level")
if (isEclipse == false || project.path == ":x-pack:plugin:core-tests") { if (isEclipse == false || project.path == ":x-pack:plugin:core-tests") {
testCompile(project(':x-pack:license-tools')) { testCompile(project(':x-pack:license-tools')) {
@ -103,7 +103,7 @@ forbiddenApisMain {
if (isEclipse) { if (isEclipse) {
// in eclipse the project is under a fake root, we need to change around the source sets // in eclipse the project is under a fake root, we need to change around the source sets
sourceSets { sourceSets {
if (project.path == ":libs:core") { if (project.path == ":libs:elasticsearch-core") {
main.java.srcDirs = ['java'] main.java.srcDirs = ['java']
main.resources.srcDirs = ['resources'] main.resources.srcDirs = ['resources']
} else { } else {

View file

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

View file

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

View file

@ -10,7 +10,6 @@ esplugin {
archivesBaseName = 'x-pack-graph' archivesBaseName = 'x-pack-graph'
dependencies { 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: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {

View file

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

View file

@ -13,7 +13,6 @@ esplugin {
archivesBaseName = 'x-pack-ilm' archivesBaseName = 'x-pack-ilm'
dependencies { 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: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {

View file

@ -10,7 +10,6 @@ esplugin {
archivesBaseName = 'x-pack-logstash' archivesBaseName = 'x-pack-logstash'
dependencies { 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: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {

View file

@ -49,9 +49,8 @@ compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked" compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
dependencies { 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 project(path: xpackModule('core'), configuration: 'default')
compileOnly "org.elasticsearch.plugin:elasticsearch-scripting-painless-spi:${versions.elasticsearch}"
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')
@ -60,7 +59,7 @@ dependencies {
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
// ml deps // ml deps
compile project(':libs:grok') compile project(':libs:elasticsearch-grok')
compile "com.ibm.icu:icu4j:${versions.icu4j}" compile "com.ibm.icu:icu4j:${versions.icu4j}"
compile "net.sf.supercsv:super-csv:${versions.supercsv}" compile "net.sf.supercsv:super-csv:${versions.supercsv}"
nativeBundle "org.elasticsearch.ml:ml-cpp:${project.version}@zip" 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' apply plugin: 'elasticsearch.rest-test'
dependencies { dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}" testCompile project(":x-pack:plugin:core")
testCompile project(path: xpackModule('ml'), configuration: 'runtime') testCompile project(path: xpackModule('ml'), configuration: 'runtime')
} }

View file

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

View file

@ -2,7 +2,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-test'
dependencies { 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: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {

View file

@ -2,7 +2,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-test'
dependencies { 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: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {

View file

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

View file

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

View file

@ -10,7 +10,6 @@ esplugin {
archivesBaseName = 'x-pack-monitoring' archivesBaseName = 'x-pack-monitoring'
dependencies { 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: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {
@ -18,13 +17,13 @@ dependencies {
} }
// monitoring deps // monitoring deps
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile project(':client:rest')
compile "org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}" compile project(':client:sniffer')
// baz - this goes away after we separate out the actions #27759 // 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" compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"

View file

@ -14,9 +14,8 @@ compileTestJava.options.compilerArgs << "-Xlint:-rawtypes"
dependencies { dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}" compileOnly project(":server")
// "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: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {

View file

@ -13,7 +13,6 @@ esplugin {
archivesBaseName = 'x-pack-security' archivesBaseName = 'x-pack-security'
dependencies { 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: xpackModule('core'), configuration: 'default')
compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime') compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime')
compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime') compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime')

View file

@ -5,13 +5,12 @@ apply plugin: 'elasticsearch.build'
archivesBaseName = 'elasticsearch-security-cli' archivesBaseName = 'elasticsearch-security-cli'
dependencies { dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}" compileOnly project(":server")
// "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: xpackModule('core'), configuration: 'default')
compile "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}" compile "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}"
compile "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}" compile "org.bouncycastle:bcprov-jdk15on:${versions.bouncycastle}"
testImplementation 'com.google.jimfs:jimfs:1.1' testImplementation 'com.google.jimfs:jimfs:1.1'
testCompile "org.elasticsearch.test:framework:${version}" testCompile project(":test:framework")
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')

View file

@ -4,7 +4,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-test'
dependencies { 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: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), 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' apply plugin: 'elasticsearch.rest-test'
dependencies { 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: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), 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' apply plugin: 'elasticsearch.rest-test'
dependencies { 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: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View file

@ -38,16 +38,15 @@ task internalClusterTest(type: Test) {
check.dependsOn internalClusterTest check.dependsOn internalClusterTest
dependencies { 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: xpackModule('core'), configuration: 'default')
compileOnly(project(':modules:lang-painless')) { compileOnly(project(':modules:lang-painless')) {
// exclude ASM to not affect featureAware task on Java 10+ // exclude ASM to not affect featureAware task on Java 10+
exclude group: "org.ow2.asm" exclude group: "org.ow2.asm"
} }
compile project('sql-action') 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" 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('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')

View file

@ -18,15 +18,15 @@ dependencies {
compile (xpackProject('plugin:sql:sql-proto')) { compile (xpackProject('plugin:sql:sql-proto')) {
transitive = false transitive = false
} }
compile (project(':libs:x-content')) { compile (project(':libs:elasticsearch-x-content')) {
transitive = false transitive = false
} }
compile (project(':libs:elasticsearch-geo')) { compile (project(':libs:elasticsearch-geo')) {
transitive = false transitive = false
} }
compile project(':libs:core') compile project(':libs:elasticsearch-core')
runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" 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') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -23,9 +23,7 @@ dependencyLicenses {
} }
dependencies { dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}" compileOnly project(':server')
// "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: xpackModule('core'), configuration: 'default')
compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime') compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime')
compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime') compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime')
@ -34,7 +32,7 @@ dependencies {
if (isEclipse) { if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')
} }
testCompile "org.elasticsearch.plugin:x-pack-ilm:${version}" testCompile project(xpackModule('ilm'))
// watcher deps // watcher deps
compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239' 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 integTest.enabled = false
dependencies { 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('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')

View file

@ -5,7 +5,6 @@ apply plugin: 'elasticsearch.rest-test'
apply plugin: 'elasticsearch.test.fixtures' apply plugin: 'elasticsearch.test.fixtures'
dependencies { 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: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) { if (isEclipse) {

View file

@ -2,7 +2,6 @@ apply plugin: 'elasticsearch.standalone-test'
apply plugin: 'elasticsearch.test.fixtures' apply plugin: 'elasticsearch.test.fixtures'
dependencies { 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: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), 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' apply plugin: 'elasticsearch.rest-test'
dependencies { 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: 'default')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View file

@ -11,7 +11,7 @@ test.enabled = false
dependencies { dependencies {
testCompile project(':x-pack:qa') 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 -> Closure waitWithAuth = { NodeInfo node, AntBuilder ant ->

View file

@ -8,8 +8,8 @@ esplugin {
} }
dependencies { dependencies {
compileOnly "org.elasticsearch.plugin:x-pack-core:${version}" compileOnly project(':x-pack:plugin:core')
testCompile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}" testCompile project(':client:rest-high-level')
} }

View file

@ -2,7 +2,6 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-test'
dependencies { 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: 'default')
testCompile project(path: xpackModule('security'), configuration: 'runtime') testCompile project(path: xpackModule('security'), configuration: 'runtime')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')

View file

@ -6,7 +6,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-test'
dependencies { dependencies {
testCompile "org.elasticsearch.plugin:x-pack-core:${version}" testCompile project(':x-pack:plugin:core')
testCompile project(':client:rest-high-level') testCompile project(':client:rest-high-level')
} }

View file

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

View file

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

View file

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

View file

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