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/build/conf/src/main/resources/onos/pmd.xml b/tools/build/conf/src/main/resources/onos/pmd.xml
index 156e6f9..19bac09 100644
--- a/tools/build/conf/src/main/resources/onos/pmd.xml
+++ b/tools/build/conf/src/main/resources/onos/pmd.xml
@@ -15,63 +15,59 @@
   ~ limitations under the License.
   -->
 <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    name="ONOS Rules"
-    xmlns="http://pmd.sf.net/ruleset/1.0.0"
-    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
-    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" >
+         name="ONOS Rules"
+         xmlns="http://pmd.sf.net/ruleset/1.0.0"
+         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
+         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">
 
     <description>ONOS PMD rules</description>
 
-    <rule ref="rulesets/java/unnecessary.xml" >
-        <exclude name="UselessParentheses" />
+
+    <rule ref="category/java/errorprone.xml">
+        <exclude name="EmptyCatchBlock"/>
     </rule>
-    <rule ref="rulesets/java/basic.xml">
-      <exclude name="EmptyCatchBlock"/>
+    <rule ref="category/java/errorprone.xml/EmptyCatchBlock">
+        <properties>
+            <property name="allowCommentedBlocks" value="true"/>
+        </properties>
     </rule>
-    <rule ref="rulesets/java/basic.xml/EmptyCatchBlock">
-      <properties>
-	<property name="allowCommentedBlocks" value="true"/>
-      </properties>
-    </rule>
-    <rule ref="rulesets/java/unusedcode.xml">
-      <!-- Explicit public keyword in interface methods is acceptable -->
-      <exclude name="UnusedModifier" />
-    </rule>
-    <rule ref="rulesets/java/imports.xml"/>
+    <rule ref="category/java/bestpractices.xml"/>
     <rule ref="rulesets/java/optimizations.xml">
-      <exclude name="LocalVariableCouldBeFinal" />
-      <exclude name="MethodArgumentCouldBeFinal" />
-      <exclude name="AvoidInstantiatingObjectsInLoops" />
+        <exclude name="AvoidInstantiatingObjectsInLoops"/>
     </rule>
 
     <rule ref="rulesets/java/strings.xml">
-      <exclude name="AvoidDuplicateLiterals" />
+        <exclude name="AvoidDuplicateLiterals"/>
     </rule>
     <rule ref="rulesets/java/braces.xml"/>
-    <rule ref="rulesets/java/naming.xml">
-      <exclude name="AvoidInstantiatingObjectsInLoops" />
-      <exclude name="ShortClassName" />
-      <exclude name="ShortMethodName" />
-      <exclude name="ShortVariable" />
-      <exclude name="LongVariable" />
+    <rule ref="category/java/codestyle.xml">
+        <!-- Explicit public keyword in interface methods is acceptable -->
+        <exclude name="UnnecessaryModifier"/>
+        <exclude name="UselessParentheses"/>
+        <exclude name="ShortClassName"/>
+        <exclude name="ShortMethodName"/>
+        <exclude name="ShortVariable"/>
+        <exclude name="LongVariable"/>
+        <exclude name="MethodArgumentCouldBeFinal"/>
+        <exclude name="LocalVariableCouldBeFinal"/>
     </rule>
-    <rule ref="rulesets/java/naming.xml/VariableNamingConventions">
-      <properties>
-	<!--  ONOS allows the name "log" for static final Loggers -->
-	<property name="violationSuppressRegex" value=".*'log'.*"/>
-      </properties>
+    <rule ref="category/java/codestyle.xml/VariableNamingConventions">
+        <properties>
+            <!--  ONOS allows the name "log" for static final Loggers -->
+            <property name="violationSuppressRegex" value=".*'log'.*"/>
+        </properties>
     </rule>
 
     <rule ref="rulesets/java/clone.xml"/>
     <rule ref="rulesets/java/strictexception.xml"/>
     <rule ref="rulesets/java/design.xml">
-      <exclude name="GodClass" />
+        <exclude name="GodClass"/>
     </rule>
     <rule ref="rulesets/java/coupling.xml">
-      <exclude name="LawOfDemeter" />
-      <exclude name="ExcessiveImports" />
-      <!-- Suppress Removed misconfigured rule warning -->
-      <exclude name="LoosePackageCoupling" />
+        <exclude name="LawOfDemeter"/>
+        <exclude name="ExcessiveImports"/>
+        <!-- Suppress Removed misconfigured rule warning -->
+        <exclude name="LoosePackageCoupling"/>
     </rule>
 </ruleset>