Removing need for boilerplate app.xml; Instead defining onos.app.name and onos.app.origin (optional) is sufficient to trigger generation of boilerplate app.xml and features.xml files.

Change-Id: Ied8f3f8bf8774fae85e11c79a733b34dd5868949
diff --git a/apps/bgprouter/app.xml b/apps/bgprouter/app.xml
index 256c915..d4cd0f5 100644
--- a/apps/bgprouter/app.xml
+++ b/apps/bgprouter/app.xml
@@ -14,7 +14,7 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<app name="org.onosproject.bgprouter" origin="ON.Lab" version="${feature.version}"
+<app name="org.onosproject.bgprouter" origin="ON.Lab" version="${short.version}"
      featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
      features="${project.artifactId}">
     <description>${project.description}</description>
diff --git a/apps/bgprouter/features.xml b/apps/bgprouter/features.xml
index ea80a90..3b80318 100644
--- a/apps/bgprouter/features.xml
+++ b/apps/bgprouter/features.xml
@@ -14,9 +14,9 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${feature.version}">
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${short.version}">
     <repository>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repository>
-    <feature name="${project.artifactId}" version="${feature.version}"
+    <feature name="${project.artifactId}" version="${project.version}"
              description="${project.description}">
         <feature>onos-api</feature>
         <bundle>mvn:${project.groupId}/onos-app-routing-api/${project.version}</bundle>
diff --git a/apps/bgprouter/pom.xml b/apps/bgprouter/pom.xml
index 97a3ceb..c4597b5 100644
--- a/apps/bgprouter/pom.xml
+++ b/apps/bgprouter/pom.xml
@@ -39,6 +39,12 @@
 
         <dependency>
             <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-routing</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
             <artifactId>onlab-misc</artifactId>
         </dependency>
 
diff --git a/apps/config/app.xml b/apps/config/app.xml
deleted file mode 100644
index 0829867..0000000
--- a/apps/config/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.config" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/apps/config/pom.xml b/apps/config/pom.xml
index f42747e..a512404 100644
--- a/apps/config/pom.xml
+++ b/apps/config/pom.xml
@@ -31,19 +31,23 @@
 
     <description>Network configuration application</description>
 
+    <properties>
+        <onos.app.name>org.onosproject.config</onos.app.name>
+    </properties>
+
     <dependencies>
-      <dependency>
-        <groupId>com.fasterxml.jackson.core</groupId>
-        <artifactId>jackson-databind</artifactId>
-      </dependency>
-      <dependency>
-        <groupId>com.fasterxml.jackson.core</groupId>
-        <artifactId>jackson-annotations</artifactId>
-      </dependency>
-      <dependency>
-        <groupId>org.onosproject</groupId>
-        <artifactId>onlab-misc</artifactId>
-      </dependency>
-    </dependencies> 
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-misc</artifactId>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/apps/fwd/app.xml b/apps/fwd/app.xml
deleted file mode 100644
index 5facda1..0000000
--- a/apps/fwd/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.fwd" origin="ON.Lab" version="${feature.version}"
-        featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-        features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/apps/fwd/pom.xml b/apps/fwd/pom.xml
index a3b1960..5db7375 100644
--- a/apps/fwd/pom.xml
+++ b/apps/fwd/pom.xml
@@ -31,6 +31,10 @@
 
     <description>Reactive forwarding application using flow subsystem</description>
 
+    <properties>
+        <onos.app.name>org.onosproject.fwd</onos.app.name>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
diff --git a/apps/metrics/app.xml b/apps/metrics/app.xml
deleted file mode 100644
index 94bc602..0000000
--- a/apps/metrics/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.metrics" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/apps/metrics/pom.xml b/apps/metrics/pom.xml
index 2cac15c..3958bdb 100644
--- a/apps/metrics/pom.xml
+++ b/apps/metrics/pom.xml
@@ -31,6 +31,10 @@
 
     <description>Performance metrics collection</description>
 
