Revamp support for building third-party apps via maven

- Publish onos-dependencies (autogenerated from deps.json). With most
  3rd-party dependencies listed as <dependencyManagement> to avoid
  version conflicts, and a minimal set listed as <dependencies> to
  simplify child poms. Similarly, we provide a number of plugins already
  configured as <pluginManagement> to support the whole life-cycle of
  apps (from build, to reporting and release).
- Update Maven plugins to work with JDK 11 (checkstyle, pmd, etc.)
- Publish onos-build-conf (with common checkstyle and pmd confs)
- Removed unused checkstyle code
- Fix OSGi version mismatch in deps.json to consistently depend on
  release 6 (the one supported by Karaf 4)
- Update/simplify archetypes to use onos-dependencies as the parent pom

Change-Id: Ic09b34e13fb49eb3d96df623b53a3617bbf7b7e4
diff --git a/tools/package/archetypes/api/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/api/src/main/resources/META-INF/maven/archetype-metadata.xml
index e832eb7..4a0a850 100644
--- a/tools/package/archetypes/api/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/tools/package/archetypes/api/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -27,4 +27,9 @@
             </includes>
         </fileSet>
     </fileSets>
+    <requiredProperties>
+        <requiredProperty key="onosVersion">
+            <defaultValue>2.2.1-SNAPSHOT</defaultValue>
+        </requiredProperty>
+    </requiredProperties>
 </archetype-descriptor>
diff --git a/tools/package/archetypes/api/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/api/src/main/resources/archetype-resources/pom.xml
index 3b6b760..acded36 100644
--- a/tools/package/archetypes/api/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/api/src/main/resources/archetype-resources/pom.xml
@@ -22,6 +22,12 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>
 
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos-dependencies</artifactId>
+        <version>${onosVersion}</version>
+    </parent>
+
     <groupId>${groupId}</groupId>
     <artifactId>${artifactId}</artifactId>
     <version>${version}</version>
@@ -30,37 +36,13 @@
     <description>ONOS OSGi API bundle archetype</description>
     <url>http://onosproject.org</url>
 
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <onos.version>2.2.1-SNAPSHOT</onos.version>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
             <artifactId>onos-api</artifactId>
             <version>${onos.version}</version>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.3.0</version>
-                <extensions>true</extensions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.7.0</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>