Move maven-failsafe-plugin to asterixdb top level

Also improved logging for AsterixLifecycleIT

Change-Id: I605a9e55a3504dd9942dbdcbc7468ffda90d8a93
Reviewed-on: https://asterix-gerrit.ics.uci.edu/914
Reviewed-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterixdb/asterix-installer/pom.xml b/asterixdb/asterix-installer/pom.xml
index da93e65..01f5ed7 100644
--- a/asterixdb/asterix-installer/pom.xml
+++ b/asterixdb/asterix-installer/pom.xml
@@ -26,10 +26,6 @@
   <artifactId>asterix-installer</artifactId>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <failsafe.test.excludes>**/DmlRecoveryIT.java</failsafe.test.excludes>
-    <cluster.test.excludes>**/AsterixClusterLifeCycleIT.java</cluster.test.excludes>
-    <cluster.extest.excludes>**/ClusterExecutionIT.java</cluster.extest.excludes>
-    <replication.test.excludes>**/ReplicationIT.java</replication.test.excludes>
     <appendedResourcesDirectory>${basedir}/src/main/appended-resources</appendedResourcesDirectory>
   </properties>
 
@@ -115,30 +111,6 @@
         </executions>
       </plugin>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <version>2.6</version>
-        <configuration>
-          <runOrder>alphabetical</runOrder>
-          <forkMode>pertest</forkMode>
-          <argLine>${coverageArgLine}</argLine>
-          <excludes>
-            <exclude>${failsafe.test.excludes}</exclude>
-            <exclude>${cluster.test.excludes}</exclude>
-            <exclude>${cluster.extest.excludes}</exclude>
-            <exclude>${replication.test.excludes}</exclude>
-          </excludes>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>integration-test</goal>
-              <goal>verify</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <artifactId>maven-resources-plugin</artifactId>
         <executions>
           <execution>
diff --git a/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java b/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java
index 1c5f582..302275d 100644
--- a/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java
+++ b/asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AsterixLifecycleIT.java
@@ -79,6 +79,7 @@
     @Test
     public void test_1_StopActiveInstance() throws Exception {
         try {
+            LOGGER.info("Starting test: test_1_StopActiveInstance");
             AsterixInstallerIntegrationUtil.transformIntoRequiredState(State.ACTIVE);
             String command = "stop -n " + AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME;
             cmdHandler.processCommand(command.split(" "));
@@ -86,7 +87,7 @@
                     .getAsterixInstance(AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME);
             AsterixRuntimeState state = VerificationUtil.getAsterixRuntimeState(instance);
             assert (state.getFailedNCs().size() == NUM_NC && !state.isCcRunning());
-            LOGGER.info("Test stop active instance PASSED");
+            LOGGER.info("PASSED: test_1_StopActiveInstance");
         } catch (Exception e) {
             throw new Exception("Test configure installer " + "\" FAILED!", e);
         }
@@ -95,6 +96,7 @@
     @Test
     public void test_2_StartActiveInstance() throws Exception {
         try {
+            LOGGER.info("Starting test: test_2_StartActiveInstance");
             AsterixInstallerIntegrationUtil.transformIntoRequiredState(State.INACTIVE);
             String command = "start -n " + AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME;
             cmdHandler.processCommand(command.split(" "));
@@ -102,7 +104,7 @@
                     .getAsterixInstance(AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME);
             AsterixRuntimeState state = VerificationUtil.getAsterixRuntimeState(instance);
             assert (state.getFailedNCs().size() == 0 && state.isCcRunning());
-            LOGGER.info("Test start active instance PASSED");
+            LOGGER.info("PASSED: test_2_StartActiveInstance");
         } catch (Exception e) {
             throw new Exception("Test configure installer " + "\" FAILED!", e);
         }
@@ -111,13 +113,14 @@
     @Test
     public void test_3_DeleteActiveInstance() throws Exception {
         try {
+            LOGGER.info("Starting test: test_3_DeleteActiveInstance");
             AsterixInstallerIntegrationUtil.transformIntoRequiredState(State.INACTIVE);
             String command = "delete -n " + AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME;
             cmdHandler.processCommand(command.split(" "));
             AsterixInstance instance = ServiceProvider.INSTANCE.getLookupService()
                     .getAsterixInstance(AsterixInstallerIntegrationUtil.ASTERIX_INSTANCE_NAME);
             assert (instance == null);
-            LOGGER.info("Test delete active instance PASSED");
+            LOGGER.info("PASSED: test_3_DeleteActiveInstance");
         } catch (Exception e) {
             throw new Exception("Test delete active instance " + "\" FAILED!", e);
         } finally {
diff --git a/asterixdb/asterix-yarn/pom.xml b/asterixdb/asterix-yarn/pom.xml
index d2f24b1..8d5ece5 100644
--- a/asterixdb/asterix-yarn/pom.xml
+++ b/asterixdb/asterix-yarn/pom.xml
@@ -86,28 +86,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <version>2.6</version>
-        <configuration>
-          <runOrder>alphabetical</runOrder>
-          <forkMode>pertest</forkMode>
-          <excludes>
-          </excludes>
-          <environmentVariables>
-            <JAVA_HOME>${java.home}</JAVA_HOME>
-          </environmentVariables>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>integration-test</goal>
-              <goal>verify</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
 
diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml
index 7f5c612..6f1ddd5 100644
--- a/asterixdb/pom.xml
+++ b/asterixdb/pom.xml
@@ -56,6 +56,12 @@
     <invalid.tests>**/DmlTest.java</invalid.tests>
     <global.test.includes>**/*TestSuite.java,**/*Test.java,${execution.tests}</global.test.includes>
     <global.test.excludes>${optimizer.tests},${metadata.tests},${invalid.tests},${repeated.tests}</global.test.excludes>
+
+    <failsafe.test.excludes>**/DmlRecoveryIT.java</failsafe.test.excludes>
+    <cluster.test.excludes>**/AsterixClusterLifeCycleIT.java</cluster.test.excludes>
+    <cluster.extest.excludes>**/ClusterExecutionIT.java</cluster.extest.excludes>
+    <replication.test.excludes>**/ReplicationIT.java</replication.test.excludes>
+
     <!-- Versions under dependencymanagement or used in many projects via properties -->
     <algebricks.version>0.2.18-SNAPSHOT</algebricks.version>
     <hyracks.version>0.2.18-SNAPSHOT</hyracks.version>
@@ -98,6 +104,30 @@
         </configuration>
       </plugin>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>2.6</version>
+        <configuration>
+          <runOrder>alphabetical</runOrder>
+          <forkMode>pertest</forkMode>
+          <argLine>${coverageArgLine}</argLine>
+          <excludes>
+            <exclude>${failsafe.test.excludes}</exclude>
+            <exclude>${cluster.test.excludes}</exclude>
+            <exclude>${cluster.extest.excludes}</exclude>
+            <exclude>${replication.test.excludes}</exclude>
+          </excludes>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>integration-test</goal>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
         <version>0.11</version>