diff --git a/api/build.gradle b/api/build.gradle index 02e43a4..61be444 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -7,7 +7,7 @@ dependencies { exclude group: 'org.elasticsearch.plugin', module: 'percolator-client' exclude group: 'org.elasticsearch.plugin', module: 'lang-mustache-client' } - // we try to override the Elasticsearch netty by our netty version which might be more recent + // we try to override the Elasticsearch netty by our netty version which is more recent compile "io.netty:netty-buffer:${rootProject.property('netty.version')}" compile "io.netty:netty-codec-http:${rootProject.property('netty.version')}" compile "io.netty:netty-handler:${rootProject.property('netty.version')}" diff --git a/build.gradle b/build.gradle index 4a6e6c8..49dfe7d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,27 @@ +import java.time.ZonedDateTime +import java.time.format.DateTimeFormatter + +buildscript { + repositories { + jcenter() + maven { + url 'http://xbib.org/repository' + } + } + dependencies { + classpath "org.xbib.elasticsearch:gradle-plugin-elasticsearch-build:6.3.2.4" + } +} plugins { id "org.sonarqube" version "2.6.1" id "io.codearte.nexus-staging" version "0.11.0" - id "org.xbib.gradle.plugin.asciidoctor" version "1.6.0.0" + id "org.xbib.gradle.plugin.asciidoctor" version "1.6.0.1" } -printf "Host: %s\nOS: %s %s %s\nJVM: %s %s %s %s\nGroovy: %s\nGradle: %s\n" + +printf "Date: %s\nHost: %s\nOS: %s %s %s\nJava: %s %s %s %s\nGradle: %s Groovy: %s Java: %s\n" + "Build: group: ${project.group} name: ${project.name} version: ${project.version}\n", + ZonedDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME), InetAddress.getLocalHost(), System.getProperty("os.name"), System.getProperty("os.arch"), @@ -15,19 +30,25 @@ printf "Host: %s\nOS: %s %s %s\nJVM: %s %s %s %s\nGroovy: %s\nGradle: %s\n" + System.getProperty("java.vm.version"), System.getProperty("java.vm.vendor"), System.getProperty("java.vm.name"), - GroovySystem.getVersion(), - gradle.gradleVersion + gradle.gradleVersion, GroovySystem.getVersion(), JavaVersion.current() + apply plugin: "io.codearte.nexus-staging" +apply plugin: 'org.xbib.gradle.plugin.asciidoctor' + +ext { + user = 'jprante' + name = 'elx' + description = 'Elasticsearch extensions' + scmUrl = 'https://github.com/' + user + '/' + name + scmConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git' + scmDeveloperConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git' +} subprojects { apply plugin: 'java' apply plugin: 'maven' apply plugin: 'signing' - //apply plugin: 'findbugs' - //apply plugin: 'pmd' - //apply plugin: 'checkstyle' - apply plugin: 'org.xbib.gradle.plugin.asciidoctor' configurations { wagon @@ -36,36 +57,24 @@ subprojects { } dependencies { - //testCompile "junit:junit:${project.property('junit.version')}" - //testCompile "org.apache.logging.log4j:log4j-core:${project.property('log4j.version')}" alpnagent "org.mortbay.jetty.alpn:jetty-alpn-agent:${project.property('alpnagent.version')}" asciidoclet "org.xbib:asciidoclet:${project.property('asciidoclet.version')}" wagon "org.apache.maven.wagon:wagon-ssh:${project.property('wagon.version')}" } - sourceCompatibility = JavaVersion.VERSION_1_9 - targetCompatibility = JavaVersion.VERSION_1_8 - [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' - tasks.withType(JavaCompile) { - options.compilerArgs << "-proc:none" << "-Xlint:all,-rawtypes,-unchecked,-try" << "--release" << "8" //<< "-profile" << "compact3" + compileJava { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + compileTestJava { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } jar { baseName "${rootProject.name}-${project.name}" } - asciidoctor { - attributes toc: 'left', - doctype: 'book', - icons: 'font', - encoding: 'utf-8', - sectlink: true, - sectanchors: true, - linkattrs: true, - imagesdir: 'img', - 'source-highlighter': 'coderay' - } - javadoc { options.docletpath = configurations.asciidoclet.files.asType(List) options.doclet = 'org.xbib.asciidoclet.Asciidoclet' @@ -108,6 +117,18 @@ subprojects { } +/*asciidoctor { + attributes toc: 'left', + doctype: 'book', + icons: 'font', + encoding: 'utf-8', + sectlink: true, + sectanchors: true, + linkattrs: true, + imagesdir: 'img', + 'source-highlighter': 'coderay' +}*/ + /* task aggregatedJavadoc(type: Javadoc) { group = 'aggregation' diff --git a/common/build.gradle b/common/build.gradle index 8638f17..7e0f3cb 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -6,7 +6,7 @@ buildscript { } } dependencies { - classpath "org.xbib.elasticsearch:gradle-plugin-elasticsearch-build:6.2.2.0" + classpath "org.xbib.elasticsearch:gradle-plugin-elasticsearch-build:6.3.2.4" } } @@ -21,18 +21,20 @@ dependencies { compile project(':api') compile "org.xbib:metrics:${project.property('xbib-metrics.version')}" compileOnly "org.apache.logging.log4j:log4j-api:${project.property('log4j.version')}" - testCompile "org.xbib.elasticsearch:elasticsearch-test-framework:${project.property('xbib-elasticsearch-test.version')}" - testRuntime "org.xbib.elasticsearch:elasticsearch-test-framework:${project.property('xbib-elasticsearch-test.version')}" + testCompile "org.xbib.elasticsearch:elasticsearch-test-framework:${project.property('elasticsearch-devkit.version')}" + testRuntime "org.xbib.elasticsearch:elasticsearch-test-framework:${project.property('elasticsearch-devkit.version')}" } jar { baseName "${rootProject.name}-common" } +/* task testJar(type: Jar, dependsOn: testClasses) { baseName = "${project.archivesBaseName}-tests" from sourceSets.test.output } +*/ artifacts { main jar @@ -56,7 +58,7 @@ randomizedTest { esTest { // test with the jars, not the classes, for security manager - classpath = files(configurations.testRuntime) + configurations.main.artifacts.files + configurations.tests.artifacts.files + // classpath = files(configurations.testRuntime) + configurations.main.artifacts.files + configurations.tests.artifacts.files systemProperty 'tests.security.manager', 'true' } esTest.dependsOn jar, testJar diff --git a/gradle.properties b/gradle.properties index f75801d..24bd424 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,28 +1,30 @@ -org.gradle.daemon=false -org.gradle.warning.mode=all - group = org.xbib.elasticsearch -name = elasticsearch-client-netty -version = 6.2.2.0 +name = elasticsearch-client +version = 6.3.2.0 +profile = default +release = 0 -elasticsearch.version = 6.2.2 -netty.version = 4.1.24.Final -tcnative.version = 2.0.7.Final +elasticsearch.version = 6.3.2 +lucene.version = 7.3.1 + +netty.version = 4.1.29.Final +tcnative.version = 2.0.15.Final alpnagent.version = 2.0.7 -#xbib-netty-http-client.version = 4.1.16.1 -xbib-netty-http-client.version = 4.1.24.0 +xbib-netty-http-client.version = 4.1.29.0 xbib-metrics.version = 1.1.0 # elasticsearch build plugin -xbib-elasticsearch-test.version = 6.2.2.0 -lucene.version = 7.2.1 -spatial4j.version = 0.6 -jts.version = 1.13 -jna.version = 4.5.1 +elasticsearch-libs.version = 6.3.2.1 +elasticsearch-devkit.version = 6.3.2.4 +spatial4j.version = 0.7 +jts.version = 1.15.1 +jna.version = 4.5.2 +log4j.version = 2.11.1 +checkstyle.version = 8.13 # test -log4j.version = 2.9.1 junit.version = 4.12 wagon.version = 3.0.0 asciidoclet.version = 1.6.0.0 +org.gradle.warning.mode=all diff --git a/gradle/ext.gradle b/gradle/ext.gradle index 2318dcd..e69de29 100644 --- a/gradle/ext.gradle +++ b/gradle/ext.gradle @@ -1,8 +0,0 @@ -ext { - user = 'xbib' - name = 'elasticsearch-java-client' - description = 'Netty Java client for Elasticsearch' - scmUrl = 'https://github.com/' + user + '/' + name - scmConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git' - scmDeveloperConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git' -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 91ca28c..87b738c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c2bee35..6b3851a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri May 04 14:40:54 CEST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip diff --git a/gradlew b/gradlew index cccdd3d..af6708f 100755 --- a/gradlew +++ b/gradlew @@ -28,7 +28,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index e95643d..0f8d593 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/http/build.gradle b/http/build.gradle index 0481477..f5d73a1 100644 --- a/http/build.gradle +++ b/http/build.gradle @@ -6,7 +6,7 @@ buildscript { } } dependencies { - classpath "org.xbib.elasticsearch:gradle-plugin-elasticsearch-build:6.2.2.0" + classpath "org.xbib.elasticsearch:gradle-plugin-elasticsearch-build:6.3.2.4" } } @@ -20,18 +20,20 @@ configurations { dependencies { compile project(':common') compile "org.xbib:netty-http-client:${project.property('xbib-netty-http-client.version')}" - testCompile "org.xbib.elasticsearch:elasticsearch-test-framework:${project.property('xbib-elasticsearch-test.version')}" - testRuntime "org.xbib.elasticsearch:elasticsearch-test-framework:${project.property('xbib-elasticsearch-test.version')}" + testCompile "org.xbib.elasticsearch:elasticsearch-test-framework:${project.property('elasticsearch-devkit.version')}" + testRuntime "org.xbib.elasticsearch:elasticsearch-test-framework:${project.property('elasticsearch-devkit.version')}" } jar { baseName "${rootProject.name}-common" } +/* task testJar(type: Jar, dependsOn: testClasses) { baseName = "${project.archivesBaseName}-tests" from sourceSets.test.output } +*/ artifacts { main jar @@ -55,7 +57,7 @@ randomizedTest { esTest { enabled = true // test with the jars, not the classes, for security manager - classpath = files(configurations.testRuntime) + configurations.main.artifacts.files + configurations.tests.artifacts.files + // classpath = files(configurations.testRuntime) + configurations.main.artifacts.files + configurations.tests.artifacts.files systemProperty 'tests.security.manager', 'true' // maybe we like some extra security policy for our code systemProperty 'tests.security.policy', '/extra-security.policy' diff --git a/http/src/main/java/org/elasticsearch/action/admin/cluster/node/info/HttpNodesInfoAction.java b/http/src/main/java/org/elasticsearch/action/admin/cluster/node/info/HttpNodesInfoAction.java index bb725cc..e50358b 100644 --- a/http/src/main/java/org/elasticsearch/action/admin/cluster/node/info/HttpNodesInfoAction.java +++ b/http/src/main/java/org/elasticsearch/action/admin/cluster/node/info/HttpNodesInfoAction.java @@ -119,7 +119,10 @@ public class HttpNodesInfoAction extends HttpAction attributes = Collections.emptyMap(); Set roles = new HashSet<>(); Version version = Version.fromString((String) map2.get("version")); diff --git a/http/src/main/java/org/elasticsearch/action/admin/cluster/settings/HttpClusterUpdateSettingsAction.java b/http/src/main/java/org/elasticsearch/action/admin/cluster/settings/HttpClusterUpdateSettingsAction.java index 971e1c7..b66675c 100644 --- a/http/src/main/java/org/elasticsearch/action/admin/cluster/settings/HttpClusterUpdateSettingsAction.java +++ b/http/src/main/java/org/elasticsearch/action/admin/cluster/settings/HttpClusterUpdateSettingsAction.java @@ -1,6 +1,7 @@ package org.elasticsearch.action.admin.cluster.settings; import org.elasticsearch.common.CheckedFunction; +import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; @@ -32,7 +33,7 @@ public class HttpClusterUpdateSettingsAction extends HttpAction