Skip to content

Commit 46a3aba

Browse files
committed
Merge branch 'master' into index-lifecycle
2 parents c5d31e3 + ea09667 commit 46a3aba

File tree

145 files changed

+795
-2095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+795
-2095
lines changed

TESTING.asciidoc

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,46 @@ run it using Gradle:
2525
./gradlew run
2626
-------------------------------------
2727

28+
==== Launching and debugging from an IDE
29+
30+
If you want to run Elasticsearch from your IDE, the `./gradlew run` task
31+
supports a remote debugging option:
32+
33+
---------------------------------------------------------------------------
34+
./gradlew run --debug-jvm
35+
---------------------------------------------------------------------------
36+
37+
==== Distribution
38+
39+
By default a node is started with the zip distribution.
40+
In order to start with a different distribution use the `-Drun.distribution` argument.
41+
42+
To for example start the open source distribution:
43+
44+
-------------------------------------
45+
./gradlew run -Drun.distribution=oss-zip
46+
-------------------------------------
47+
48+
==== License type
49+
50+
By default a node is started with the `basic` license type.
51+
In order to start with a different license type use the `-Drun.license_type` argument.
52+
53+
In order to start a node with a trial license execute the following command:
54+
55+
-------------------------------------
56+
./gradlew run -Drun.license_type=trial
57+
-------------------------------------
58+
59+
This enables security and other paid features and adds a superuser with the username: `elastic-admin` and
60+
password: `elastic-password`.
61+
62+
==== Other useful arguments
63+
64+
In order to start a node with a different max heap space add: `-Dtests.heap.size=4G`
65+
In order to disable annotations add: `-Dtests.asserts=false`
66+
In order to set an Elasticsearch setting, provide a setting with the following prefix: `-Dtests.es.`
67+
2868
=== Test case filtering.
2969

3070
- `tests.class` is a class-filtering shell-like glob pattern,
@@ -572,15 +612,6 @@ as its build system. Since the switch to Gradle though, this is no longer possib
572612
the code currently used to build Elasticsearch does not allow JaCoCo to recognize its tests.
573613
For more information on this, see the discussion in https://github.com/elastic/elasticsearch/issues/28867[issue #28867].
574614

575-
== Launching and debugging from an IDE
576-
577-
If you want to run Elasticsearch from your IDE, the `./gradlew run` task
578-
supports a remote debugging option:
579-
580-
---------------------------------------------------------------------------
581-
./gradlew run --debug-jvm
582-
---------------------------------------------------------------------------
583-
584615
== Debugging remotely from an IDE
585616

586617
If you want to run Elasticsearch and be able to remotely attach the process

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/MetaPluginBuildPlugin.groovy

Lines changed: 0 additions & 106 deletions
This file was deleted.

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/MetaPluginPropertiesExtension.groovy

Lines changed: 0 additions & 46 deletions
This file was deleted.

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/MetaPluginPropertiesTask.groovy

Lines changed: 0 additions & 68 deletions
This file was deleted.

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import org.elasticsearch.gradle.BuildPlugin
2424
import org.elasticsearch.gradle.LoggedExec
2525
import org.elasticsearch.gradle.Version
2626
import org.elasticsearch.gradle.VersionProperties
27-
import org.elasticsearch.gradle.plugin.MetaPluginBuildPlugin
27+
2828
import org.elasticsearch.gradle.plugin.PluginBuildPlugin
2929
import org.elasticsearch.gradle.plugin.PluginPropertiesExtension
3030
import org.gradle.api.AntBuilder
@@ -842,19 +842,15 @@ class ClusterFormationTasks {
842842
}
843843

844844
static void verifyProjectHasBuildPlugin(String name, Version version, Project project, Project pluginProject) {
845-
if (pluginProject.plugins.hasPlugin(PluginBuildPlugin) == false && pluginProject.plugins.hasPlugin(MetaPluginBuildPlugin) == false) {
845+
if (pluginProject.plugins.hasPlugin(PluginBuildPlugin) == false) {
846846
throw new GradleException("Task [${name}] cannot add plugin [${pluginProject.path}] with version [${version}] to project's " +
847-
"[${project.path}] dependencies: the plugin is not an esplugin or es_meta_plugin")
847+
"[${project.path}] dependencies: the plugin is not an esplugin")
848848
}
849849
}
850850

851-
/** Find the plugin name in the given project, whether a regular plugin or meta plugin. */
851+
/** Find the plugin name in the given project. */
852852
static String findPluginName(Project pluginProject) {
853853
PluginPropertiesExtension extension = pluginProject.extensions.findByName('esplugin')
854-
if (extension != null) {
855-
return extension.name
856-
} else {
857-
return pluginProject.extensions.findByName('es_meta_plugin').name
858-
}
854+
return extension.name
859855
}
860856
}

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import org.elasticsearch.gradle.BuildPlugin
2424
import org.gradle.api.Plugin
2525
import org.gradle.api.Project
2626
import org.gradle.api.plugins.JavaBasePlugin
27+
import org.gradle.api.tasks.compile.JavaCompile
2728

2829
/**
2930
* Configures the build to compile against Elasticsearch's test framework and
@@ -49,5 +50,12 @@ public class StandaloneTestPlugin implements Plugin<Project> {
4950
test.testClassesDir project.sourceSets.test.output.classesDir
5051
test.mustRunAfter(project.precommit)
5152
project.check.dependsOn(test)
53+
54+
project.tasks.withType(JavaCompile) {
55+
// This will be the default in Gradle 5.0
56+
if (options.compilerArgs.contains("-processor") == false) {
57+
options.compilerArgs << '-proc:none'
58+
}
59+
}
5260
}
5361
}

buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.es-meta-plugin.properties

Lines changed: 0 additions & 20 deletions
This file was deleted.

buildSrc/src/main/resources/meta-plugin-descriptor.properties

Lines changed: 0 additions & 20 deletions
This file was deleted.

buildSrc/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
elasticsearch = 7.0.0-alpha1
2-
lucene = 7.4.0-snapshot-6705632810
2+
lucene = 7.4.0-snapshot-59f2b7aec2
33

44
# optional dependencies
55
spatial4j = 0.7

0 commit comments

Comments
 (0)