Skip to content

Commit

Permalink
Switch from elasticearch-maven-plugin to docker-maven-plugin to start…
Browse files Browse the repository at this point in the history
… Elasticsearch for ITs
  • Loading branch information
yrodiere committed Aug 25, 2020
1 parent c3c9fde commit ad9c118
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 803 deletions.
14 changes: 4 additions & 10 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

<properties>
<!-- Maven plugin versions -->
<elasticsearch-maven-plugin.version>6.15</elasticsearch-maven-plugin.version>
<elasticsearch-server.version>7.8.0</elasticsearch-server.version>
<scala-maven-plugin.version>4.1.1</scala-maven-plugin.version>

<!-- These properties are needed in order for them to be resolvable by the generated projects -->
Expand Down Expand Up @@ -75,6 +73,10 @@
<!-- Antlr is used by the PanacheQL parser-->
<antlr.version>4.7.2</antlr.version>

<!-- Defaults for integration tests -->
<elasticsearch-server.version>7.8.0</elasticsearch-server.version>
<elasticsearch.image>docker.elastic.co/elasticsearch/elasticsearch-oss:${elasticsearch-server.version}</elasticsearch.image>

<!-- Align various dependencies that are not really part of the bom-->
<findbugs.version>3.0.2</findbugs.version>
<jsoup.version>1.11.3</jsoup.version>
Expand Down Expand Up @@ -484,14 +486,6 @@
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
<groupId>com.github.alexcojocaru</groupId>
<artifactId>elasticsearch-maven-plugin</artifactId>
<version>${elasticsearch-maven-plugin.version}</version>
<configuration>
<version>${elasticsearch-server.version}</version>
</configuration>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
Expand Down
43 changes: 34 additions & 9 deletions integration-tests/elasticsearch-rest-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,49 @@
</configuration>
</plugin>
<plugin>
<groupId>com.github.alexcojocaru</groupId>
<artifactId>elasticsearch-maven-plugin</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<timeout>90</timeout>
<pathConf>${project.build.directory}/test-classes/elasticsearch-maven-plugin/configuration/</pathConf>
<autoCreateIndex>true</autoCreateIndex>
<images>
<image>
<name>${elasticsearch.image}</name>
<alias>elasticsearch</alias>
<run>
<env>
<discovery.type>single-node</discovery.type>
</env>
<ports>
<port>9200:9200</port>
</ports>
<log>
<prefix>Elasticsearch: </prefix>
<date>default</date>
<color>cyan</color>
</log>
<wait>
<http>
<url>http://localhost:9200</url>
<method>GET</method>
<status>200</status>
</http>
<time>60000</time>
</wait>
</run>
</image>
</images>
<allContainers>true</allContainers>
</configuration>
<!-- Different executions from 2.x: the "start" goal has been renamed in version 5 -->
<executions>
<execution>
<id>start-elasticsearch</id>
<id>docker-start</id>
<phase>process-test-classes</phase>
<goals>
<goal>runforked</goal>
<goal>stop</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-elasticsearch</id>
<id>docker-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ad9c118

Please sign in to comment.