ASTERIXDB-1105 - LICENSE per submodule

This is a good part of what we need to have a specific set of
dependencies per binary assembly. The main key here is using the
maven remote resources plugin, and supplemental resources to
fill in info from the POM of dependencies where it is lacking.

For things that aren't described in Maven dependencies,
like Javascript files, they are added as LICENSE fragements
that get included in binary assemblies.

Also fix AsterixEventServiceUtil to not die when
the asterix-server bundle has files in the root of
the archive.

Change-Id: I2a6c4fb809b6fcad578007b8f48bf8bce179cd82
Reviewed-on: https://asterix-gerrit.ics.uci.edu/518
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterix-metadata/pom.xml b/asterix-metadata/pom.xml
index 8149c5b..438cb6e 100644
--- a/asterix-metadata/pom.xml
+++ b/asterix-metadata/pom.xml
@@ -1,18 +1,18 @@
 <!-- 
  ! Licensed to the Apache Software Foundation (ASF) under one
- ! or more contributor license agreements.  See the NOTICE file
+ ! or more contributor license agreements.See the NOTICE file
  ! distributed with this work for additional information
- ! regarding copyright ownership.  The ASF licenses this file
+ ! 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
+ ! with the License.You may obtain a copy of the License at
  !
- !   http://www.apache.org/licenses/LICENSE-2.0
+ ! 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
+ ! KIND, either express or implied.See the License for the
  ! specific language governing permissions and limitations
  ! under the License.
  !-->
@@ -25,14 +25,18 @@
 	</parent>
 	<artifactId>asterix-metadata</artifactId>
 
-  <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>
+	<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>
+
+	<properties>
+		<appendedResourcesDirectory>${basedir}/../src/main/appended-resources</appendedResourcesDirectory>
+	</properties>
 
 	<build>
 		<plugins>
@@ -92,11 +96,10 @@
 			<groupId>org.apache.hyracks</groupId>
 			<artifactId>hyracks-storage-am-lsm-rtree</artifactId>
 		</dependency>
-                <dependency>
-                        <groupId>org.apache.hyracks</groupId>
-                        <artifactId>hyracks-hdfs-core</artifactId>
-                        <version>${hyracks.version}</version>
-                </dependency>
-
+		<dependency>
+			<groupId>org.apache.hyracks</groupId>
+			<artifactId>hyracks-hdfs-core</artifactId>
+			<version>${hyracks.version}</version>
+		</dependency>
 	</dependencies>
 </project>