From 6d14ff4ee51c72239c4b4dcb7381adf4d8a685c3 Mon Sep 17 00:00:00 2001 From: Jason Tedor <jason@tedor.me> Date: Wed, 9 Aug 2017 14:33:44 +0900 Subject: [PATCH] Elasticsearch 5: Only activate plugin on JDK 8 This commit sets the Elasticsearch 5 binding to only use the elasticsearch-maven-plugin if tests are running on JDK 8. --- elasticsearch5/pom.xml | 58 ++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/elasticsearch5/pom.xml b/elasticsearch5/pom.xml index 0370be1f..b537566f 100644 --- a/elasticsearch5/pom.xml +++ b/elasticsearch5/pom.xml @@ -64,33 +64,6 @@ LICENSE file. </execution> </executions> </plugin> - <plugin> - <groupId>com.github.alexcojocaru</groupId> - <artifactId>elasticsearch-maven-plugin</artifactId> - <version>5.9</version> - <configuration> - <version>${elasticsearch5-version}</version> - <clusterName>test</clusterName> - <httpPort>9200</httpPort> - <transportPort>9300</transportPort> - </configuration> - <executions> - <execution> - <id>start-elasticsearch</id> - <phase>pre-integration-test</phase> - <goals> - <goal>runforked</goal> - </goals> - </execution> - <execution> - <id>stop-elasticsearch</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - </execution> - </executions> - </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -213,6 +186,37 @@ LICENSE file. <activation> <jdk>1.8</jdk> </activation> + <build> + <plugins> + <plugin> + <groupId>com.github.alexcojocaru</groupId> + <artifactId>elasticsearch-maven-plugin</artifactId> + <version>5.9</version> + <configuration> + <version>${elasticsearch5-version}</version> + <clusterName>test</clusterName> + <httpPort>9200</httpPort> + <transportPort>9300</transportPort> + </configuration> + <executions> + <execution> + <id>start-elasticsearch</id> + <phase>pre-integration-test</phase> + <goals> + <goal>runforked</goal> + </goals> + </execution> + <execution> + <id>stop-elasticsearch</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> <properties> <skipTests>false</skipTests> </properties> -- GitLab