Merge branch 'trinity' into ionic

Ext-ref: MB-58891

Change-Id: I434dab3104e08401c4b139ac960812e68190e725
diff --git a/asterixdb/asterix-active/pom.xml b/asterixdb/asterix-active/pom.xml
index 15abe14..b425c42 100644
--- a/asterixdb/asterix-active/pom.xml
+++ b/asterixdb/asterix-active/pom.xml
@@ -27,6 +27,17 @@
   <properties>
     <root.dir>${basedir}/..</root.dir>
   </properties>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.asterix</groupId>
diff --git a/asterixdb/asterix-algebra/pom.xml b/asterixdb/asterix-algebra/pom.xml
index 1db7c77..4a50f0b 100644
--- a/asterixdb/asterix-algebra/pom.xml
+++ b/asterixdb/asterix-algebra/pom.xml
@@ -101,6 +101,13 @@
             </lifecycleMappingMetadata>
           </configuration>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <failIfNoTests>false</failIfNoTests>
+          </configuration>
+        </plugin>
       </plugins>
     </pluginManagement>
   </build>
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
index 978997c..3cc1ffd 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
@@ -2028,6 +2028,7 @@
             case IF_EXPRESSION:
             case CASE_EXPRESSION:
             case WINDOW_EXPRESSION:
+            case LIST_SLICE_EXPRESSION:
                 return true;
             case QUANTIFIED_EXPRESSION:
                 return ((QuantifiedExpression) expr).getQuantifier() == Quantifier.SOME_AND_EVERY;
diff --git a/asterixdb/asterix-app/pom.xml b/asterixdb/asterix-app/pom.xml
index 35344ab..4e85de0 100644
--- a/asterixdb/asterix-app/pom.xml
+++ b/asterixdb/asterix-app/pom.xml
@@ -420,6 +420,14 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
@@ -502,14 +510,35 @@
         </itest.includes>
         <failIfNoTests>false</failIfNoTests>
       </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <failIfNoTests>false</failIfNoTests>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
     <profile>
       <id>asterix-gerrit-asterix-app-sql-rqg</id>
       <properties>
         <test.includes>**/*RQGTest.java, **/*RQJTest.java</test.includes>
         <itest.includes>**/SqlppRQG*IT.java</itest.includes>
-        <failIfNoTests>false</failIfNoTests>
       </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <failIfNoTests>false</failIfNoTests>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
     <profile>
       <id>asterix-gerrit-ssl-compression</id>
@@ -518,8 +547,18 @@
           **/SqlppExecutionColumnTest.java,**/*Ssl*Test.java
         </test.includes>
         <itest.excludes>**/*.java</itest.excludes>
-        <failIfNoTests>false</failIfNoTests>
       </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <configuration>
+              <failIfNoTests>false</failIfNoTests>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
     <profile>
       <id>asterix-gerrit-verify-asterix-app</id>
@@ -530,14 +569,42 @@
         <itest.excludes>**/External*IT.java,**/SqlppExecution*IT.java,**/RebalanceWithCancellationIT.java,**/SqlppRQG*IT.java</itest.excludes>
         <failIfNoTests>false</failIfNoTests>
       </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <failIfNoTests>false</failIfNoTests>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <configuration>
+              <failIfNoTests>false</failIfNoTests>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
     <profile>
       <id>asterix-gerrit-rebalance-cancellation</id>
       <properties>
         <test.excludes>**/*.java</test.excludes>
         <itest.includes>**/RebalanceWithCancellationIT.java</itest.includes>