+    <properties>
+        <onos.app.name>org.onosproject.metrics</onos.app.name>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
diff --git a/apps/mobility/app.xml b/apps/mobility/app.xml
deleted file mode 100644
index 2462ea4..0000000
--- a/apps/mobility/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.mobility" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/apps/mobility/pom.xml b/apps/mobility/pom.xml
index 034d3ee..72ee098 100644
--- a/apps/mobility/pom.xml
+++ b/apps/mobility/pom.xml
@@ -31,6 +31,10 @@
 
     <description>Host mobility application</description>
 
+    <properties>
+        <onos.app.name>org.onosproject.mobility</onos.app.name>
+    </properties>
+
     <dependencies>
       <dependency>
         <groupId>com.google.guava</groupId>
diff --git a/apps/optical/app.xml b/apps/optical/app.xml
deleted file mode 100644
index 7ff588b..0000000
--- a/apps/optical/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.optical" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/apps/optical/pom.xml b/apps/optical/pom.xml
index 6e38bc8..f8e7e9f 100644
--- a/apps/optical/pom.xml
+++ b/apps/optical/pom.xml
@@ -31,8 +31,11 @@
 
     <description>Packet/Optical use-case application</description>
 
-    <dependencies>
+    <properties>
+        <onos.app.name>org.onosproject.optical</onos.app.name>
+    </properties>
 
+    <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
             <artifactId>onos-cli</artifactId>
diff --git a/apps/proxyarp/app.xml b/apps/proxyarp/app.xml
deleted file mode 100644
index 0459388..0000000
--- a/apps/proxyarp/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.proxyarp" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/apps/proxyarp/pom.xml b/apps/proxyarp/pom.xml
index 85429aa..22358eb 100644
--- a/apps/proxyarp/pom.xml
+++ b/apps/proxyarp/pom.xml
@@ -31,6 +31,10 @@
 
     <description>Proxy ARP/NDP application</description>
 
+    <properties>
+        <onos.app.name>org.onosproject.proxyarp</onos.app.name>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
diff --git a/apps/reactive-routing/app.xml b/apps/reactive-routing/app.xml
deleted file mode 100644
index b6b7e2d..0000000
--- a/apps/reactive-routing/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.routing" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
\ No newline at end of file
diff --git a/apps/reactive-routing/pom.xml b/apps/reactive-routing/pom.xml
index dc6ef28..7d2bced 100644
--- a/apps/reactive-routing/pom.xml
+++ b/apps/reactive-routing/pom.xml
@@ -19,10 +19,6 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>onos-app-reactive-routing</artifactId>
-    <packaging>bundle</packaging>
-    <description>SDN-IP reactive routing application</description>
-
     <parent>
         <groupId>org.onosproject</groupId>
         <artifactId>onos-apps</artifactId>
@@ -30,6 +26,15 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
+    <artifactId>onos-app-reactive-routing</artifactId>
+    <packaging>bundle</packaging>
+
+    <description>SDN-IP reactive routing application</description>
+
+    <properties>
+        <onos.app.name>org.onosproject.routing</onos.app.name>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
diff --git a/apps/sdnip/app.xml b/apps/sdnip/app.xml
index e5c6f42..8437ae1 100644
--- a/apps/sdnip/app.xml
+++ b/apps/sdnip/app.xml
@@ -14,7 +14,7 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<app name="org.onosproject.sdnip" origin="ON.Lab" version="${feature.version}"
+<app name="org.onosproject.sdnip" origin="ON.Lab" version="${short.version}"
      featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
      features="${project.artifactId}">
     <description>${project.description}</description>
diff --git a/apps/sdnip/features.xml b/apps/sdnip/features.xml
index 2ddec48..4125a67 100644
--- a/apps/sdnip/features.xml
+++ b/apps/sdnip/features.xml
@@ -14,9 +14,9 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${feature.version}">
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${short.version}">
     <repository>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repository>
-    <feature name="onos-app-sdnip" version="${feature.version}"
+    <feature name="onos-app-sdnip" version="${project.version}"
              description="${project.description}">
         <feature>onos-api</feature>
         <feature>onos-app-proxyarp</feature>
