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-examples/pom.xml b/asterix-examples/pom.xml
index e23c739..f933969 100644
--- a/asterix-examples/pom.xml
+++ b/asterix-examples/pom.xml
@@ -34,40 +34,9 @@
     </license>
   </licenses>
 
+  <properties>
+      <appendedResourcesDirectory>${basedir}/../src/main/appended-resources</appendedResourcesDirectory>
+  </properties>
 
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-assembly-plugin</artifactId>
-				<version>2.2-beta-5</version>
-				<executions>
-					<execution>
-						<id>admaql101-demo-binary-assembly</id>
-						<configuration>
-							<appendAssemblyId>false</appendAssemblyId>
-							<finalName>admaql101-demo</finalName>
-							<descriptor>src/main/assembly/admaql101-demo-binary-assembly.xml</descriptor>
-						</configuration>
-						<phase>package</phase>
-						<goals>
-							<goal>single</goal>
-						</goals>
-					</execution>
-					<execution>
-						<id>tweetbook-demo-binary-assembly</id>
-						<configuration>
-							<appendAssemblyId>false</appendAssemblyId>
-							<finalName>tweetbook-demo</finalName>
-							<descriptor>src/main/assembly/tweetbook-demo-binary-assembly.xml</descriptor>
-						</configuration>
-						<phase>package</phase>
-						<goals>
-							<goal>single</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
 	<packaging>pom</packaging>
 </project> 
diff --git a/asterix-examples/src/main/appended-resources/META-INF/LICENSE b/asterix-examples/src/main/appended-resources/META-INF/LICENSE
new file mode 100644
index 0000000..420a1a3
--- /dev/null
+++ b/asterix-examples/src/main/appended-resources/META-INF/LICENSE
@@ -0,0 +1,31 @@
+-----------------------------------------------------------------------
+
+ASTERIXDB COMPONENTS:
+
+AsterixDB includes a number of subcomponents with separate copyright
+notices and license terms. Your use of the source code for these
+subcomponents is subject to the terms and condition of the following
+licenses.
+
+
+-----------------------------------------------------------------------
+ The MIT License
+-----------------------------------------------------------------------
+
+ - jQuery
+ - Bootstrap
+ - Smoothie Charts
+ - Bottle
+ - geostats
+
+The text of The MIT License is below for convenience. Refer to the website of each project for exact details.
+
+The MIT License (MIT)
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.