[NO ISSUE][OTR] Add Hyracks Log4j2 Test Config File

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Add default Hyracks tests log4j2 config file.

Change-Id: I9a55b09960ad8d2453cef9ee7939666477826ce9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2275
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
Reviewed-by: Ian Maxon <imaxon@apache.org>
diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml
index 5bed915..a3f8848 100644
--- a/asterixdb/pom.xml
+++ b/asterixdb/pom.xml
@@ -88,21 +88,18 @@
           <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
-            -Djava.util.logging.config.file=${user.home}/logging.properties
             -DrunSlowAQLTests=${runSlowAQLTests}
             -Xdebug
             -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=${debug.suspend.flag}
             ${coverageArgLine}
           </argLine>
-          <systemProperties>
-            <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
-          </systemProperties>
           <includes>
             <include>${global.test.includes},${test.includes}</include>
           </includes>
diff --git a/hyracks-fullstack/hyracks/hyracks-server/pom.xml b/hyracks-fullstack/hyracks/hyracks-server/pom.xml
index 42a29fe..fcc2d2d 100644
--- a/hyracks-fullstack/hyracks/hyracks-server/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-server/pom.xml
@@ -65,12 +65,6 @@
         <configuration>
           <runOrder>alphabetical</runOrder>
           <forkMode>pertest</forkMode>
-          <systemProperties>
-            <property>
-              <name>java.util.logging.config.file</name>
-              <value>src/test/resources/logging.properties</value>
-            </property>
-          </systemProperties>
         </configuration>
         <executions>
           <execution>
diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml
index 44d4f4f..f08bec6 100644
--- a/hyracks-fullstack/pom.xml
+++ b/hyracks-fullstack/pom.xml
@@ -59,7 +59,7 @@
     <source-format.skip>false</source-format.skip>
     <skip.surefire.tests>${skipTests}</skip.surefire.tests>
     <skip.testResources>${maven.test.skip}</skip.testResources>
-
+    <testLog4jConfigFile>${root.dir}/src/test/resources/log4j2-test.xml</testLog4jConfigFile>
     <!-- Definition of tests in various categories which may be excluded -->
     <hanging.pregelix.tests>**/pregelix/**/FailureRecovery*.java</hanging.pregelix.tests>
     <hivesterix.perf.tests>**/hivesterix/perf/PerfTestSuite.java</hivesterix.perf.tests>
@@ -259,11 +259,13 @@
           <reuseForks>false</reuseForks>
           <argLine>-enableassertions -Xmx2048m
             -Dfile.encoding=UTF-8
-            -Djava.util.logging.config.file=${user.home}/logging.properties
             -Xdebug
             -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
             ${coverageArgLine}
           </argLine>
+          <systemPropertyVariables>
+            <log4j.configurationFile>${testLog4jConfigFile}</log4j.configurationFile>
+          </systemPropertyVariables>
           <includes>
             <include>${global.test.includes},${test.includes}</include>
           </includes>
@@ -275,6 +277,15 @@
       </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>
           <source>${jdk.version}</source>
diff --git a/hyracks-fullstack/src/test/resources/log4j2-test.xml b/hyracks-fullstack/src/test/resources/log4j2-test.xml
new file mode 100644
index 0000000..d42b935
--- /dev/null
+++ b/hyracks-fullstack/src/test/resources/log4j2-test.xml
@@ -0,0 +1,31 @@
+<!--
+ ! 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 complianceo
+ ! 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.
+ !-->
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_ERR">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <Root level="WARN"/>
+    <Logger name="org.apache.hyracks" level="WARN">
+      <AppenderRef ref="Console"/>
+    </Logger>
+  </Loggers>
+</Configuration>
\ No newline at end of file