Skip to content

Commit

Permalink
Fix references to moved classes in plugin examples (#80736) (#80740)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
mark-vieira and elasticmachine authored Nov 15, 2021
1 parent 0724109 commit 3e22fe0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ private static void configureDependencies(final Project project) {
DependencyHandler dependencies = project.getDependencies();
dependencies.add("compileOnly", "org.elasticsearch:elasticsearch:" + VersionProperties.getElasticsearch());
dependencies.add("testImplementation", "org.elasticsearch.test:framework:" + VersionProperties.getElasticsearch());
dependencies.add("testImplementation", "org.apache.logging.log4j:log4j-core:" + VersionProperties.getVersions().get("log4j"));

// we "upgrade" these optional deps to provided for plugins, since they will run
// with a full elasticsearch server that includes optional deps
Expand Down
2 changes: 1 addition & 1 deletion plugins/examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ subprojects {
targetCompatibility = 8

repositories {
if (gradle.includedBuilds == false) {
if (!gradle.includedBuilds) {
// Only necessary when building plugins against SNAPSHOT versions of Elasticsearch
maven {
url = 'https://snapshots.elastic.co/maven/'
Expand Down
2 changes: 1 addition & 1 deletion plugins/examples/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.support.PlainActionFuture;
import org.elasticsearch.cluster.metadata.IndexAbstraction;
import org.elasticsearch.cluster.metadata.IndexAbstraction.Index;
import org.elasticsearch.cluster.metadata.IndexAbstraction.ConcreteIndex;
import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.ESTestCase;
Expand Down Expand Up @@ -120,11 +120,11 @@ public void testAuthorizeClusterAction() {
public void testAuthorizeIndexAction() {
CustomAuthorizationEngine engine = new CustomAuthorizationEngine();
Map<String, IndexAbstraction> indicesMap = new HashMap<>();
indicesMap.put("index", new Index(IndexMetadata.builder("index")
indicesMap.put("index", new ConcreteIndex(IndexMetadata.builder("index")
.settings(Settings.builder().put("index.version.created", Version.CURRENT))
.numberOfShards(1)
.numberOfReplicas(0)
.build()));
.build(), null));
// authorized
{
RequestInfo requestInfo =
Expand Down
2 changes: 1 addition & 1 deletion plugins/examples/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rootDir.listFiles().findAll { it.directory && new File(it, 'build.gradle').exist
gradle.rootProject {
ext {
// Fetch Elasticsearch version from outer build
if (gradle.includedBuilds) {
if (!gradle.includedBuilds) {
new File(rootDir.parentFile.parentFile, 'build-tools-internal/version.properties').withInputStream { is ->
def props = new Properties()
props.load(is)
Expand Down

0 comments on commit 3e22fe0

Please sign in to comment.