-        <failIfNoTests>false</failIfNoTests>
       </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <failIfNoTests>false</failIfNoTests>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
     <profile>
       <id>asterix-gerrit-cloud-tests</id>
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/query-ASTERIXDB-3562.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/query-ASTERIXDB-3562.sqlpp
new file mode 100644
index 0000000..61b8a13
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/query-ASTERIXDB-3562.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description: This test case is to verify the fix for ASTERIXDB-3562
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
+use test;
+create type dt1 as {id: int};
+create dataset collection1(dt1) PRIMARY KEY id;
+
+// NOTE: this plan is needed to contain 2 consecutive subplan operators since that triggers the bug.
+use test;
+SELECT array1[0:1] AS f_1, array1[0:2] AS f_2 FROM collection1;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/query-ASTERIXDB-3562.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/query-ASTERIXDB-3562.plan
new file mode 100644
index 0000000..7f87524
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/query-ASTERIXDB-3562.plan
@@ -0,0 +1,18 @@
+distribute result [$$18]
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  exchange
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    assign [$$18] <- [{"f_1": array-slice($$19, 0, 1), "f_2": array-slice($$19, 0, 2)}] project: [$$18]
+    -- ASSIGN  |PARTITIONED|
+      assign [$$19] <- [$$collection1.getField("array1")] project: [$$19]
+      -- ASSIGN  |PARTITIONED|
+        project ([$$collection1])
+        -- STREAM_PROJECT  |PARTITIONED|
+          exchange
+          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+            data-scan []<-[$$20, $$collection1] <- test.collection1
+            -- DATASOURCE_SCAN  |PARTITIONED|
+              exchange
+              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                empty-tuple-source
+                -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
index cb0845c..55e8fdf 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
@@ -2,33 +2,17 @@
 -- DISTRIBUTE_RESULT  |PARTITIONED|
   exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-    assign [$$18] <- [{"f_1": $$15, "f_2": $$17}] project: [$$18] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+    assign [$$18] <- [{"f_1": array-slice($$19, 0, 1), "f_2": array-slice($$19, 0, 2)}] project: [$$18] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
     -- ASSIGN  |PARTITIONED|
