* This commit changes two things: * Pom.xml --> ES- Restclient version to 7.17.5 from 7.9.2 * ElasticSearchPlugin.java ---> changed the testDatasource method to expect a 200 instead of a 200 or 404 HTTP status code This commit fixes a high-priority bug with github issue https://github.com/appsmithorg/appsmith/issues/14909 * it can now negotiate around a 403 forbidden error as it does try to send head only to user provided URI This commit has been tested: * manually for CRUD at local with ES version 7.9.2 * manually for CR at user provide aws instance running 7.9.3 on docker * | | BugFix: | | This commit changes two files: | | * ElasticSearchPlugin.java --> added feature to distinguish between unauthorized and not found datasources. | * ElasticSearchPluginTest.java ---> added testcases to verify the unauthorized and not found test cases | | This commit adds features on top of previous commit https://github.com/appsmithorg/appsmith/issues/14909 | * this commit adds the feature of more readable error messages while testing the elasticsearch datasource. i.e wrong endpoint errors and unauthorized issues | | This commit has been tested: | * Junit | * manually * removed leftover comments from the parent commit and updated response texts for better readability * removed wildcard imports from appsmith-plugins/elasticSearchPlugin/src/test/java/com/external/plugins/ElasticSearchPluginTest.java
98 lines
3.8 KiB
XML
98 lines
3.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<parent>
|
|
<groupId>com.appsmith</groupId>
|
|
<artifactId>appsmith-plugins</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>com.external.plugins</groupId>
|
|
<artifactId>elasticSearchPlugin</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
|
|
<name>elasticSearchPlugin</name>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<java.version>11</java.version>
|
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
|
<plugin.id>elasticsearch-plugin</plugin.id>
|
|
<plugin.class>com.external.plugins.ElasticSearchPlugin</plugin.class>
|
|
<plugin.version>1.0-SNAPSHOT</plugin.version>
|
|
<plugin.provider>tech@appsmith.com</plugin.provider>
|
|
<plugin.dependencies/>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
<groupId>org.elasticsearch.client</groupId>
|
|
<artifactId>elasticsearch-rest-client</artifactId>
|
|
<version>7.17.5</version>
|
|
</dependency>
|
|
|
|
<!-- Test Dependencies -->
|
|
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>elasticsearch</artifactId>
|
|
<version>1.17.1</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<version>3.2.4</version>
|
|
<executions>
|
|
<execution>
|
|
<id>shade-plugin-jar</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>shade</goal>
|
|
</goals>
|
|
<configuration>
|
|
<minimizeJar>false</minimizeJar>
|
|
<transformers>
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
<manifestEntries>
|
|
<Plugin-Id>${plugin.id}</Plugin-Id>
|
|
<Plugin-Class>${plugin.class}</Plugin-Class>
|
|
<Plugin-Version>${plugin.version}</Plugin-Version>
|
|
<Plugin-Provider>${plugin.provider}</Plugin-Provider>
|
|
</manifestEntries>
|
|
</transformer>
|
|
</transformers>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-dependencies</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>copy-dependencies</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includeScope>runtime</includeScope>
|
|
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|