Skip to content

Commit f80363e

Browse files
committed
Merge branch 'compile-with-jdk-9' into mrjar
* compile-with-jdk-9: (56 commits) TEST: init unassigned gcp in testAcquireIndexCommit Replica start peer recovery with safe commit (elastic#28181) Truncate tlog cli should assign global checkpoint (elastic#28192) Fix lock accounting in releasable lock Add ability to associate an ID with tasks (elastic#27764) [DOCS] Removed differencies between text and code (elastic#27993) text fixes (elastic#28136) Update getting-started.asciidoc (elastic#28145) [Docs] Spelling fix in painless-getting-started.asciidoc (elastic#28187) Fixed the cat.health REST test to accept 4ms, not just 4.0ms (elastic#28186) Do not keep 5.x commits once having 6.x commits (elastic#28188) Rename core module to server (elastic#28180) upgraded jna from 4.4.0-1 to 4.5.1 (elastic#28183) [TEST] Do not call RandomizedTest.scaledRandomIntBetween from multiple threads Primary send safe commit in file-based recovery (elastic#28038) [Docs] Correct response json in rank-eval.asciidoc Add scroll parameter to _reindex API (elastic#28041) Include all sentences smaller than fragment_size in the unified highlighter (elastic#28132) Modifies the JavaAPI docs related to AggregationBuilder [Docs] Improvements in script-fields.asciidoc (elastic#28174) ...
2 parents 351eabe + f3a76a7 commit f80363e

File tree

4,726 files changed

+4484
-2220
lines changed

Some content is hidden

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

4,726 files changed

+4484
-2220
lines changed

.projectile

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

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ configure(subprojects.findAll { it.projectDir.toPath().startsWith(rootPath) }) {
7979
* backwards compatibility guarantees and only keeping the latest beta or rc
8080
* in a branch if there are only betas and rcs in the branch so we have
8181
* *something* to test against. */
82-
VersionCollection versions = new VersionCollection(file('core/src/main/java/org/elasticsearch/Version.java').readLines('UTF-8'))
82+
VersionCollection versions = new VersionCollection(file('server/src/main/java/org/elasticsearch/Version.java').readLines('UTF-8'))
8383
if (versions.currentVersion.toString() != VersionProperties.elasticsearch) {
8484
throw new GradleException("The last version in Versions.java [${versions.currentVersion}] does not match " +
8585
"VersionProperties.elasticsearch [${VersionProperties.elasticsearch}]")
@@ -181,8 +181,8 @@ subprojects {
181181
ext.projectSubstitutions = [
182182
"org.elasticsearch.gradle:build-tools:${version}": ':build-tools',
183183
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
184-
"org.elasticsearch:elasticsearch:${version}": ':core',
185-
"org.elasticsearch:elasticsearch-cli:${version}": ':core:cli',
184+
"org.elasticsearch:elasticsearch:${version}": ':server',
185+
"org.elasticsearch:elasticsearch-cli:${version}": ':server:cli',
186186
"org.elasticsearch:elasticsearch-nio:${version}": ':libs:elasticsearch-nio',
187187
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
188188
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
@@ -227,7 +227,7 @@ subprojects {
227227

228228
// Handle javadoc dependencies across projects. Order matters: the linksOffline for
229229
// org.elasticsearch:elasticsearch must be the last one or all the links for the
230-
// other packages (e.g org.elasticsearch.client) will point to core rather than
230+
// other packages (e.g org.elasticsearch.client) will point to server rather than
231231
// their own artifacts.
232232
if (project.plugins.hasPlugin(BuildPlugin)) {
233233
String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
@@ -255,7 +255,7 @@ subprojects {
255255
gradle.projectsEvaluated {
256256
allprojects {
257257
if (project.path == ':test:framework') {
258-
// :test:framework:test cannot run before and after :core:test
258+
// :test:framework:test cannot run before and after :server:test
259259
return
260260
}
261261
configurations.all {

buildSrc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ dependencies {
9696
compile 'com.perforce:p4java:2012.3.551082' // THIS IS SUPPOSED TO BE OPTIONAL IN THE FUTURE....
9797
compile 'de.thetaphi:forbiddenapis:2.4.1'
9898
compile 'org.apache.rat:apache-rat:0.11'
99-
compile "org.elasticsearch:jna:4.4.0-1"
99+
compile "org.elasticsearch:jna:4.5.1"
100100
}
101101

102102
// Gradle 2.14+ removed ProgressLogger(-Factory) classes from the public APIs

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import org.gradle.api.Project
3232
import org.gradle.api.Task
3333
import org.gradle.api.XmlProvider
3434
import org.gradle.api.artifacts.Configuration
35+
import org.gradle.api.artifacts.Dependency
3536
import org.gradle.api.artifacts.ModuleDependency
3637
import org.gradle.api.artifacts.ModuleVersionIdentifier
3738
import org.gradle.api.artifacts.ProjectDependency
@@ -282,8 +283,9 @@ class BuildPlugin implements Plugin<Project> {
282283
})
283284

284285
// force all dependencies added directly to compile/testCompile to be non-transitive, except for ES itself
285-
Closure disableTransitiveDeps = { ModuleDependency dep ->
286-
if (!(dep instanceof ProjectDependency) && dep.group.startsWith('org.elasticsearch') == false) {
286+
Closure disableTransitiveDeps = { Dependency dep ->
287+
if (dep instanceof ModuleDependency && !(dep instanceof ProjectDependency)
288+
&& dep.group.startsWith('org.elasticsearch') == false) {
287289
dep.transitive = false
288290

289291
// also create a configuration just for this dependency version, so that later
@@ -433,7 +435,9 @@ class BuildPlugin implements Plugin<Project> {
433435
if (targetCompatibilityVersion == JavaVersion.VERSION_1_8) {
434436
// compile with compact 3 profile by default
435437
// NOTE: this is just a compile time check: does not replace testing with a compact3 JRE
436-
options.compilerArgs << '-profile' << 'compact3'
438+
if (project.compactProfile != 'full') {
439+
options.compilerArgs << '-profile' << project.compactProfile
440+
}
437441
}
438442
/*
439443
* -path because gradle will send in paths that don't always exist.

buildSrc/src/main/groovy/org/elasticsearch/gradle/DependenciesInfoTask.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class DependenciesInfoTask extends DefaultTask {
8888
* <u>
8989
* <li><em>UNKNOWN</em> if LICENSE file is not present for this dependency.</li>
9090
* <li><em>one SPDX identifier</em> if the LICENSE content matches with an SPDX license.</li>
91-
* <li><em>Custom:URL</em> if it's not an SPDX license,
91+
* <li><em>Custom;URL</em> if it's not an SPDX license,
9292
* URL is the Github URL to the LICENSE file in elasticsearch repository.</li>
9393
* </ul>
9494
*
@@ -116,7 +116,7 @@ public class DependenciesInfoTask extends DefaultTask {
116116
// As we have the license file, we create a Custom entry with the URL to this license file.
117117
final gitBranch = System.getProperty('build.branch', 'master')
118118
final String githubBaseURL = "https://raw.githubusercontent.com/elastic/elasticsearch/${gitBranch}/"
119-
return "Custom:${license.getCanonicalPath().replaceFirst('.*/elasticsearch/', githubBaseURL)}"
119+
return "Custom;${license.getCanonicalPath().replaceFirst('.*/elasticsearch/', githubBaseURL)}"
120120
}
121121
return spdx
122122
} else {
@@ -156,10 +156,10 @@ public class DependenciesInfoTask extends DefaultTask {
156156
spdx = 'LGPL-3.0'
157157
break
158158
case ~/.*${CDDL_1_0}.*/:
159-
spdx = 'CDDL_1_0'
159+
spdx = 'CDDL-1.0'
160160
break
161161
case ~/.*${CDDL_1_1}.*/:
162-
spdx = 'CDDL_1_1'
162+
spdx = 'CDDL-1.1'
163163
break
164164
case ~/.*${ICU}.*/:
165165
spdx = 'ICU'

buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class PrecommitTasks {
8484
Task mainForbidden = project.tasks.findByName('forbiddenApisMain')
8585
if (mainForbidden != null) {
8686
mainForbidden.configure {
87-
signaturesURLs += getClass().getResource('/forbidden/es-core-signatures.txt')
87+
signaturesURLs += getClass().getResource('/forbidden/es-server-signatures.txt')
8888
}
8989
}
9090
Task testForbidden = project.tasks.findByName('forbiddenApisTest')

buildSrc/src/main/groovy/org/elasticsearch/gradle/vagrant/VagrantTestPlugin.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.elasticsearch.gradle.vagrant
22

33
import com.carrotsearch.gradle.junit4.RandomizedTestingPlugin
4+
import org.apache.tools.ant.taskdefs.condition.Os
45
import org.elasticsearch.gradle.FileContentsTask
56
import org.gradle.api.*
67
import org.gradle.api.artifacts.dsl.RepositoryHandler
@@ -343,8 +344,9 @@ class VagrantTestPlugin implements Plugin<Project> {
343344
TaskExecutionAdapter packagingReproListener = new TaskExecutionAdapter() {
344345
@Override
345346
void afterExecute(Task task, TaskState state) {
347+
final String gradlew = Os.isFamily(Os.FAMILY_WINDOWS) ? "gradlew" : "./gradlew"
346348
if (state.failure != null) {
347-
println "REPRODUCE WITH: ./gradlew ${packaging.path} " +
349+
println "REPRODUCE WITH: ${gradlew} ${packaging.path} " +
348350
"-Dtests.seed=${project.testSeed} "
349351
}
350352
}

0 commit comments

Comments
 (0)