Elasticsearch.esplugin: Replace/Change/Disable integTestCluster#wait Task

For another project with gradle, I used something like:

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
    }

    dependencies {
        classpath "org.elasticsearch.gradle:build-tools:6.0.0"
    }
}

apply plugin: 'java'
apply plugin: 'elasticsearch.esplugin'
apply plugin: 'idea'
apply plugin: 'maven'

// this is temporal and will be fixed in 6.0
ext.projectSubstitutions = [:]

// license of this project
licenseFile = rootProject.file('LICENSE.txt')
// copyright notices
noticeFile = rootProject.file('NOTICE.txt')

esplugin {
    // license of the plugin, may be different than the above license
    licenseFile rootProject.file('LICENSE.txt')
    // copyright notices, may be different than the above notice
    noticeFile rootProject.file('NOTICE.txt')
    name 'foo'
    description 'foo'
    classname 'fr.pilato.elasticsearch.plugin.foo.FooPlugin'
}

repositories {
    mavenLocal()
    mavenCentral()
    jcenter()
}

// In this section you declare the dependencies for your production and test code
// Elasticsearch dependency is included due to the build-tools, test-framework as well
dependencies {
    testCompile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.0.0'
}

integTestCluster {
    setting 'foo.whatever.setting',     'bar'
}

thirdPartyAudit.excludes = [
        // classes are missing
        'javax.servlet.ServletConfig',
        'javax.servlet.ServletContext',
        'javax.servlet.ServletContextEvent',
        //... Skipped for clarity
]

artifacts {
    archives javadocJar, sourcesJar
}

I hope this could help. (May be)... :slight_smile:

Note that I'm using 6.0 here.

2 Likes