Fixing bazel GUI packaging

Change-Id: Ifb7506c0cb0598813a54adcc36bd53d6955a6b84
diff --git a/BUILD b/BUILD
index 945cb1a..e39bf4c 100644
--- a/BUILD
+++ b/BUILD
@@ -86,7 +86,7 @@
     srcs = [
         ":onos-package",
         "tools/package/onos-run-karaf",
-    ],
+        ] + glob(["tools/package/config/**"]),
     outs = ["onos-runner"],
     cmd = "sed \"s#ONOS_TAR=#ONOS_TAR=$(location :onos-package)#\" $(location tools/package/onos-run-karaf) > $(location onos-runner); chmod +x $(location onos-runner)",
     executable = True,
diff --git a/tools/package/onos-run-karaf b/tools/package/onos-run-karaf
index 7c7a8cc..b0c371f 100755
--- a/tools/package/onos-run-karaf
+++ b/tools/package/onos-run-karaf
@@ -64,7 +64,7 @@
 EOF
 
     # Copy config files
-    find $ONOS_ROOT/tools/package/config -maxdepth 1 -name \*.json -exec cp {} $ONOS_HOME/config/ \;
+    find ${ONOS_ROOT:-.}/tools/package/config -maxdepth 1 -name \*.json -exec cp {} $ONOS_HOME/config/ \;
 
 else
     # Otherwise, run using the previous installation
diff --git a/web/gui/BUILD b/web/gui/BUILD
index 6fec6ae..6b8ba33 100644
--- a/web/gui/BUILD
+++ b/web/gui/BUILD
@@ -97,6 +97,12 @@
     name = "_src_main_webapp_files",
     srcs = glob([
         "src/main/webapp/**",
+    ], exclude = [
+        "src/main/webapp/tests/**",
+        "src/main/webapp/node_modules/**",
+        "src/main/webapp/dist/**",
+        "src/main/webapp/vendor/**",
+        "src/main/webapp/npm-debug.log",
     ]),
 )
 
@@ -165,7 +171,7 @@
     name = "_web_app_all",
     srcs = [":_src_main_webapp_files"],
     outs = ["web_app_all.tar"],
-    cmd = "cd web/gui && tar hcf ../../$@ src/main/webapp",
+    cmd = "cd web/gui && du -hHs src/main/webapp && tar hcf ../../$@ src/main/webapp",
 )
 
 """