diff --git a/apps/segmentrouting/app.xml b/apps/segmentrouting/app.xml
deleted file mode 100644
index 90246c1..0000000
--- a/apps/segmentrouting/app.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.segmentrouting" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
-
diff --git a/apps/segmentrouting/pom.xml b/apps/segmentrouting/pom.xml
index fa54f26..c0c5e30 100644
--- a/apps/segmentrouting/pom.xml
+++ b/apps/segmentrouting/pom.xml
@@ -30,4 +30,8 @@
 

     <description>Segment routing application</description>

 

+    <properties>

+        <onos.app.name>org.onosproject.segmentrouting</onos.app.name>

+    </properties>

+

 </project>

diff --git a/apps/test/demo/app.xml b/apps/test/demo/app.xml
deleted file mode 100644
index a7c59fb..0000000
--- a/apps/test/demo/app.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.demo" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
-
diff --git a/apps/test/demo/pom.xml b/apps/test/demo/pom.xml
index 70c0306..f3581a2 100644
--- a/apps/test/demo/pom.xml
+++ b/apps/test/demo/pom.xml
@@ -32,6 +32,7 @@
     <description>Flow throughput test application</description>
 
     <properties>
+        <onos.app.name>org.onosproject.demo</onos.app.name>
         <web.context>/onos/demo</web.context>
     </properties>
 
diff --git a/apps/test/election/app.xml b/apps/test/election/app.xml
deleted file mode 100644
index 9fa94e9..0000000
--- a/apps/test/election/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.election" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/apps/test/election/pom.xml b/apps/test/election/pom.xml
index 687beb7..bfdb9c9 100644
--- a/apps/test/election/pom.xml
+++ b/apps/test/election/pom.xml
@@ -32,8 +32,11 @@
 
     <description>Master election test application</description>
 
-    <dependencies>
+    <properties>
+        <onos.app.name>org.onosproject.election</onos.app.name>
+    </properties>
 
+    <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
             <artifactId>onos-api</artifactId>
diff --git a/apps/test/intent-perf/app.xml b/apps/test/intent-perf/app.xml
deleted file mode 100644
index 8e7438b..0000000
--- a/apps/test/intent-perf/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.intentperf" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/apps/test/intent-perf/pom.xml b/apps/test/intent-perf/pom.xml
index c5be5aa..2a8c56f 100644
--- a/apps/test/intent-perf/pom.xml
+++ b/apps/test/intent-perf/pom.xml
@@ -31,6 +31,10 @@
 
     <description>Intent performance test application</description>
 
+    <properties>
+        <onos.app.name>org.onosproject.intentperf</onos.app.name>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
diff --git a/drivers/pom.xml b/drivers/pom.xml
index 334338a..018ddf8 100644
--- a/drivers/pom.xml
+++ b/drivers/pom.xml
@@ -32,6 +32,10 @@
 
     <description>Builtin device drivers</description>
 
+    <properties>
+        <onos.app.name>org.onosproject.drivers</onos.app.name>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -44,12 +48,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onos-core-serializers</artifactId>
-            <version>1.2.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
             <groupId>org.easymock</groupId>
             <artifactId>easymock</artifactId>
             <scope>test</scope>
diff --git a/providers/null/app.xml b/providers/null/app.xml
deleted file mode 100644
index 0965043..0000000
--- a/providers/null/app.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 2015 Open Networking Laboratory
-  ~
-  ~ Licensed 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.
-  -->
-<app name="org.onosproject.null" origin="ON.Lab" version="${feature.version}"
-     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}">
-    <description>${project.description}</description>
-    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-</app>
diff --git a/providers/null/pom.xml b/providers/null/pom.xml
index e6d417d..f846fbc 100644
--- a/providers/null/pom.xml
+++ b/providers/null/pom.xml
@@ -31,6 +31,10 @@
 
     <description>Null southbound providers application</description>
 
+    <properties>
+        <onos.app.name>org.onosproject.null</onos.app.name>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
diff --git a/providers/openflow/app/app.xml b/providers/openflow/app/app.xml
index e143328..f1b31b6 100644
--- a/providers/openflow/app/app.xml
+++ b/providers/openflow/app/app.xml
@@ -14,7 +14,7 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<app name="org.onosproject.openflow" origin="ON.Lab" version="${feature.version}"
+<app name="org.onosproject.openflow" origin="ON.Lab" version="${short.version}"
      featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
      features="${project.artifactId}">
     <description>${project.description}</description>
