getting javadoc to build

Change-Id: I7f214c6ce5a876f458626e12c8cfdd3072ad107f
diff --git a/docs/BUCK b/docs/BUCK
new file mode 100644
index 0000000..b82dc82
--- /dev/null
+++ b/docs/BUCK
@@ -0,0 +1,198 @@
+external_deps = UTILS + API + [
+  '//apps/cpman/api:onos-apps-cpman-api',
+  '//apps/routing-api:onos-apps-routing-api',
+  '//apps/dhcp/api:onos-apps-dhcp-api',
+]
+
+external_groups = [
+  ( 'Network Model & Services', [ 'org.onosproject.*' ]),
+  ( 'Incubator for Network Model & Services',  [ 'org.onosproject.incubator.*' ]),
+  ( 'Utilities', [ 'org.onlab.*' ]),
+  ( 'App & Extensions', [
+      'org.onosproject.dhcp',
+      'org.onosproject.cpman',
+      'org.onosproject.routing',
+  ]),
+]
+
+internal_groups = [
+  ( 'Network Model & Services', [ 'org.onosproject.*' ]),
+  ( 'Incubator for Network Model & Services', [ 'org.onosproject.incubator.*' ]),
+  ( 'Core Subsystems', [
+  'org.onosproject.cfg.impl',
+  'org.onosproject.cluster.impl',
+  'org.onosproject.core.impl',
+  'org.onosproject.event.impl',
+  'org.onosproject.net.config.impl',
+  'org.onosproject.net.device.impl',
+  'org.onosproject.net.driver.impl',
+  'org.onosproject.net.edgeservice.impl',
+  'org.onosproject.net.flow.impl',
+  'org.onosproject.net.flowobjective.impl',
+  'org.onosproject.net.flowobjective.impl.composition',
+  'org.onosproject.net.group.impl',
+  'org.onosproject.net.host.impl',
+  'org.onosproject.net.intent.impl',
+  'org.onosproject.net.intent.impl.compiler',
+  'org.onosproject.net.intent.impl.phase',
+  'org.onosproject.net.link.impl',
+  'org.onosproject.net.newresource.impl',
+  'org.onosproject.net.packet.impl',
+  'org.onosproject.net.proxyarp.impl',
+  'org.onosproject.net.resource.impl',
+  'org.onosproject.net.statistic.impl',
+  'org.onosproject.net.topology.impl',
+  'org.onosproject.json',
+  'org.onosproject.json.*',
+  'org.onosproject.common.*',
+  'org.onosproject.security.impl',
+  'org.onosproject.security.store',
+  ]),
+  ( 'Distributed Stores', [
+  'org.onosproject.store.*',
+  'org.onosproject.persistence.impl',
+  ]),
+  ( 'Incubator for Core Subsystems & Distributed Stores', [
+  'org.onosproject.incubator.net.impl',
+  'org.onosproject.incubator.store.impl',
+  'org.onosproject.incubator.net.resource.label.impl',
+  'org.onosproject.incubator.store.resource.impl',
+  'org.onosproject.incubator.net.tunnel.impl',
+  'org.onosproject.incubator.store.tunnel.impl',
+  'org.onosproject.incubator.net.config.impl',
+  'org.onosproject.incubator.net.domain.impl',
+  'org.onosproject.incubator.store.config.impl',
+  'org.onosproject.incubator.net.intf.impl',
+  'org.onosproject.incubator.net.meter.impl',
+  'org.onosproject.incubator.net.resource.label',
+  'org.onosproject.incubator.store.meter.impl',
+  ]),
+  ( 'Utilities', [ 'org.onlab.*' ]),
+  ( 'GUI, REST & Command-Line', [
+  'org.onosproject.ui.impl*',
+  'org.onosproject.rest.*',
+  'org.onosproject.cli*',
+  'org.onosproject.codec.impl',
+  ]),
+  ( 'Builtin Applications', [
+  'org.onosproject.app.*',
+  'org.onosproject.acl*',
+  'org.onosproject.aaa',
+  'org.onosproject.fwd',
+  'org.onosproject.dhcp*',
+  'org.onosproject.flowanalyzer',
+  'org.onosproject.cpman*',
+  'org.onosproject.mobility',
+  'org.onosproject.proxyarp',
+  'org.onosproject.calendar',
+  'org.onosproject.olt*',
+  'org.onosproject.optical*',
+  'org.onosproject.newoptical*',
+  'org.onosproject.sdnip',
+  'org.onosproject.sdnip.*',
+  'org.onosproject.config',
+  'org.onosproject.routing',
+  'org.onosproject.routing*',
+  'org.onosproject.bgprouter',
+  'org.onosproject.segmentrouting*',
+  'org.onosproject.reactive.routing*',
+  'org.onosproject.messagingperf',
+  'org.onosproject.virtualbng*',
+  'org.onosproject.cordfabric*',
+  'org.onosproject.xosintegration*',
+  'org.onosproject.cip*',
+  'org.onosproject.vtn*',
+  'org.onosproject.cord*',
+  'org.onosproject.mcast*',
+  'org.onosproject.mfwd*',
+  'org.onosproject.mlb*',
+  'org.onosproject.igmp*',
+  'org.onosproject.pim*',
+  'org.onosproject.vpls*',
+  'org.onosproject.vrouter*',
+  'org.onosproject.faultmanagement*',
+  'org.onosproject.iptopology*',
+  'org.onosproject.drivermatrix*',
+  'org.onosproject.pathpainter*',
+  'org.onosproject.openstack*',
+  'org.onosproject.scalablegateway*',
+  'org.onosproject.forwarder*',
+  'org.onosproject.sfc*',
+  'org.onosproject.netcfgmonitor*',
+  'org.onosproject.flowperf',
+  'org.onosproject.loadtest',
+  'org.onosproject.events',
+  'org.onosproject.bmv2*',
+  'org.onosproject.xosclient*',
+  'org.onosproject.kafkaintegration*',
+  'org.onosproject.gangliametrics*',
+  'org.onosproject.graphitemetrics*',
+  'org.onosproject.influxdbmetrics*',
+  'org.onosproject.yms*',
+  ]),
+  ( 'Test Instrumentation & Applications', [
+  'org.onosproject.metrics.*',
+  'org.onosproject.demo*',
+  'org.onosproject.election*',
+  'org.onosproject.distributedprimitives*',
+  'org.onosproject.intentperf*',
+  'org.onosproject.messagingperf*',
+  'org.onosproject.optical.testapp*',
+  ]),
+  ( 'OpenFlow Providers & Controller', [
+  'org.onosproject.openflow.*',
+  'org.onosproject.provider.of.*',
+  ]),
+  ( 'NetConf Protocol & Providers', [
+  'org.onosproject.netconf*',
+  'org.onosproject.provider.netconf*',
+  ]),
+  ( 'OVSDB Protocol & Providers', [
+  'org.onosproject.provider.ovsdb*',
+  'org.onosproject.ovsdb*',
+  ]),
+  ( 'PCEP Protocol & Providers', [
+  'org.onosproject.pce.*',
+  'org.onosproject.pcerest*',
+  'org.onosproject.pceweb*',
+  'org.onosproject.pcep*',
+  'org.onosproject.pcepio*',
+  'org.onosproject.provider.pcep*',
+  ]),
+  ( 'BGP-LS Protocol & Providers', [
+  'org.onosproject.bgp.controller*',
+  'org.onosproject.bgp*',
+  'org.onosproject.provider.bgp*',
+  ]),
+  ( 'OSPF Protocol & Providers', [ 'org.onosproject.ospf*' ]),
+  ( 'ISIS Protocol & Providers', [ 'org.onosproject.isis*' ]),
+  ( 'LISP Protocol & Providers', [ 'org.onosproject.lisp*' ]),
+  ( 'SNMP Protocol & Providers', [ 'org.onosproject.snmp*' ]),
+  ( 'REST Protocol & Providers', [
+  'org.onosproject.protocol.rest*',
+  'org.onosproject.provider.rest*',
+  ]),
+  ( 'Other Providers', [
+  'org.onosproject.provider.*',
+  'org.onosproject.protocol.*',
+  ]),
+  ( 'Device Drivers', [ 'org.onosproject.driver*' ]),
+]
+
+project_javadoc(
+  name = 'external',
+  project_title = 'ONOS Java API (%s)' % ONOS_VERSION,
+  javadoc_files = glob(['src/main/javadoc/doc-files/*']),
+  overview = 'src/main/javadoc/overview.html',
+  deps = external_deps,
+  groups = external_groups,
+)
+
+project_javadoc(
+  name = 'internal',
+  project_title = 'ONOS Java API (%s)' % ONOS_VERSION,
+  javadoc_files = glob(['src/main/javadoc/doc-files/*']),
+  overview = 'src/main/javadoc/overview.html',
+  deps = CORE,
+  groups = internal_groups,
+)