AsterixDB & Hyracks Source Assemblies, Licensing

- ASTERIXDB-1319: AsterixDB source release LICENSE issues
- Generate Asterix & Hyracks source assemblies as part of the build
- Generate LICENSE & NOTICE file for above assemblies into source tree.
- Move license automation plugin to Hyracks

Change-Id: I8bd8694ad85f25f9b61182ec18fdc39f74480685
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1439
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@apache.org>
diff --git a/hyracks-fullstack/hyracks-fullstack-license/pom.xml b/hyracks-fullstack/hyracks-fullstack-license/pom.xml
new file mode 100644
index 0000000..a25c0d6
--- /dev/null
+++ b/hyracks-fullstack/hyracks-fullstack-license/pom.xml
@@ -0,0 +1,119 @@
+<!--
+ ! 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.
+ !-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>hyracks-fullstack-license</artifactId>
+  <name>hyracks-fullstack-license</name>
+  <parent>
+    <groupId>org.apache.hyracks</groupId>
+    <artifactId>apache-asterixdb-hyracks</artifactId>
+    <version>0.2.18-SNAPSHOT</version>
+  </parent>
+
+  <licenses>
+    <license>
+      <name>Apache License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+      <comments>A business-friendly OSS license</comments>
+    </license>
+  </licenses>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.hyracks</groupId>
+        <artifactId>license-automation-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <templateRootDir>${basedir}</templateRootDir>
+          <outputDir>${basedir}/..</outputDir>
+          <location>ignored</location>
+          <generatedFiles>
+            <generatedFile>
+              <template>src/main/licenses/templates/hyracks-source-license.ftl</template>
+              <outputFile>LICENSE</outputFile>
+            </generatedFile>
+            <generatedFile>
+              <template>src/main/licenses/templates/asterix-notice.ftl</template>
+              <outputFile>NOTICE</outputFile>
+            </generatedFile>
+          </generatedFiles>
+          <excludedScopes>
+            <excludedScope>test</excludedScope>
+          </excludedScopes>
+          <licenseDirectory>${basedir}/src/main/licenses/content</licenseDirectory>
+          <licenses>
+            <license>
+              <displayName>The Apache Software License, Version 2.0</displayName>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+              <aliasUrls>
+                <aliasUrl>http://www.apache.org/licenses/LICENSE-2.0</aliasUrl>
+                <aliasUrl>https://www.apache.org/licenses/LICENSE-2.0.txt</aliasUrl>
+                <aliasUrl>http://www.apache.org/licenses/LICENSE-2.0.html</aliasUrl>
+              </aliasUrls>
+              <metric>1</metric>
+            </license>
+          </licenses>
+          <templateProperties>
+            <hyracksControlCcLocation/>
+            <hyracksControlCcResourcesPrefix>hyracks/hyracks-control/hyracks-control-cc/src/main/resources/</hyracksControlCcResourcesPrefix>
+            <packageName>Hyracks and Algebricks</packageName>
+          </templateProperties>
+        </configuration>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.asterix</groupId>
+                    <artifactId>license-automation-plugin</artifactId>
+                    <versionRange>${project.version}</versionRange>
+                    <goals>
+                      <goal>generate</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore />
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>