diff --git a/providers/openflow/app/features.xml b/providers/openflow/app/features.xml
index 521a20b..ef95892 100644
--- a/providers/openflow/app/features.xml
+++ b/providers/openflow/app/features.xml
@@ -14,9 +14,9 @@
   ~ See the License for the specific language governing permissions and      
   ~ limitations under the License.
   -->
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${feature.version}">
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
     <repository>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repository>
-    <feature name="${project.artifactId}" version="${feature.version}"
+    <feature name="${project.artifactId}" version="${project.version}"
              description="${project.description}">
         <feature>onos-api</feature>
         <bundle>mvn:io.netty/netty/3.9.2.Final</bundle>
diff --git a/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java b/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java
index 79de51f..6865ccf 100644
--- a/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java
+++ b/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosAppMojo.java
@@ -15,7 +15,7 @@
  */
 package org.onosproject.maven;
 
-import com.google.common.io.ByteStreams;
+import com.google.common.collect.ImmutableList;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -39,6 +39,7 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
+import static com.google.common.io.ByteStreams.toByteArray;
 import static org.codehaus.plexus.util.FileUtils.*;
 
 /**
@@ -51,7 +52,6 @@
     private static final String NAME = "[@name]";
     private static final String VERSION = "[@version]";
     private static final String FEATURES_REPO = "[@featuresRepo]";
-    private static final String DESCRIPTION = "description";
     private static final String ARTIFACT = "artifact";
 
     private static final String APP_XML = "app.xml";
@@ -60,16 +60,31 @@
     private static final String MVN_URL = "mvn:";
     private static final String M2_PREFIX = "m2";
 
+    private static final String ONOS_APP_NAME = "onos.app.name";
+    private static final String ONOS_APP_ORIGIN = "onos.app.origin";
+
     private static final String SNAPSHOT = "-SNAPSHOT";
+
     private static final String JAR = "jar";
     private static final String XML = "xml";
     private static final String APP_ZIP = "oar";
     private static final String PACKAGE_DIR = "oar";
 
+    private static final String DEFAULT_ORIGIN = "ON.Lab";
+    private static final String DEFAULT_VERSION = "${short.version}";
+
+    private static final String DEFAULT_FEATURES_REPO =
+            "mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features";
+    private static final String DEFAULT_ARTIFACT =
+            "mvn:${project.groupId}/${project.artifactId}/${project.version}";
+
     private static final int BUFFER_ZIZE = 8192;
 
-    private String name, version;
-    private String description, featuresRepo;
+    private String name;
+    private String origin;
+    private String version = DEFAULT_VERSION;
+    private String shortVersion;
+    private String featuresRepo = DEFAULT_FEATURES_REPO;
     private List<String> artifacts;
 
     /**
@@ -127,27 +142,37 @@
     private File m2Directory;
     protected File stageDirectory;
     protected String projectPath;
-    protected String featureVersion;
 
     @Override
     public void execute() throws MojoExecutionException {
         File appFile = new File(baseDir, APP_XML);
         File featuresFile = new File(baseDir, FEATURES_XML);
 
-        if (!appFile.exists()) {
+        name = (String) project.getProperties().get(ONOS_APP_NAME);
+
+        // If neither the app.xml file exists, nor the onos.app.name property
+        // is defined, there is nothing for this Mojo to do, so bail.
+        if (!appFile.exists() && name == null) {
             return;
         }
 
         m2Directory = new File(localRepository.getBasedir());
         stageDirectory = new File(dstDirectory, PACKAGE_DIR);
-        featureVersion = projectVersion.replace(SNAPSHOT, "");
+        shortVersion = projectVersion.replace(SNAPSHOT, "");
         projectPath = M2_PREFIX + "/" + artifactDir(projectGroupId, projectArtifactId, projectVersion);
 
-        loadAppFile(appFile);
+        origin = (String) project.getProperties().get(ONOS_APP_ORIGIN);
+        origin = origin != null ? origin : DEFAULT_ORIGIN;
+
+        if (appFile.exists()) {
+            loadAppFile(appFile);
+        } else {
+            artifacts = ImmutableList.of(eval(DEFAULT_ARTIFACT));
+        }
 
         // If there are any artifacts, stage the
         if (!artifacts.isEmpty()) {
-            getLog().info("Building ONOS application package for " + name + " (v" + version + ")");
+            getLog().info("Building ONOS application package for " + name + " (v" + eval(version) + ")");
             artifacts.forEach(a -> getLog().debug("Including artifact: " + a));
 
             if (stageDirectory.exists() || stageDirectory.mkdirs()) {
@@ -173,8 +198,6 @@
 
             name = xml.getString(NAME);
             version = eval(xml.getString(VERSION));
-            description = xml.getString(DESCRIPTION)
-                    .replaceAll("\\$\\{project.description\\}", projectDescription);
             featuresRepo = eval(xml.getString(FEATURES_REPO));
 
             artifacts = xml.configurationsAt(ARTIFACT).stream()
@@ -195,8 +218,15 @@
         try {
             File file = new File(stageDirectory, APP_XML);
             forceMkdir(stageDirectory);
-            String s = eval(fileRead(appFile));
-            fileWrite(file.getAbsolutePath(), s);
+            String contents;
+
+            if (appFile.exists()) {
+                contents = fileRead(appFile);
+            } else {
+                byte[] bytes = toByteArray(getClass().getResourceAsStream(APP_XML));
+                contents = new String(bytes);
+            }
+            fileWrite(file.getAbsolutePath(), eval(contents));
         } catch (IOException e) {
             throw new MojoExecutionException("Unable to process app.xml", e);
         }
@@ -226,7 +256,7 @@
                 artifactFile(projectArtifactId, projectVersion, XML, "features");
         File dstDir = new File(stageDirectory, projectPath);
         forceMkdir(dstDir);
-        String s = eval(new String(ByteStreams.toByteArray(stream)));
+        String s = eval(new String(toByteArray(stream)));
         fileWrite(new File(dstDir, featuresArtifact).getAbsolutePath(), s);
     }
 
@@ -310,11 +340,13 @@
     // Returns the given string with project variable substitutions.
     private String eval(String string) {
         return string == null ? null :
-                string.replaceAll("\\$\\{project.groupId\\}", projectGroupId)
+                string.replaceAll("\\$\\{onos.app.name\\}", name)
+                        .replaceAll("\\$\\{onos.app.origin\\}", origin)
+                        .replaceAll("\\$\\{project.groupId\\}", projectGroupId)
                         .replaceAll("\\$\\{project.artifactId\\}", projectArtifactId)
                         .replaceAll("\\$\\{project.version\\}", projectVersion)
-                        .replaceAll("\\$\\{project.description\\}", description)
-                        .replaceAll("\\$\\{feature.version\\}", featureVersion);
+                        .replaceAll("\\$\\{short.version\\}", shortVersion)
+                        .replaceAll("\\$\\{project.description\\}", projectDescription);
     }
 
     // Recursively archives the specified directory into a given ZIP stream.
diff --git a/drivers/app.xml b/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml
similarity index 91%
rename from drivers/app.xml
rename to tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml
index ac4f5d6..4c4399c 100644
--- a/drivers/app.xml
+++ b/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/app.xml
@@ -14,7 +14,7 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<app name="org.onosproject.drivers" origin="ON.Lab" version="${feature.version}"
+<app name="${onos.app.name}" origin="${onos.app.origin}" version="${short.version}"
         featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
         features="${project.artifactId}">
     <description>${project.description}</description>
diff --git a/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml b/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml
index 15487d9..1e85dbb 100644
--- a/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml
+++ b/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml
@@ -14,9 +14,9 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${feature.version}">
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${short.version}">
     <repository>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repository>
-    <feature name="${project.artifactId}" version="${feature.version}"
+    <feature name="${project.artifactId}" version="${project.version}"
              description="${project.description}">
         <feature>onos-api</feature>
         <bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>