-      project ([$$15, $$17]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-      -- STREAM_PROJECT  |PARTITIONED|
-        subplan {
-                  assign [$$17] <- [array-slice($$20, 0, 2)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                  -- ASSIGN  |LOCAL|
-                    nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- NESTED_TUPLE_SOURCE  |LOCAL|
-               } [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-        -- SUBPLAN  |PARTITIONED|
-          subplan {
-                    assign [$$15] <- [array-slice($$20, 0, 1)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- ASSIGN  |LOCAL|
-                      nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                      -- NESTED_TUPLE_SOURCE  |LOCAL|
-                 } [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-          -- SUBPLAN  |PARTITIONED|
-            assign [$$20] <- [$$collection1.getField("array1")] project: [$$20] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-            -- ASSIGN  |PARTITIONED|
-              project ([$$collection1]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-              -- STREAM_PROJECT  |PARTITIONED|
-                exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                  data-scan []<-[$$19, $$collection1] <- test.collection1 [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                  -- DATASOURCE_SCAN  |PARTITIONED|
-                    exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                      empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file
+      assign [$$19] <- [$$collection1.getField("array1")] project: [$$19] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+      -- ASSIGN  |PARTITIONED|
+        project ([$$collection1]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+        -- STREAM_PROJECT  |PARTITIONED|
+          exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+            data-scan []<-[$$20, $$collection1] <- test.collection1 [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+            -- DATASOURCE_SCAN  |PARTITIONED|
+              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
index 75967bc..d541b5d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
@@ -2,33 +2,17 @@
 -- DISTRIBUTE_RESULT  |PARTITIONED|
   exchange [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-    assign [$$18] <- [{"f_1": $$15, "f_2": $$17}] project: [$$18] [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
+    assign [$$18] <- [{"f_1": array-slice($$19, 0, 1), "f_2": array-slice($$19, 0, 2)}] project: [$$18] [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
     -- ASSIGN  |PARTITIONED|
-      project ([$$15, $$17]) [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
-      -- STREAM_PROJECT  |PARTITIONED|
-        subplan {
-                  assign [$$17] <- [array-slice($$20, 0, 2)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                  -- ASSIGN  |LOCAL|
-                    nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- NESTED_TUPLE_SOURCE  |LOCAL|
-               } [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
-        -- SUBPLAN  |PARTITIONED|
-          subplan {
-                    assign [$$15] <- [array-slice($$20, 0, 1)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- ASSIGN  |LOCAL|
-                      nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                      -- NESTED_TUPLE_SOURCE  |LOCAL|
-                 } [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
-          -- SUBPLAN  |PARTITIONED|
-            assign [$$20] <- [$$collection1.getField("array1")] project: [$$20] [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
-            -- ASSIGN  |PARTITIONED|
-              project ([$$collection1]) [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
-              -- STREAM_PROJECT  |PARTITIONED|
-                exchange [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
-                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                  data-scan []<-[$$19, $$collection1] <- test.collection1 [cardinality: 1.0, op-cost: 1.0, total-cost: 1.0]
-                  -- DATASOURCE_SCAN  |PARTITIONED|
-                    exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                      empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file
+      assign [$$19] <- [$$collection1.getField("array1")] project: [$$19] [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
+      -- ASSIGN  |PARTITIONED|
+        project ([$$collection1]) [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
+        -- STREAM_PROJECT  |PARTITIONED|
+          exchange [cardinality: 1.0, op-cost: 0.0, total-cost: 1.0]
+          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+            data-scan []<-[$$20, $$collection1] <- test.collection1 [cardinality: 1.0, op-cost: 1.0, total-cost: 1.0]
+            -- DATASOURCE_SCAN  |PARTITIONED|
+              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_column/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_column/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
index b2ca6f6..8d0a4f8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_column/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_column/misc/query-ASTERIXDB-3562/query-ASTERIXDB-3562.4.plan
@@ -2,33 +2,17 @@
 -- DISTRIBUTE_RESULT  |PARTITIONED|
   exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-    assign [$$18] <- [{"f_1": $$15, "f_2": $$17}] project: [$$18] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+    assign [$$18] <- [{"f_1": array-slice($$19, 0, 1), "f_2": array-slice($$19, 0, 2)}] project: [$$18] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
     -- ASSIGN  |PARTITIONED|
-      project ([$$15, $$17]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-      -- STREAM_PROJECT  |PARTITIONED|
-        subplan {
-                  assign [$$17] <- [array-slice($$20, 0, 2)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                  -- ASSIGN  |LOCAL|
-                    nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- NESTED_TUPLE_SOURCE  |LOCAL|
-               } [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-        -- SUBPLAN  |PARTITIONED|
-          subplan {
-                    assign [$$15] <- [array-slice($$20, 0, 1)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- ASSIGN  |LOCAL|
-                      nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                      -- NESTED_TUPLE_SOURCE  |LOCAL|
-                 } [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-          -- SUBPLAN  |PARTITIONED|
-            assign [$$20] <- [$$collection1.getField("array1")] project: [$$20] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-            -- ASSIGN  |PARTITIONED|
-              project ([$$collection1]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-              -- STREAM_PROJECT  |PARTITIONED|
-                exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                  data-scan []<-[$$19, $$collection1] <- test.collection1 project ({array1:any}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                  -- DATASOURCE_SCAN  |PARTITIONED|
-                    exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                      empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
-                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file
+      assign [$$19] <- [$$collection1.getField("array1")] project: [$$19] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+      -- ASSIGN  |PARTITIONED|
+        project ([$$collection1]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+        -- STREAM_PROJECT  |PARTITIONED|
+          exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+            data-scan []<-[$$20, $$collection1] <- test.collection1 project ({array1:any}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+            -- DATASOURCE_SCAN  |PARTITIONED|
+              exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+                -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
diff --git a/asterixdb/asterix-benchmark/pom.xml b/asterixdb/asterix-benchmark/pom.xml
index 58593b8..7cd61de 100644
--- a/asterixdb/asterix-benchmark/pom.xml
+++ b/asterixdb/asterix-benchmark/pom.xml
@@ -48,6 +48,13 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/asterixdb/asterix-client-helper/pom.xml b/asterixdb/asterix-client-helper/pom.xml
index 7753412..a991446 100644
--- a/asterixdb/asterix-client-helper/pom.xml
+++ b/asterixdb/asterix-client-helper/pom.xml
@@ -134,6 +134,13 @@
           </usedDependencies>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
diff --git a/asterixdb/asterix-common/pom.xml b/asterixdb/asterix-common/pom.xml
index 31246bd..576bcfb 100644
--- a/asterixdb/asterix-common/pom.xml
+++ b/asterixdb/asterix-common/pom.xml
@@ -68,6 +68,14 @@
           </ignoredUnusedDeclaredDependencies>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
   <dependencies>
diff --git a/asterixdb/asterix-dashboard/pom.xml b/asterixdb/asterix-dashboard/pom.xml
index 48db242..f73653f 100644
--- a/asterixdb/asterix-dashboard/pom.xml
+++ b/asterixdb/asterix-dashboard/pom.xml
@@ -202,6 +202,13 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/asterixdb/asterix-doc/pom.xml b/asterixdb/asterix-doc/pom.xml
index ba6603b..006e5f7 100644
--- a/asterixdb/asterix-doc/pom.xml
+++ b/asterixdb/asterix-doc/pom.xml
@@ -131,6 +131,13 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <profiles>
diff --git a/asterixdb/asterix-external-data/pom.xml b/asterixdb/asterix-external-data/pom.xml
index 300e723..ecacbd9 100644
--- a/asterixdb/asterix-external-data/pom.xml
+++ b/asterixdb/asterix-external-data/pom.xml
@@ -156,6 +156,14 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
diff --git a/asterixdb/asterix-fuzzyjoin/pom.xml b/asterixdb/asterix-fuzzyjoin/pom.xml
index 916bc0c..36549f1 100644
--- a/asterixdb/asterix-fuzzyjoin/pom.xml
+++ b/asterixdb/asterix-fuzzyjoin/pom.xml
@@ -69,6 +69,10 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/asterixdb/asterix-geo/pom.xml b/asterixdb/asterix-geo/pom.xml
index 7568d5d..f2784ce 100644
--- a/asterixdb/asterix-geo/pom.xml
+++ b/asterixdb/asterix-geo/pom.xml
@@ -69,6 +69,13 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/asterixdb/asterix-lang-common/pom.xml b/asterixdb/asterix-lang-common/pom.xml
index ef947c5..d9811fd 100644
--- a/asterixdb/asterix-lang-common/pom.xml
+++ b/asterixdb/asterix-lang-common/pom.xml
@@ -59,6 +59,13 @@
           </execution>
         </executions>
       </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <failIfNoTests>false</failIfNoTests>
+          </configuration>
+        </plugin>
     </plugins>
   </build>
 
diff --git a/asterixdb/asterix-lang-sqlpp/pom.xml b/asterixdb/asterix-lang-sqlpp/pom.xml
index 69e643c..1733f00 100644
--- a/asterixdb/asterix-lang-sqlpp/pom.xml
+++ b/asterixdb/asterix-lang-sqlpp/pom.xml
@@ -79,6 +79,14 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
diff --git a/asterixdb/asterix-license/pom.xml b/asterixdb/asterix-license/pom.xml
index d7ce5fd..6cdc043 100644
--- a/asterixdb/asterix-license/pom.xml
+++ b/asterixdb/asterix-license/pom.xml
@@ -93,6 +93,13 @@
           </templateProperties>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
diff --git a/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml
index 1d468a6..2216e8b 100644
--- a/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml
+++ b/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/pom.xml
@@ -114,6 +114,14 @@
           </usedDependencies>
         </configuration>
       </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+        </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
diff --git a/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml
index c3dd8b7..f30f03b 100644
--- a/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml
+++ b/asterixdb/asterix-maven-plugins/asterix-test-datagenerator-maven-plugin/pom.xml
@@ -33,6 +33,18 @@
     <root.dir>${basedir}/../..</root.dir>
   </properties>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
diff --git a/asterixdb/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
index bc0ef80..d4b3358 100644
--- a/asterixdb/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
+++ b/asterixdb/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
@@ -31,6 +31,18 @@
   <properties>
     <root.dir>${basedir}/../..</root.dir>
   </properties>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
diff --git a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml
index 8ac7fa1..2a841d5 100644
--- a/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml
+++ b/asterixdb/asterix-maven-plugins/record-manager-generator-maven-plugin/pom.xml
@@ -28,6 +28,18 @@
   <packaging>maven-plugin</packaging>
   <name>record-manager-generator-maven-plugin</name>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <properties>
     <root.dir>${basedir}/../..</root.dir>
   </properties>
diff --git a/asterixdb/asterix-metadata/pom.xml b/asterixdb/asterix-metadata/pom.xml
index dfce4a8..c060009 100644
--- a/asterixdb/asterix-metadata/pom.xml
+++ b/asterixdb/asterix-metadata/pom.xml
@@ -36,6 +36,18 @@
       <comments>A business-friendly OSS license</comments>
     </license>
   </licenses>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.asterix</groupId>
diff --git a/asterixdb/asterix-om/pom.xml b/asterixdb/asterix-om/pom.xml
index 9eccb86..2f52cc14 100644
--- a/asterixdb/asterix-om/pom.xml
+++ b/asterixdb/asterix-om/pom.xml
@@ -43,19 +43,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-          <configuration>
-            <parallel>all</parallel>
-            <forkCount>4</forkCount>
-            <reuseForks>false</reuseForks>
-            <threadCount>1</threadCount>
-            <argLine>
-              -enableassertions -Xmx${test.heap.size}m
-              -Dfile.encoding=UTF-8
-              -DrunSlowAQLTests=${runSlowAQLTests}
-              -Xdebug
-              ${coverageArgLine}
-            </argLine>
-          </configuration>
       </plugin>
     </plugins>
   </build>
diff --git a/asterixdb/asterix-podman/pom.xml b/asterixdb/asterix-podman/pom.xml
index d8d6650..cdd5447 100644
--- a/asterixdb/asterix-podman/pom.xml
+++ b/asterixdb/asterix-podman/pom.xml
@@ -86,6 +86,17 @@
                    </excludes>
                </configuration>
            </plugin>
+           <plugin>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-surefire-plugin</artifactId>
+               <configuration>
+                   <failIfNoTests>false</failIfNoTests>
+               </configuration>
+           </plugin>
+           <plugin>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-failsafe-plugin</artifactId>
+           </plugin>
        </plugins>
    </build>
     <profiles>
diff --git a/asterixdb/asterix-replication/pom.xml b/asterixdb/asterix-replication/pom.xml
index 26f201e..f9cdca2 100644
--- a/asterixdb/asterix-replication/pom.xml
+++ b/asterixdb/asterix-replication/pom.xml
@@ -17,6 +17,21 @@
   <properties>
     <root.dir>${basedir}/..</root.dir>
   </properties>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.asterix</groupId>
diff --git a/asterixdb/asterix-runtime/pom.xml b/asterixdb/asterix-runtime/pom.xml
index b466d0d..59b5c00 100644
--- a/asterixdb/asterix-runtime/pom.xml
+++ b/asterixdb/asterix-runtime/pom.xml
@@ -35,6 +35,18 @@
       <comments>A business-friendly OSS license</comments>
     </license>
   </licenses>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.asterix</groupId>
diff --git a/asterixdb/asterix-server/pom.xml b/asterixdb/asterix-server/pom.xml
index 9f28a11..8af400b 100644
--- a/asterixdb/asterix-server/pom.xml
+++ b/asterixdb/asterix-server/pom.xml
@@ -1042,6 +1042,17 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
diff --git a/asterixdb/asterix-spidersilk/pom.xml b/asterixdb/asterix-spidersilk/pom.xml
index 48442a8..b41ba2d 100644
--- a/asterixdb/asterix-spidersilk/pom.xml
+++ b/asterixdb/asterix-spidersilk/pom.xml
@@ -27,6 +27,18 @@
     <version>0.9.10-SNAPSHOT</version>
   </parent>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <licenses>
     <license>
       <name>Apache License, Version 2.0</name>
diff --git a/asterixdb/asterix-test-framework/pom.xml b/asterixdb/asterix-test-framework/pom.xml
index 45d694b..10835b6 100644
--- a/asterixdb/asterix-test-framework/pom.xml
+++ b/asterixdb/asterix-test-framework/pom.xml
@@ -62,6 +62,13 @@
           </usedDependencies>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/asterixdb/asterix-tools/pom.xml b/asterixdb/asterix-tools/pom.xml
index bb72e6b..ffc3db1 100644
--- a/asterixdb/asterix-tools/pom.xml
+++ b/asterixdb/asterix-tools/pom.xml
@@ -80,6 +80,17 @@
           </licenseFamilies>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <failIfNoTests>false</failIfNoTests>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/asterixdb/asterix-transactions/pom.xml b/asterixdb/asterix-transactions/pom.xml
index a1142ca..51eede0 100644
--- a/asterixdb/asterix-transactions/pom.xml
+++ b/asterixdb/asterix-transactions/pom.xml
@@ -91,6 +91,14 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
   <dependencies>
diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml
index aaaeb25..e90283d 100644
--- a/asterixdb/pom.xml
+++ b/asterixdb/pom.xml
@@ -139,72 +139,6 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <failIfNoTests>false</failIfNoTests>
-          <systemPropertyVariables>
-            <skipFredSlowTests>true</skipFredSlowTests>
-            <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
-          </systemPropertyVariables>
-          <forkCount>1</forkCount>
-          <reuseForks>false</reuseForks>
-          <argLine>
-            -enableassertions -Xmx${test.heap.size}m
-            -Dfile.encoding=UTF-8
-            -DrunSlowAQLTests=${runSlowAQLTests}
-            -Xdebug
-            -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=${debug.suspend.flag}
-            --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
-            --add-opens=java.management/sun.management=ALL-UNNAMED
-            --add-opens=java.base/java.lang=ALL-UNNAMED
-            --add-opens=java.base/java.nio=ALL-UNNAMED
-            --add-opens=java.base/java.util=ALL-UNNAMED
-            --add-opens=java.base/java.io=ALL-UNNAMED
-            --add-opens=java.base/sun.nio.ch=ALL-UNNAMED
-            ${coverageArgLine}
-            ${extraSurefireArgLine}
-          </argLine>
-          <includes>
-            <include>${test.includes}</include>
-          </includes>
-          <excludes>
-            <exclude>${test.excludes}</exclude>
-          </excludes>
-          <skipTests>${skip.surefire.tests}</skipTests>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <configuration>
-          <runOrder>alphabetical</runOrder>
-          <forkCount>1</forkCount>
-          <reuseForks>false</reuseForks>
-          <argLine>
-            ${coverageArgLine}
-            ${extraFailsafeArgLine}
-          </argLine>
-          <systemProperties>
-            <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
-          </systemProperties>
-          <includes>
-            <include>${itest.includes}</include>
-          </includes>
-          <excludes>
-            <exclude>${itest.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>
         <executions>
@@ -568,16 +502,6 @@
           <version>0.12</version>
         </plugin>
         <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <version>3.0.0-M5</version>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-failsafe-plugin</artifactId>
-          <version>2.21.0</version>
-        </plugin>
-        <plugin>
           <groupId>org.apache.hyracks</groupId>
           <artifactId>license-automation-plugin</artifactId>
           <version>${hyracks.version}</version>
@@ -688,6 +612,75 @@
           <artifactId>maven-enforcer-plugin</artifactId>
           <version>3.0.0-M3</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>3.0.0-M5</version>
+          <configuration>
+            <failIfNoTests>true</failIfNoTests>
+            <systemPropertyVariables>
+              <skipFredSlowTests>true</skipFredSlowTests>
+              <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
+            </systemPropertyVariables>
+            <forkCount>1</forkCount>
+            <reuseForks>false</reuseForks>
+            <argLine>
+              -enableassertions -Xmx${test.heap.size}m
+              -Dfile.encoding=UTF-8
+              -DrunSlowAQLTests=${runSlowAQLTests}
+              -Xdebug
+              -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=${debug.suspend.flag}
+	      --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED 
+	      --add-opens java.management/sun.management=ALL-UNNAMED 
+	      --add-opens java.base/java.lang=ALL-UNNAMED 
+	      --add-opens java.base/java.nio=ALL-UNNAMED 
+	      --add-opens java.base/java.util=ALL-UNNAMED 
+	      --add-opens java.base/sun.nio.ch=ALL-UNNAMED 
+	      --add-opens java.base/java.io=ALL-UNNAMED
+              ${coverageArgLine}
+              ${extraSurefireArgLine}
+            </argLine>
+            <includes>
+              <include>${test.includes}</include>
+            </includes>
+            <excludes>
+              <exclude>${test.excludes}</exclude>
+            </excludes>
+            <skipTests>${skip.surefire.tests}</skipTests>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <version>2.21.0</version>
+          <configuration>
+            <failIfNoTests>true</failIfNoTests>
+            <runOrder>alphabetical</runOrder>
+            <forkCount>1</forkCount>
+            <reuseForks>false</reuseForks>
+            <argLine>
+              ${coverageArgLine}
+              ${extraFailsafeArgLine}
+            </argLine>
+            <systemProperties>
+              <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
+            </systemProperties>
+            <includes>
+              <include>${itest.includes}</include>
+            </includes>
+            <excludes>
+              <exclude>${itest.excludes}</exclude>
+            </excludes>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>integration-test</goal>
+                <goal>verify</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
       </plugins>
     </pluginManagement>
   </build>
diff --git a/hyracks-fullstack/algebricks/algebricks-compiler/pom.xml b/hyracks-fullstack/algebricks/algebricks-compiler/pom.xml
index 2000688..08085d8 100644
--- a/hyracks-fullstack/algebricks/algebricks-compiler/pom.xml
+++ b/hyracks-fullstack/algebricks/algebricks-compiler/pom.xml
@@ -41,6 +41,15 @@
     <root.dir>${basedir}/../..</root.dir>
   </properties>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.hyracks</groupId>
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/pom.xml b/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
index b89938b..c4fc7f4 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
+++ b/hyracks-fullstack/algebricks/algebricks-tests/pom.xml
@@ -77,6 +77,10 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
diff --git a/hyracks-fullstack/hyracks/hyracks-api/pom.xml b/hyracks-fullstack/hyracks/hyracks-api/pom.xml
index b8e8c4e..7c1fdbb 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-api/pom.xml
@@ -52,6 +52,10 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
   <dependencies>
diff --git a/hyracks-fullstack/hyracks/hyracks-client/pom.xml b/hyracks-fullstack/hyracks/hyracks-client/pom.xml
index 9340d79..625d081 100644
--- a/hyracks-fullstack/hyracks/hyracks-client/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-client/pom.xml
@@ -62,6 +62,10 @@
           </filesets>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
   <dependencies>
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
index 1141ed4..8bdc0e7 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/pom.xml
@@ -48,7 +48,12 @@
             </goals>
           </execution>
         </executions>
-      </plugin>  </plugins>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
   </build>
   <dependencies>
     <dependency>
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/pom.xml
index 021943f..870580c 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/pom.xml
@@ -27,6 +27,15 @@
     <version>0.3.10-SNAPSHOT</version>
   </parent>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
   <properties>
     <root.dir>${basedir}/../../..</root.dir>
   </properties>
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml b/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml
index 673765d..3f51e3c 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-nc-service/pom.xml
@@ -31,6 +31,15 @@
     <root.dir>${basedir}/../../..</root.dir>
   </properties>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>args4j</groupId>
diff --git a/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml b/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml
index 3a1edf7..57c1590 100644
--- a/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/pom.xml
@@ -27,6 +27,16 @@
     <artifactId>hyracks-data</artifactId>
     <version>0.3.10-SNAPSHOT</version>
   </parent>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
   <properties>
     <root.dir>${basedir}/../../..</root.dir>
   </properties>
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-common/pom.xml b/hyracks-fullstack/hyracks/hyracks-dataflow-common/pom.xml
index ff28131..41f6ed5 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-common/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-common/pom.xml
@@ -40,6 +40,15 @@
     <root.dir>${basedir}/../..</root.dir>
   </properties>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.hyracks</groupId>
diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml b/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
index 1f49839..9229af6 100644
--- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/pom.xml
@@ -41,6 +41,15 @@
     <root.dir>${basedir}/../..</root.dir>
   </properties>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.hyracks</groupId>
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
index ca386a7b..fe2647c 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
@@ -46,6 +46,10 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
   <properties>
diff --git a/hyracks-fullstack/hyracks/hyracks-hdfs/pom.xml b/hyracks-fullstack/hyracks/hyracks-hdfs/pom.xml
index b0064c6..1291564 100644
--- a/hyracks-fullstack/hyracks/hyracks-hdfs/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-hdfs/pom.xml
@@ -85,6 +85,10 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml b/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
index 6361729..57e8eff 100644
--- a/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
@@ -36,6 +36,15 @@
     </license>
   </licenses>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
   <properties>
     <root.dir>${basedir}/../..</root.dir>
   </properties>
diff --git a/hyracks-fullstack/hyracks/hyracks-net/pom.xml b/hyracks-fullstack/hyracks/hyracks-net/pom.xml
index a442987..7a22e67 100644
--- a/hyracks-fullstack/hyracks/hyracks-net/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-net/pom.xml
@@ -40,6 +40,15 @@
     <root.dir>${basedir}/../..</root.dir>
   </properties>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.hyracks</groupId>
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/pom.xml b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/pom.xml
index f3881e2..6be5f37 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/pom.xml
@@ -37,6 +37,15 @@
   <properties>
     <root.dir>${basedir}/../..</root.dir>
   </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.hyracks</groupId>
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/pom.xml b/hyracks-fullstack/hyracks/hyracks-storage-am-common/pom.xml
index 3cd3a58..7836d34 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/pom.xml
@@ -50,6 +50,10 @@
           </execution>
         </executions>
       </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+        </plugin>
     </plugins>
   </build>
   <dependencies>
diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml
index 777b58e..6793d24 100644
--- a/hyracks-fullstack/pom.xml
+++ b/hyracks-fullstack/pom.xml
@@ -581,38 +581,6 @@
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <failIfNoTests>false</failIfNoTests>
-          <forkCount>1</forkCount>
-          <reuseForks>false</reuseForks>
-          <argLine>-enableassertions -Xmx2048m -Dfile.encoding=UTF-8 -Xdebug
-            -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n ${coverageArgLine}
-            --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED
-          </argLine>
-          <systemPropertyVariables>
-            <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
-          </systemPropertyVariables>
-          <includes>
-            <include>${test.includes}</include>
-          </includes>
-          <excludes combine.children="append">
-            <exclude>${test.excludes}</exclude>
-          </excludes>
-          <skipTests>${skip.surefire.tests}</skipTests>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <configuration>
-          <systemPropertyVariables>
-            <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
-          </systemPropertyVariables>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
           <compilerArgument>-Xlint:${javac.xlint.value}</compilerArgument>
@@ -901,11 +869,35 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <version>2.21.0</version>
+          <configuration>
+            <failIfNoTests>false</failIfNoTests>
+            <forkCount>1</forkCount>
+            <reuseForks>false</reuseForks>
+            <argLine>-enableassertions -Xmx2048m -Dfile.encoding=UTF-8 -Xdebug
+              -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n ${coverageArgLine}
+              --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED
+            </argLine>
+            <systemPropertyVariables>
+              <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
+            </systemPropertyVariables>
+            <includes>
+              <include>${test.includes}</include>
+            </includes>
+            <excludes combine.children="append">
+              <exclude>${test.excludes}</exclude>
+            </excludes>
+            <skipTests>${skip.surefire.tests}</skipTests>
+          </configuration>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-failsafe-plugin</artifactId>
           <version>2.21.0</version>
+          <configuration>
+            <systemPropertyVariables>
+              <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
+            </systemPropertyVariables>
+          </configuration>
         </plugin>
         <plugin>
           <groupId>org.apache.hyracks</groupId>