Run Assembly Plugin Only When Assembly Defined

Enable incremental builds in hyracks by only gating assembly under a
file-presence activation profile.

Change-Id: I97268a79f89b043a9b9b32ef195012a928f5ba9f
Reviewed-on: https://asterix-gerrit.ics.uci.edu/851
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml
index 513bb80..7699520 100644
--- a/hyracks-fullstack/pom.xml
+++ b/hyracks-fullstack/pom.xml
@@ -237,31 +237,6 @@
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <!-- We override the configuration plugin to override the descriptor to use for building
-          the source release zip. Specifically, we would like to control the inclusions/exclusions.
-          For example, we exclude the KEYS file from the zip -->
-        <executions>
-          <execution>
-            <!-- Use this id to match the id mentioned in the assembly plugin configuration in
-              the apache parent POM under the apache-release profile -->
-            <id>source-release-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <!-- combine.self should be override to replace the configuration in the parent POM -->
-            <configuration combine.self="override">
-              <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
-              <descriptors>
-                <descriptor>src/main/assembly/source.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.1</version>
         <configuration>
@@ -357,6 +332,11 @@
     </profile>
     <profile>
       <id>asterix-release</id>
+      <activation>
+        <file>
+          <exists>src/main/assembly/source.xml</exists>
+        </file>
+      </activation>
       <build>
         <plugins>
           <plugin>