Use Asterix-style surefire config; define hanging-pregelix-tests profile to run pregelix tests that tend to hang (now skipped by default)
diff --git a/pom.xml b/pom.xml
index 9224698..b140c25 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,18 +23,12 @@
 
   <properties>
     <jvm.extraargs />
-    <exclude.tests>edu.uci.ics.hyracks.test.infrastructure.SlowTest</exclude.tests>
+
+    <!-- Definition of tests in various categories which may be excluded -->
+    <hanging.pregelix.tests>**/FailureRecoveryInnerJoinTest.java,**/RunJobTestCase.java,**/FailureVertexTest.java</hanging.pregelix.tests>
+    <test.includes>**/*TestSuite.java,**/*Test.java</test.includes>
+    <test.excludes>${hanging.pregelix.tests}</test.excludes>
   </properties>
-
-  <profiles>
-    <profile>
-      <id>slow</id>
-      <properties>
-        <exclude.tests>java.lang.String</exclude.tests>
-      </properties>
-    </profile>
-  </profiles>
-
   <dependencyManagement>
     <dependencies>
       <dependency>
@@ -61,26 +55,25 @@
         <version>1.2</version>
       </plugin>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.16</version>
-        <dependencies>
-          <dependency>
-            <groupId>org.apache.maven.surefire</groupId>
-            <artifactId>surefire-junit47</artifactId>
-            <version>2.16</version>
-          </dependency>
-        </dependencies>
-        <configuration>
-          <forkCount>1</forkCount>
+	<groupId>org.apache.maven.plugins</groupId>
+	<artifactId>maven-surefire-plugin</artifactId>
+	<version>2.16</version>
+	<configuration>
+	  <failIfNoTests>false</failIfNoTests>
+	  <forkCount>1</forkCount>
           <reuseForks>false</reuseForks>
-          <argLine>-enableassertions -Djava.util.logging.config.file=${user.home}/logging.properties -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n -Xmx2048m</argLine>
-          <failIfNoTests>false</failIfNoTests>
-          <includes>
-            <include>**/*Test.java</include>
-            <include>**/*TestSuite.java</include>
-          </includes>
-        </configuration>
+	  <argLine>-enableassertions -Xmx${test.heap.size}m
+	  -Dfile.encoding=UTF-8
+	  -Djava.util.logging.config.file=${user.home}/logging.properties
+	  -Xdebug
+	  -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n</argLine>
+	  <includes>
+	    <include>${test.includes}</include>
+	  </includes>
+          <excludes>
+            <exclude>${test.excludes}</exclude>
+          </excludes>
+	</configuration>
       </plugin>
     </plugins>
   </build>
@@ -102,6 +95,15 @@
     </snapshotRepository>
   </distributionManagement>
 
+  <profiles>
+    <profile>
+      <id>hanging-pregelix-tests</id>
+      <properties>
+        <hanging.pregelix.tests />
+      </properties>
+    </profile>
+  </profiles>
+
   <repositories>
     <repository>
       <id>maven-central</id>