Enhancing STC and scenarios.

Change-Id: I57a4d25b7fb726a1242073055474ff5c7c3c1087
diff --git a/tools/dev/bin/onos-create-app b/tools/dev/bin/onos-create-app
index 9546b1d..279ec06 100755
--- a/tools/dev/bin/onos-create-app
+++ b/tools/dev/bin/onos-create-app
@@ -8,8 +8,10 @@
 
 type=${1:-bundle}
 
+[ $type = app ] && archetype=bundle || archetype=$type
+
 if [ "$1" = "-?" -o "$1" = "-h" -o "$1" = "--help" ]; then
-    echo "usage: $(basename $0) {bundle|ui|cli|api} groupId artifactId version package mvn-options"
+    echo "usage: $(basename $0) {app|bundle|ui|cli|api} groupId artifactId version package mvn-options"
     echo "        All arguments are optional"
     exit 1
 fi
@@ -17,10 +19,16 @@
 otherOptions=""
 [ -n "$1" ] && shift
 [ -n "$1" ] && otherOptions="$otherOptions -DgroupId=$1" && shift
-[ -n "$1" ] && otherOptions="$otherOptions -DartifactId=$1" && shift
+[ -n "$1" ] && otherOptions="$otherOptions -DartifactId=$1" && dir=$1 && shift
 [ -n "$1" ] && otherOptions="$otherOptions -Dversion=$1" && shift
 [ -n "$1" ] && otherOptions="$otherOptions -Dpackage=$1" && shift
 
 mvn archetype:generate -DarchetypeGroupId=org.onosproject \
-    -DarchetypeArtifactId=onos-$type-archetype -DarchetypeVersion=$ONOS_POM_VERSION \
-    $otherOptions "$@"
\ No newline at end of file
+    -DarchetypeArtifactId=onos-$archetype-archetype \
+    -DarchetypeVersion=$ONOS_POM_VERSION $otherOptions "$@"
+
+# Patch the pom.xml file to make this an app.
+if [ $type = app -a -d $dir ]; then
+    egrep -v "        (<!--|-->)" $dir/pom.xml > $dir/pom.app.xml
+    mv $dir/pom.app.xml $dir/pom.xml
+fi
\ No newline at end of file