diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c591459f01b..4285c8fd20c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -325,21 +325,19 @@ common configurations in our build and how we use them:
- `compile`
- Code that is on the classpath at both compile and
-runtime. If the [`shadow`][shadow-plugin] plugin is applied to the project then
-this code is bundled into the jar produced by the project.
+runtime.
- `runtime`
- Code that is not on the classpath at compile time but is
on the classpath at runtime. We mostly use this configuration to make sure that
we do not accidentally compile against dependencies of our dependencies also
known as "transitive" dependencies".
-- `compileOnly`
- Code that is on the classpath at comile time but that
+
- `compileOnly`
- Code that is on the classpath at compile time but that
should not be shipped with the project because it is "provided" by the runtime
somehow. Elasticsearch plugins use this configuration to include dependencies
that are bundled with Elasticsearch's server.
-- `shadow`
- Only available in projects with the shadow plugin. Code
-that is on the classpath at both compile and runtime but it *not* bundled into
-the jar produced by the project. If you depend on a project with the `shadow`
-plugin then you need to depend on this configuration because it will bring
-along all of the dependencies you need at runtime.
+- `bundle`
- Only available in projects with the shadow plugin,
+dependencies with this configuration are bundled into the jar produced by the
+build. Since IDEs do not understand this configuration we rig them to treat
+dependencies in this configuration as `compile` dependencies.
- `testCompile`
- Code that is on the classpath for compiling tests
that are part of this project but not production code. The canonical example
of this is `junit`.
diff --git a/build.gradle b/build.gradle
index 0df5b97ae4a..36d3a543d89 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,6 +22,7 @@ import org.elasticsearch.gradle.LoggedExec
import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.VersionCollection
import org.elasticsearch.gradle.VersionProperties
+import org.elasticsearch.gradle.plugin.PluginBuildPlugin
import org.gradle.plugins.ide.eclipse.model.SourceFolder
import org.gradle.util.GradleVersion
import org.gradle.util.DistributionLocator
@@ -304,7 +305,7 @@ subprojects {
// 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
// their own artifacts.
- if (project.plugins.hasPlugin(BuildPlugin)) {
+ if (project.plugins.hasPlugin(BuildPlugin) || project.plugins.hasPlugin(PluginBuildPlugin)) {
String artifactsHost = VersionProperties.elasticsearch.isSnapshot() ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
Closure sortClosure = { a, b -> b.group <=> a.group }
Closure depJavadocClosure = { shadowed, dep ->
@@ -322,13 +323,6 @@ subprojects {
*/
project.evaluationDependsOn(upstreamProject.path)
project.javadoc.source += upstreamProject.javadoc.source
- /*
- * Do not add those projects to the javadoc classpath because
- * we are going to resolve them with their source instead.
- */
- project.javadoc.classpath = project.javadoc.classpath.filter { f ->
- false == upstreamProject.configurations.archives.artifacts.files.files.contains(f)
- }
/*
* Instead we need the upstream project's javadoc classpath so
* we don't barf on the classes that it references.
@@ -345,16 +339,16 @@ subprojects {
project.configurations.compile.dependencies
.findAll()
.toSorted(sortClosure)
- .each({ c -> depJavadocClosure(hasShadow, c) })
+ .each({ c -> depJavadocClosure(false, c) })
project.configurations.compileOnly.dependencies
.findAll()
.toSorted(sortClosure)
- .each({ c -> depJavadocClosure(hasShadow, c) })
+ .each({ c -> depJavadocClosure(false, c) })
if (hasShadow) {
- project.configurations.shadow.dependencies
+ project.configurations.bundle.dependencies
.findAll()
.toSorted(sortClosure)
- .each({ c -> depJavadocClosure(false, c) })
+ .each({ c -> depJavadocClosure(true, c) })
}
}
}
@@ -523,25 +517,18 @@ allprojects {
allprojects {
/*
* IntelliJ and Eclipse don't know about the shadow plugin so when we're
- * in "IntelliJ mode" or "Eclipse mode" add "runtime" dependencies
- * eveywhere where we see a "shadow" dependency which will cause them to
- * reference shadowed projects directly rather than rely on the shadowing
- * to include them. This is the correct thing for it to do because it
- * doesn't run the jar shadowing at all. This isn't needed for the project
+ * in "IntelliJ mode" or "Eclipse mode" switch "bundle" dependencies into
+ * regular "compile" dependencies. This isn't needed for the project
* itself because the IDE configuration is done by SourceSets but it is
* *is* needed for projects that depends on the project doing the shadowing.
* Without this they won't properly depend on the shadowed project.
*/
if (isEclipse || isIdea) {
- configurations.all { Configuration configuration ->
- dependencies.all { Dependency dep ->
- if (dep instanceof ProjectDependency) {
- if (dep.getTargetConfiguration() == 'shadow') {
- configuration.dependencies.add(project.dependencies.project(path: dep.dependencyProject.path, configuration: 'runtime'))
- }
- }
- }
- }
+ project.plugins.withType(ShadowPlugin).whenPluginAdded {
+ project.afterEvaluate {
+ project.configurations.compile.extendsFrom project.configurations.bundle
+ }
+ }
}
}
diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
index e45ba7ce9dc..7713d5c64df 100644
--- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
@@ -79,8 +79,9 @@ class BuildPlugin implements Plugin {
}
project.pluginManager.apply('java')
project.pluginManager.apply('carrotsearch.randomized-testing')
- // these plugins add lots of info to our jars
+ configureConfigurations(project)
configureJars(project) // jar config must be added before info broker
+ // these plugins add lots of info to our jars
project.pluginManager.apply('nebula.info-broker')
project.pluginManager.apply('nebula.info-basic')
project.pluginManager.apply('nebula.info-java')
@@ -91,8 +92,8 @@ class BuildPlugin implements Plugin {
globalBuildInfo(project)
configureRepositories(project)
- configureConfigurations(project)
project.ext.versions = VersionProperties.versions
+ configureSourceSets(project)
configureCompile(project)
configureJavadoc(project)
configureSourcesJar(project)
@@ -421,8 +422,10 @@ class BuildPlugin implements Plugin {
project.configurations.compile.dependencies.all(disableTransitiveDeps)
project.configurations.testCompile.dependencies.all(disableTransitiveDeps)
project.configurations.compileOnly.dependencies.all(disableTransitiveDeps)
+
project.plugins.withType(ShadowPlugin).whenPluginAdded {
- project.configurations.shadow.dependencies.all(disableTransitiveDeps)
+ Configuration bundle = project.configurations.create('bundle')
+ bundle.dependencies.all(disableTransitiveDeps)
}
}
@@ -556,30 +559,6 @@ class BuildPlugin implements Plugin {
publications {
nebula(MavenPublication) {
artifacts = [ project.tasks.shadowJar ]
- artifactId = project.archivesBaseName
- /*
- * Configure the pom to include the "shadow" as compile dependencies
- * because that is how we're using them but remove all other dependencies
- * because they've been shaded into the jar.
- */
- pom.withXml { XmlProvider xml ->
- Node root = xml.asNode()
- root.remove(root.dependencies)
- Node dependenciesNode = root.appendNode('dependencies')
- project.configurations.shadow.allDependencies.each {
- if (false == it instanceof SelfResolvingDependency) {
- Node dependencyNode = dependenciesNode.appendNode('dependency')
- dependencyNode.appendNode('groupId', it.group)
- dependencyNode.appendNode('artifactId', it.name)
- dependencyNode.appendNode('version', it.version)
- dependencyNode.appendNode('scope', 'compile')
- }
- }
- // Be tidy and remove the element if it is empty
- if (dependenciesNode.children.empty) {
- root.remove(dependenciesNode)
- }
- }
}
}
}
@@ -587,6 +566,20 @@ class BuildPlugin implements Plugin {
}
}
+ /**
+ * Add dependencies that we are going to bundle to the compile classpath.
+ */
+ static void configureSourceSets(Project project) {
+ project.plugins.withType(ShadowPlugin).whenPluginAdded {
+ ['main', 'test'].each {name ->
+ SourceSet sourceSet = project.sourceSets.findByName(name)
+ if (sourceSet != null) {
+ sourceSet.compileClasspath += project.configurations.bundle
+ }
+ }
+ }
+ }
+
/** Adds compiler settings to the project */
static void configureCompile(Project project) {
if (project.compilerJavaVersion < JavaVersion.VERSION_1_10) {
@@ -764,9 +757,16 @@ class BuildPlugin implements Plugin {
* better to be safe
*/
mergeServiceFiles()
+ /*
+ * Bundle dependencies of the "bundled" configuration.
+ */
+ configurations = [project.configurations.bundle]
}
// Make sure we assemble the shadow jar
project.tasks.assemble.dependsOn project.tasks.shadowJar
+ project.artifacts {
+ apiElements project.tasks.shadowJar
+ }
}
}
@@ -873,13 +873,8 @@ class BuildPlugin implements Plugin {
exclude '**/*$*.class'
project.plugins.withType(ShadowPlugin).whenPluginAdded {
- /*
- * If we make a shaded jar we test against it.
- */
+ // Test against a shadow jar if we made one
classpath -= project.tasks.compileJava.outputs.files
- classpath -= project.configurations.compile
- classpath -= project.configurations.runtime
- classpath += project.configurations.shadow
classpath += project.tasks.shadowJar.outputs.files
dependsOn project.tasks.shadowJar
}
@@ -905,26 +900,6 @@ class BuildPlugin implements Plugin {
additionalTest.dependsOn(project.tasks.testClasses)
project.check.dependsOn(additionalTest)
});
-
- project.plugins.withType(ShadowPlugin).whenPluginAdded {
- /*
- * We need somewhere to configure dependencies that we don't wish
- * to shade into the jar. The shadow plugin creates a "shadow"
- * configuration which is *almost* exactly that. It is never
- * bundled into the shaded jar but is used for main source
- * compilation. Unfortunately, by default it is not used for
- * *test* source compilation and isn't used in tests at all. This
- * change makes it available for test compilation.
- *
- * Note that this isn't going to work properly with qa projects
- * but they have no business applying the shadow plugin in the
- * firstplace.
- */
- SourceSet testSourceSet = project.sourceSets.findByName('test')
- if (testSourceSet != null) {
- testSourceSet.compileClasspath += project.configurations.shadow
- }
- }
}
private static configurePrecommit(Project project) {
@@ -936,7 +911,7 @@ class BuildPlugin implements Plugin {
it.group.startsWith('org.elasticsearch') == false
} - project.configurations.compileOnly
project.plugins.withType(ShadowPlugin).whenPluginAdded {
- project.dependencyLicenses.dependencies += project.configurations.shadow.fileCollection {
+ project.dependencyLicenses.dependencies += project.configurations.bundle.fileCollection {
it.group.startsWith('org.elasticsearch') == false
}
}
@@ -947,7 +922,7 @@ class BuildPlugin implements Plugin {
deps.runtimeConfiguration = project.configurations.runtime
project.plugins.withType(ShadowPlugin).whenPluginAdded {
deps.runtimeConfiguration = project.configurations.create('infoDeps')
- deps.runtimeConfiguration.extendsFrom(project.configurations.runtime, project.configurations.shadow)
+ deps.runtimeConfiguration.extendsFrom(project.configurations.runtime, project.configurations.bundle)
}
deps.compileOnlyConfiguration = project.configurations.compileOnly
project.afterEvaluate {
diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy
index 5216f084274..a14a3a680da 100644
--- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy
@@ -157,11 +157,10 @@ public class PluginBuildPlugin extends BuildPlugin {
from pluginMetadata // metadata (eg custom security policy)
/*
* If the plugin is using the shadow plugin then we need to bundle
- * "shadow" things rather than the default jar and dependencies so
- * we don't hit jar hell.
+ * that shadow jar.
*/
from { project.plugins.hasPlugin(ShadowPlugin) ? project.shadowJar : project.jar }
- from { project.plugins.hasPlugin(ShadowPlugin) ? project.configurations.shadow : project.configurations.runtime - project.configurations.compileOnly }
+ from project.configurations.runtime - project.configurations.compileOnly
// extra files for the plugin to go into the zip
from('src/main/packaging') // TODO: move all config/bin/_size/etc into packaging
from('src/main') {
diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/JarHellTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/JarHellTask.groovy
index 656d5e0d35a..4299efd95a3 100644
--- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/JarHellTask.groovy
+++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/JarHellTask.groovy
@@ -19,6 +19,7 @@
package org.elasticsearch.gradle.precommit
+import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import org.elasticsearch.gradle.LoggedExec
import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.OutputFile
@@ -39,6 +40,9 @@ public class JarHellTask extends LoggedExec {
public JarHellTask() {
project.afterEvaluate {
FileCollection classpath = project.sourceSets.test.runtimeClasspath
+ if (project.plugins.hasPlugin(ShadowPlugin)) {
+ classpath += project.configurations.bundle
+ }
inputs.files(classpath)
dependsOn(classpath)
description = "Runs CheckJarHell on ${classpath}"
diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy
index d6babbbfbb8..52b13a56644 100644
--- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy
+++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy
@@ -18,6 +18,7 @@
*/
package org.elasticsearch.gradle.precommit;
+import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.BuildListener;
@@ -82,6 +83,11 @@ public class ThirdPartyAuditTask extends AntTask {
configuration = project.configurations.findByName('testCompile')
}
assert configuration != null
+ if (project.plugins.hasPlugin(ShadowPlugin)) {
+ Configuration original = configuration
+ configuration = project.configurations.create('thirdPartyAudit')
+ configuration.extendsFrom(original, project.configurations.bundle)
+ }
if (compileOnly == null) {
classpath = configuration
} else {
diff --git a/client/rest-high-level/build.gradle b/client/rest-high-level/build.gradle
index 6f5eab6e1db..48169faac2f 100644
--- a/client/rest-high-level/build.gradle
+++ b/client/rest-high-level/build.gradle
@@ -47,13 +47,13 @@ dependencies {
* Everything in the "shadow" configuration is *not* copied into the
* shadowJar.
*/
- shadow "org.elasticsearch:elasticsearch:${version}"
- shadow "org.elasticsearch.client:elasticsearch-rest-client:${version}"
- shadow "org.elasticsearch.plugin:parent-join-client:${version}"
- shadow "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
- shadow "org.elasticsearch.plugin:rank-eval-client:${version}"
- shadow "org.elasticsearch.plugin:lang-mustache-client:${version}"
- compile project(':x-pack:protocol')
+ 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}"
+ bundle project(':x-pack:protocol')
testCompile "org.elasticsearch.client:test:${version}"
testCompile "org.elasticsearch.test:framework:${version}"
diff --git a/qa/ccs-unavailable-clusters/build.gradle b/qa/ccs-unavailable-clusters/build.gradle
index d9de422bb43..c1f2bc96271 100644
--- a/qa/ccs-unavailable-clusters/build.gradle
+++ b/qa/ccs-unavailable-clusters/build.gradle
@@ -21,5 +21,5 @@ apply plugin: 'elasticsearch.rest-test'
apply plugin: 'elasticsearch.test-with-dependencies'
dependencies {
- testCompile project(path: ':client:rest-high-level', configuration: 'shadow')
+ testCompile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}"
}
diff --git a/x-pack/docs/build.gradle b/x-pack/docs/build.gradle
index aab84355581..7ef17715e06 100644
--- a/x-pack/docs/build.gradle
+++ b/x-pack/docs/build.gradle
@@ -30,7 +30,8 @@ buildRestTests.expectedUnconvertedCandidates = [
]
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
}
@@ -309,7 +310,7 @@ setups['farequote_datafeed'] = setups['farequote_job'] + '''
"job_id":"farequote",
"indexes":"farequote"
}
-'''
+'''
setups['ml_filter_safe_domains'] = '''
- do:
xpack.ml.put_filter:
diff --git a/x-pack/license-tools/build.gradle b/x-pack/license-tools/build.gradle
index 183b9ab50e0..4bd17713a2f 100644
--- a/x-pack/license-tools/build.gradle
+++ b/x-pack/license-tools/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'elasticsearch.build'
dependencies {
- compile project(path: xpackModule('core'), configuration: 'shadow')
+ compile "org.elasticsearch.plugin:x-pack-core:${version}"
compile "org.elasticsearch:elasticsearch:${version}"
testCompile "org.elasticsearch.test:framework:${version}"
}
diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle
index a3b4bea9702..ef428bdd73d 100644
--- a/x-pack/plugin/core/build.gradle
+++ b/x-pack/plugin/core/build.gradle
@@ -27,19 +27,19 @@ dependencyLicenses {
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
- compile project(':x-pack:protocol')
- shadow "org.apache.httpcomponents:httpclient:${versions.httpclient}"
- shadow "org.apache.httpcomponents:httpcore:${versions.httpcore}"
- shadow "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}"
- shadow "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}"
+ bundle project(':x-pack:protocol')
+ compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
+ compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
+ compile "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}"
+ compile "org.apache.httpcomponents:httpasyncclient:${versions.httpasyncclient}"
- shadow "commons-logging:commons-logging:${versions.commonslogging}"
- shadow "commons-codec:commons-codec:${versions.commonscodec}"
+ compile "commons-logging:commons-logging:${versions.commonslogging}"
+ compile "commons-codec:commons-codec:${versions.commonscodec}"
// security deps
- shadow 'com.unboundid:unboundid-ldapsdk:3.2.0'
- shadow project(path: ':modules:transport-netty4', configuration: 'runtime')
- shadow(project(path: ':plugins:transport-nio', configuration: 'runtime')) {
+ compile 'com.unboundid:unboundid-ldapsdk:3.2.0'
+ compile project(path: ':modules:transport-netty4', configuration: 'runtime')
+ compile(project(path: ':plugins:transport-nio', configuration: 'runtime')) {
// TODO: core exclusion should not be necessary, since it is a transitive dep of all plugins
exclude group: "org.elasticsearch", module: "elasticsearch-core"
}
@@ -122,7 +122,7 @@ task testJar(type: Jar) {
artifacts {
// normal es plugins do not publish the jar but we need to since users need it for Transport Clients and extensions
- archives jar
+ archives shadowJar
testArtifacts testJar
}
diff --git a/x-pack/plugin/deprecation/build.gradle b/x-pack/plugin/deprecation/build.gradle
index 3746287d615..d89eb62e884 100644
--- a/x-pack/plugin/deprecation/build.gradle
+++ b/x-pack/plugin/deprecation/build.gradle
@@ -10,7 +10,7 @@ esplugin {
archivesBaseName = 'x-pack-deprecation'
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ compileOnly "org.elasticsearch.plugin:x-pack-core:${version}"
}
run {
diff --git a/x-pack/plugin/graph/build.gradle b/x-pack/plugin/graph/build.gradle
index 2b0f592b720..069bfa5fbbe 100644
--- a/x-pack/plugin/graph/build.gradle
+++ b/x-pack/plugin/graph/build.gradle
@@ -10,7 +10,8 @@ esplugin {
archivesBaseName = 'x-pack-graph'
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
}
diff --git a/x-pack/plugin/logstash/build.gradle b/x-pack/plugin/logstash/build.gradle
index 2e158a90ac7..1057a1c8526 100644
--- a/x-pack/plugin/logstash/build.gradle
+++ b/x-pack/plugin/logstash/build.gradle
@@ -10,9 +10,9 @@ esplugin {
archivesBaseName = 'x-pack-logstash'
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
-
}
run {
diff --git a/x-pack/plugin/ml/build.gradle b/x-pack/plugin/ml/build.gradle
index 282ce96fa93..7c3594a06cf 100644
--- a/x-pack/plugin/ml/build.gradle
+++ b/x-pack/plugin/ml/build.gradle
@@ -40,7 +40,8 @@ compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
// This should not be here
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
diff --git a/x-pack/plugin/ml/qa/basic-multi-node/build.gradle b/x-pack/plugin/ml/qa/basic-multi-node/build.gradle
index 3df77aadccb..cc5a2cd68dd 100644
--- a/x-pack/plugin/ml/qa/basic-multi-node/build.gradle
+++ b/x-pack/plugin/ml/qa/basic-multi-node/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('ml'), configuration: 'runtime')
}
diff --git a/x-pack/plugin/ml/qa/disabled/build.gradle b/x-pack/plugin/ml/qa/disabled/build.gradle
index e914def3507..a24036651d5 100644
--- a/x-pack/plugin/ml/qa/disabled/build.gradle
+++ b/x-pack/plugin/ml/qa/disabled/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('ml'), configuration: 'runtime')
}
diff --git a/x-pack/plugin/ml/qa/ml-with-security/build.gradle b/x-pack/plugin/ml/qa/ml-with-security/build.gradle
index 84c23add254..a702973fcb0 100644
--- a/x-pack/plugin/ml/qa/ml-with-security/build.gradle
+++ b/x-pack/plugin/ml/qa/ml-with-security/build.gradle
@@ -2,7 +2,8 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
}
diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle
index b1893b20c46..0c4304b123e 100644
--- a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle
+++ b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle
@@ -4,7 +4,8 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
testCompile project(path: xpackModule('ml'), configuration: 'testArtifacts')
diff --git a/x-pack/plugin/ml/qa/no-bootstrap-tests/build.gradle b/x-pack/plugin/ml/qa/no-bootstrap-tests/build.gradle
index 7e252afa302..9eac3fdd37a 100644
--- a/x-pack/plugin/ml/qa/no-bootstrap-tests/build.gradle
+++ b/x-pack/plugin/ml/qa/no-bootstrap-tests/build.gradle
@@ -1,6 +1,6 @@
apply plugin: 'elasticsearch.standalone-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('ml'), configuration: 'runtime')
}
diff --git a/x-pack/plugin/ml/qa/single-node-tests/build.gradle b/x-pack/plugin/ml/qa/single-node-tests/build.gradle
index b62e37894b3..88ca4dd118e 100644
--- a/x-pack/plugin/ml/qa/single-node-tests/build.gradle
+++ b/x-pack/plugin/ml/qa/single-node-tests/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('ml'), configuration: 'runtime')
}
diff --git a/x-pack/plugin/monitoring/build.gradle b/x-pack/plugin/monitoring/build.gradle
index a452ef09a20..e551d577b7b 100644
--- a/x-pack/plugin/monitoring/build.gradle
+++ b/x-pack/plugin/monitoring/build.gradle
@@ -13,7 +13,8 @@ esplugin {
archivesBaseName = 'x-pack-monitoring'
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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
diff --git a/x-pack/plugin/rollup/build.gradle b/x-pack/plugin/rollup/build.gradle
index 649a89bc2cd..75fd22abacc 100644
--- a/x-pack/plugin/rollup/build.gradle
+++ b/x-pack/plugin/rollup/build.gradle
@@ -16,7 +16,8 @@ compileTestJava.options.compilerArgs << "-Xlint:-rawtypes"
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
}
diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle
index 6db533bbecf..003263669d5 100644
--- a/x-pack/plugin/security/build.gradle
+++ b/x-pack/plugin/security/build.gradle
@@ -12,7 +12,8 @@ esplugin {
archivesBaseName = 'x-pack-security'
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
diff --git a/x-pack/plugin/security/cli/build.gradle b/x-pack/plugin/security/cli/build.gradle
index 1a00b2a0340..426c48aac80 100644
--- a/x-pack/plugin/security/cli/build.gradle
+++ b/x-pack/plugin/security/cli/build.gradle
@@ -4,7 +4,8 @@ archivesBaseName = 'elasticsearch-security-cli'
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
compile 'org.bouncycastle:bcprov-jdk15on:1.59'
compile 'org.bouncycastle:bcpkix-jdk15on:1.59'
testImplementation 'com.google.jimfs:jimfs:1.1'
@@ -21,4 +22,4 @@ dependencyLicenses {
if (inFipsJvm) {
test.enabled = false
-}
\ No newline at end of file
+}
diff --git a/x-pack/plugin/sql/build.gradle b/x-pack/plugin/sql/build.gradle
index 039e78c1495..62097e76b97 100644
--- a/x-pack/plugin/sql/build.gradle
+++ b/x-pack/plugin/sql/build.gradle
@@ -19,7 +19,8 @@ archivesBaseName = 'x-pack-sql'
integTest.enabled = false
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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"
diff --git a/x-pack/plugin/upgrade/build.gradle b/x-pack/plugin/upgrade/build.gradle
index f95cde7134c..56ce274dd11 100644
--- a/x-pack/plugin/upgrade/build.gradle
+++ b/x-pack/plugin/upgrade/build.gradle
@@ -14,7 +14,8 @@ esplugin {
archivesBaseName = 'x-pack-upgrade'
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
}
diff --git a/x-pack/plugin/watcher/build.gradle b/x-pack/plugin/watcher/build.gradle
index a0feab67463..3a9d759c46d 100644
--- a/x-pack/plugin/watcher/build.gradle
+++ b/x-pack/plugin/watcher/build.gradle
@@ -25,7 +25,8 @@ dependencyLicenses {
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
diff --git a/x-pack/qa/evil-tests/build.gradle b/x-pack/qa/evil-tests/build.gradle
index 9b6055ffad7..03f2a569873 100644
--- a/x-pack/qa/evil-tests/build.gradle
+++ b/x-pack/qa/evil-tests/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'elasticsearch.standalone-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
}
test {
diff --git a/x-pack/qa/full-cluster-restart/build.gradle b/x-pack/qa/full-cluster-restart/build.gradle
index 3cf29701206..ab8f9172b69 100644
--- a/x-pack/qa/full-cluster-restart/build.gradle
+++ b/x-pack/qa/full-cluster-restart/build.gradle
@@ -11,7 +11,8 @@ apply plugin: 'elasticsearch.build'
test.enabled = false
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')) {
// Need to drop the guava dependency here or we get a conflict with watcher's guava dependency.
// This is total #$%, but the solution is to get the SAML realm (which uses guava) out of security proper
@@ -249,7 +250,8 @@ subprojects {
check.dependsOn(integTest)
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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('watcher'), configuration: 'runtime')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
diff --git a/x-pack/qa/kerberos-tests/build.gradle b/x-pack/qa/kerberos-tests/build.gradle
index 59667d9ee78..f680a45bd7f 100644
--- a/x-pack/qa/kerberos-tests/build.gradle
+++ b/x-pack/qa/kerberos-tests/build.gradle
@@ -7,7 +7,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
}
diff --git a/x-pack/qa/multi-cluster-search-security/build.gradle b/x-pack/qa/multi-cluster-search-security/build.gradle
index 5d90f974762..c06ad68d803 100644
--- a/x-pack/qa/multi-cluster-search-security/build.gradle
+++ b/x-pack/qa/multi-cluster-search-security/build.gradle
@@ -3,7 +3,8 @@ import org.elasticsearch.gradle.test.RestIntegTestTask
apply plugin: 'elasticsearch.standalone-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
}
diff --git a/x-pack/qa/multi-node/build.gradle b/x-pack/qa/multi-node/build.gradle
index 19729cf367e..4369287caba 100644
--- a/x-pack/qa/multi-node/build.gradle
+++ b/x-pack/qa/multi-node/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
}
integTestCluster {
diff --git a/x-pack/qa/openldap-tests/build.gradle b/x-pack/qa/openldap-tests/build.gradle
index 24cd6184afa..bb9a9799289 100644
--- a/x-pack/qa/openldap-tests/build.gradle
+++ b/x-pack/qa/openldap-tests/build.gradle
@@ -5,7 +5,8 @@ apply plugin: 'elasticsearch.standalone-test'
apply plugin: 'elasticsearch.vagrantsupport'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
}
diff --git a/x-pack/qa/reindex-tests-with-security/build.gradle b/x-pack/qa/reindex-tests-with-security/build.gradle
index 097d343b279..97c0e8e17fe 100644
--- a/x-pack/qa/reindex-tests-with-security/build.gradle
+++ b/x-pack/qa/reindex-tests-with-security/build.gradle
@@ -2,7 +2,8 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
testCompile project(path: ':modules:reindex')
diff --git a/x-pack/qa/rolling-upgrade-basic/build.gradle b/x-pack/qa/rolling-upgrade-basic/build.gradle
index 21ac4414d86..5774e5d7856 100644
--- a/x-pack/qa/rolling-upgrade-basic/build.gradle
+++ b/x-pack/qa/rolling-upgrade-basic/build.gradle
@@ -7,7 +7,8 @@ import java.nio.charset.StandardCharsets
apply plugin: 'elasticsearch.standalone-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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') // to be moved in a later commit
}
diff --git a/x-pack/qa/rolling-upgrade/build.gradle b/x-pack/qa/rolling-upgrade/build.gradle
index b983caa8669..548081a8938 100644
--- a/x-pack/qa/rolling-upgrade/build.gradle
+++ b/x-pack/qa/rolling-upgrade/build.gradle
@@ -10,7 +10,8 @@ apply plugin: 'elasticsearch.build'
test.enabled = false
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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') // to be moved in a later commit
}
@@ -284,7 +285,8 @@ subprojects {
check.dependsOn(integTest)
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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('watcher'))
}
diff --git a/x-pack/qa/saml-idp-tests/build.gradle b/x-pack/qa/saml-idp-tests/build.gradle
index 752ec6fb307..9dd5d6d848f 100644
--- a/x-pack/qa/saml-idp-tests/build.gradle
+++ b/x-pack/qa/saml-idp-tests/build.gradle
@@ -6,7 +6,8 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
testCompile 'com.google.jimfs:jimfs:1.1'
diff --git a/x-pack/qa/security-client-tests/build.gradle b/x-pack/qa/security-client-tests/build.gradle
index 97945fb00ef..e676e55a152 100644
--- a/x-pack/qa/security-client-tests/build.gradle
+++ b/x-pack/qa/security-client-tests/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime')
}
diff --git a/x-pack/qa/security-example-spi-extension/build.gradle b/x-pack/qa/security-example-spi-extension/build.gradle
index 7aeed3ad62d..aef4fc33f6a 100644
--- a/x-pack/qa/security-example-spi-extension/build.gradle
+++ b/x-pack/qa/security-example-spi-extension/build.gradle
@@ -8,7 +8,7 @@ esplugin {
}
dependencies {
- compileOnly project(path: xpackModule('core'), configuration: 'shadow')
+ compileOnly "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime')
}
diff --git a/x-pack/qa/security-migrate-tests/build.gradle b/x-pack/qa/security-migrate-tests/build.gradle
index 3a8a0cf1005..abc3564ca13 100644
--- a/x-pack/qa/security-migrate-tests/build.gradle
+++ b/x-pack/qa/security-migrate-tests/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('security'), configuration: 'runtime')
testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime')
}
diff --git a/x-pack/qa/security-setup-password-tests/build.gradle b/x-pack/qa/security-setup-password-tests/build.gradle
index adb159acf6f..c0801a38b57 100644
--- a/x-pack/qa/security-setup-password-tests/build.gradle
+++ b/x-pack/qa/security-setup-password-tests/build.gradle
@@ -2,7 +2,8 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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')
}
diff --git a/x-pack/qa/smoke-test-graph-with-security/build.gradle b/x-pack/qa/smoke-test-graph-with-security/build.gradle
index 9cdfaffccfb..f0f819b46d4 100644
--- a/x-pack/qa/smoke-test-graph-with-security/build.gradle
+++ b/x-pack/qa/smoke-test-graph-with-security/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
}
// bring in graph rest test suite
diff --git a/x-pack/qa/smoke-test-monitoring-with-watcher/build.gradle b/x-pack/qa/smoke-test-monitoring-with-watcher/build.gradle
index 8ce0cde7657..7813ff3d3d5 100644
--- a/x-pack/qa/smoke-test-monitoring-with-watcher/build.gradle
+++ b/x-pack/qa/smoke-test-monitoring-with-watcher/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('watcher'))
testCompile project(path: xpackModule('monitoring'))
}
diff --git a/x-pack/qa/smoke-test-plugins-ssl/build.gradle b/x-pack/qa/smoke-test-plugins-ssl/build.gradle
index 53533bd9b87..4f338d07fb5 100644
--- a/x-pack/qa/smoke-test-plugins-ssl/build.gradle
+++ b/x-pack/qa/smoke-test-plugins-ssl/build.gradle
@@ -15,7 +15,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
}
String outputDir = "${buildDir}/generated-resources/${project.name}"
@@ -138,4 +138,4 @@ processTestResources {
inputs.properties(expansions)
MavenFilteringHack.filter(it, expansions)
}
-}
\ No newline at end of file
+}
diff --git a/x-pack/qa/smoke-test-plugins/build.gradle b/x-pack/qa/smoke-test-plugins/build.gradle
index b66903af18b..3b7661eeeb0 100644
--- a/x-pack/qa/smoke-test-plugins/build.gradle
+++ b/x-pack/qa/smoke-test-plugins/build.gradle
@@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
}
ext.pluginsCount = 0
diff --git a/x-pack/qa/smoke-test-security-with-mustache/build.gradle b/x-pack/qa/smoke-test-security-with-mustache/build.gradle
index d921c5f5b66..48b525ba3da 100644
--- a/x-pack/qa/smoke-test-security-with-mustache/build.gradle
+++ b/x-pack/qa/smoke-test-security-with-mustache/build.gradle
@@ -2,7 +2,8 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ // "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: ':modules:lang-mustache', configuration: 'runtime')
}
diff --git a/x-pack/qa/smoke-test-watcher-with-security/build.gradle b/x-pack/qa/smoke-test-watcher-with-security/build.gradle
index a843641be80..50e217b28b2 100644
--- a/x-pack/qa/smoke-test-watcher-with-security/build.gradle
+++ b/x-pack/qa/smoke-test-watcher-with-security/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
}
// bring in watcher rest test suite
diff --git a/x-pack/qa/smoke-test-watcher/build.gradle b/x-pack/qa/smoke-test-watcher/build.gradle
index dc87248df61..5923afcacad 100644
--- a/x-pack/qa/smoke-test-watcher/build.gradle
+++ b/x-pack/qa/smoke-test-watcher/build.gradle
@@ -7,7 +7,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('watcher'), configuration: 'runtime')
testCompile project(path: ':modules:lang-mustache', configuration: 'runtime')
testCompile project(path: ':modules:lang-painless', configuration: 'runtime')
diff --git a/x-pack/qa/sql/security/build.gradle b/x-pack/qa/sql/security/build.gradle
index f02886f80a1..15f7734f942 100644
--- a/x-pack/qa/sql/security/build.gradle
+++ b/x-pack/qa/sql/security/build.gradle
@@ -1,5 +1,5 @@
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
}
Project mainProject = project
@@ -20,7 +20,7 @@ subprojects {
}
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
}
integTestCluster {
diff --git a/x-pack/qa/third-party/hipchat/build.gradle b/x-pack/qa/third-party/hipchat/build.gradle
index 03b6c319698..2b2ee7fcbbf 100644
--- a/x-pack/qa/third-party/hipchat/build.gradle
+++ b/x-pack/qa/third-party/hipchat/build.gradle
@@ -4,7 +4,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('watcher'), configuration: 'runtime')
}
diff --git a/x-pack/qa/third-party/jira/build.gradle b/x-pack/qa/third-party/jira/build.gradle
index 3814c8e9a53..283f9688699 100644
--- a/x-pack/qa/third-party/jira/build.gradle
+++ b/x-pack/qa/third-party/jira/build.gradle
@@ -7,7 +7,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('watcher'), configuration: 'runtime')
}
diff --git a/x-pack/qa/third-party/pagerduty/build.gradle b/x-pack/qa/third-party/pagerduty/build.gradle
index c0f337e160e..12758989d0f 100644
--- a/x-pack/qa/third-party/pagerduty/build.gradle
+++ b/x-pack/qa/third-party/pagerduty/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('watcher'), configuration: 'runtime')
}
diff --git a/x-pack/qa/third-party/slack/build.gradle b/x-pack/qa/third-party/slack/build.gradle
index 431752765f3..f1bcd98cff6 100644
--- a/x-pack/qa/third-party/slack/build.gradle
+++ b/x-pack/qa/third-party/slack/build.gradle
@@ -5,7 +5,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackModule('watcher'), configuration: 'runtime')
}
diff --git a/x-pack/qa/transport-client-tests/build.gradle b/x-pack/qa/transport-client-tests/build.gradle
index a94ad8fd592..3ece6dd1147 100644
--- a/x-pack/qa/transport-client-tests/build.gradle
+++ b/x-pack/qa/transport-client-tests/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
dependencies {
- testCompile project(path: xpackModule('core'), configuration: 'shadow')
+ testCompile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime')
}
diff --git a/x-pack/test/feature-aware/build.gradle b/x-pack/test/feature-aware/build.gradle
index f6a1f6cb16f..11b0e67183c 100644
--- a/x-pack/test/feature-aware/build.gradle
+++ b/x-pack/test/feature-aware/build.gradle
@@ -3,7 +3,7 @@ apply plugin: 'elasticsearch.build'
dependencies {
compile 'org.ow2.asm:asm:6.2'
compile "org.elasticsearch:elasticsearch:${version}"
- compile project(path: xpackModule('core'), configuration: 'shadow')
+ compile "org.elasticsearch.plugin:x-pack-core:${version}"
testCompile "org.elasticsearch.test:framework:${version}"
}
diff --git a/x-pack/transport-client/build.gradle b/x-pack/transport-client/build.gradle
index 7155dad5ee6..2e350ef98ff 100644
--- a/x-pack/transport-client/build.gradle
+++ b/x-pack/transport-client/build.gradle
@@ -10,7 +10,7 @@ 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 project(path: xpackModule('core'), configuration: 'shadow')
+ compile "org.elasticsearch.plugin:x-pack-core:${version}"
compile "org.elasticsearch.client:transport:${version}"
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"