Remove all references to java_library in the source BUCK build.
Change-Id: Ie0e8753b62aeff9c4b5476b0108d05e92e3decdb
diff --git a/apps/cip/BUCK b/apps/cip/BUCK
index aba9512..9afbab3 100644
--- a/apps/cip/BUCK
+++ b/apps/cip/BUCK
@@ -1,29 +1,14 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-app-cip'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
COMPILE_DEPS = [
'//lib:CORE_DEPS',
]
-TEST_DEPS = [
- '//lib:TEST',
-]
-
-java_library(
- name = CURRENT_NAME,
- srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
)
-java_test(
- name = 'tests',
- srcs = glob([TEST + '/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [CURRENT_TARGET],
- source_under_test = [CURRENT_TARGET],
+onos_app (
+ title = 'Cluster IP alias App',
+ category = 'Utility',
+ url = 'http://onosproject.org',
+ description = 'ONOS Cluster IP alias application.',
)
diff --git a/apps/drivermatrix/BUCK b/apps/drivermatrix/BUCK
index 0dccec6..0151d40 100644
--- a/apps/drivermatrix/BUCK
+++ b/apps/drivermatrix/BUCK
@@ -1,33 +1,19 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-app-drivermatrix'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
]
-TEST_DEPS = [
- '//lib:TEST',
-]
-
-java_library(
- name = CURRENT_NAME,
- srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
-java_test(
- name = 'tests',
- srcs = glob([TEST + '/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [CURRENT_TARGET],
- source_under_test = [CURRENT_TARGET],
+onos_app (
+ title = 'Driver Support Matrix',
+ category = 'Utility',
+ url = 'http://onosproject.org',
+ description = 'Driver behaviour support matrix.',
)
+
diff --git a/apps/events/BUCK b/apps/events/BUCK
index c7049a6..3b95037 100644
--- a/apps/events/BUCK
+++ b/apps/events/BUCK
@@ -1,33 +1,18 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-app-events'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
]
-TEST_DEPS = [
- '//lib:TEST',
-]
-
-java_library(
- name = CURRENT_NAME,
- srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
-java_test(
- name = 'tests',
- srcs = glob([TEST + '/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [CURRENT_TARGET],
- source_under_test = [CURRENT_TARGET],
+onos_app (
+ title = 'Event History App',
+ category = 'Utility',
+ url = 'http://onosproject.org',
+ description = 'App to display ONOS event history.',
)
diff --git a/apps/flowanalyzer/BUCK b/apps/flowanalyzer/BUCK
index a47701d..b09e7d4 100644
--- a/apps/flowanalyzer/BUCK
+++ b/apps/flowanalyzer/BUCK
@@ -1,9 +1,3 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-app-flowanalyzer'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
@@ -14,20 +8,16 @@
'//lib:TEST_ADAPTERS',
]
-java_library(
- name = CURRENT_NAME,
- srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
+ test_deps = TEST_DEPS,
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
-java_test(
- name = 'tests',
- srcs = glob([TEST + '/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [CURRENT_TARGET],
- source_under_test = [CURRENT_TARGET],
+onos_app (
+ title = 'Flow Space Analysis App',
+ category = 'Monitoring',
+ url = 'http://onosproject.org',
+ description = 'Simple flow space analyzer.',
)
diff --git a/apps/test/BUCK b/apps/test/BUCK
deleted file mode 100644
index 8e97d9b..0000000
--- a/apps/test/BUCK
+++ /dev/null
@@ -1,137 +0,0 @@
-SRC = 'src/main/java/org/onosproject/**/'
-#FIXME there are some tests in main
-TEST = 'src/test/java/org/onosproject/**/'
-
-COMPILE_DEPS = [
- '//lib:CORE_DEPS',
- '//lib:org.apache.karaf.shell.console',
- '//cli:onos-cli',
- '//utils/rest:onlab-rest',
- '//lib:javax.ws.rs-api',
- '//core/store/serializers:onos-core-serializers',
-]
-
-TEST_DEPS = [
- '//lib:TEST',
-]
-
-java_library(
- name = 'onos-app-test',
- visibility = ['PUBLIC'],
- deps = [':onos-app-demo',
- ':onos-app-distributed-primitives',
- ':onos-app-election',
- ':onos-app-intent-perf',
- ':onos-app-loadtest',
- ':onos-app-messaging-perf',
- ],
-)
-
-# demo
-
-java_library(
- name = 'onos-app-demo',
- srcs = glob(['demo/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-demo-tests',
- srcs = glob(['demo/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-demo'],
- source_under_test = [':onos-app-demo'],
-)
-
-# distributed-primitives
-
-java_library(
- name = 'onos-app-distributed-primitives',
- srcs = glob(['distributed-primitives/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-distributed-primitives-tests',
- srcs = glob(['distributed-primitives/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-distributed-primitives'],
- source_under_test = [':onos-app-distributed-primitives'],
-)
-
-# election
-
-java_library(
- name = 'onos-app-election',
- srcs = glob(['election/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-election-tests',
- srcs = glob(['election/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-election'],
- source_under_test = [':onos-app-election'],
-)
-
-# intent-perf
-
-java_library(
- name = 'onos-app-intent-perf',
- srcs = glob(['intent-perf/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-intent-perf-tests',
- srcs = glob(['intent-perf/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-intent-perf'],
- source_under_test = [':onos-app-intent-perf'],
-)
-
-# loadtest
-
-java_library(
- name = 'onos-app-loadtest',
- srcs = glob(['loadtest/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-loadtest-tests',
- srcs = glob(['loadtest/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-loadtest'],
- source_under_test = [':onos-app-loadtest'],
-)
-
-# messaging-perf
-
-java_library(
- name = 'onos-app-messaging-perf',
- srcs = glob(['messaging-perf/' + SRC + '*.java']),
- deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
-)
-
-java_test(
- name = 'onos-app-messaging-perf-tests',
- srcs = glob(['messaging-perf/' + TEST + '*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [':onos-app-messaging-perf'],
- source_under_test = [':onos-app-messaging-perf'],
-)
-
diff --git a/apps/test/demo/BUCK b/apps/test/demo/BUCK
new file mode 100644
index 0000000..0993ed4
--- /dev/null
+++ b/apps/test/demo/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//cli:onos-cli',
+ '//utils/rest:onlab-rest',
+ '//lib:javax.ws.rs-api',
+ '//core/store/serializers:onos-core-serializers',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'Flow Throughput Demo App',
+ category = 'Test',
+ url = 'http://onosproject.org',
+ description = 'Flow throughput test application.',
+)
diff --git a/apps/test/distributed-primitives/BUCK b/apps/test/distributed-primitives/BUCK
new file mode 100644
index 0000000..f50042f
--- /dev/null
+++ b/apps/test/distributed-primitives/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//cli:onos-cli',
+ '//utils/rest:onlab-rest',
+ '//lib:javax.ws.rs-api',
+ '//core/store/serializers:onos-core-serializers',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'Distributed Primitives Test App',
+ category = 'Test',
+ url = 'http://onosproject.org',
+ description = 'ONOS app to test distributed primitives.',
+)
diff --git a/apps/test/election/BUCK b/apps/test/election/BUCK
new file mode 100644
index 0000000..9822348
--- /dev/null
+++ b/apps/test/election/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//cli:onos-cli',
+ '//utils/rest:onlab-rest',
+ '//lib:javax.ws.rs-api',
+ '//core/store/serializers:onos-core-serializers',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'Master Election Test App',
+ category = 'Test',
+ url = 'http://onosproject.org',
+ description = 'Master election test application.',
+)
diff --git a/apps/test/flow-perf/BUCK b/apps/test/flow-perf/BUCK
new file mode 100644
index 0000000..f065aab
--- /dev/null
+++ b/apps/test/flow-perf/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//cli:onos-cli',
+ '//utils/rest:onlab-rest',
+ '//lib:javax.ws.rs-api',
+ '//core/store/serializers:onos-core-serializers',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'Flow Performance Test App',
+ category = 'Test',
+ url = 'http://onosproject.org',
+ description = 'Messaging performance test application.',
+)
diff --git a/apps/test/intent-perf/BUCK b/apps/test/intent-perf/BUCK
new file mode 100644
index 0000000..a57a16a
--- /dev/null
+++ b/apps/test/intent-perf/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//cli:onos-cli',
+ '//utils/rest:onlab-rest',
+ '//lib:javax.ws.rs-api',
+ '//core/store/serializers:onos-core-serializers',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'Intent Performance Test App',
+ category = 'Test',
+ url = 'http://onosproject.org',
+ description = 'Intent performance test application.',
+)
diff --git a/apps/test/loadtest/BUCK b/apps/test/loadtest/BUCK
new file mode 100644
index 0000000..933cbce
--- /dev/null
+++ b/apps/test/loadtest/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//cli:onos-cli',
+ '//utils/rest:onlab-rest',
+ '//lib:javax.ws.rs-api',
+ '//core/store/serializers:onos-core-serializers',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'Distributed Load Test App',
+ category = 'Test',
+ url = 'http://onosproject.org',
+ description = 'Distributed consensus load test application.',
+)
diff --git a/apps/test/messaging-perf/BUCK b/apps/test/messaging-perf/BUCK
new file mode 100644
index 0000000..766a707
--- /dev/null
+++ b/apps/test/messaging-perf/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:org.apache.karaf.shell.console',
+ '//cli:onos-cli',
+ '//utils/rest:onlab-rest',
+ '//lib:javax.ws.rs-api',
+ '//core/store/serializers:onos-core-serializers',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+)
+
+onos_app (
+ title = 'Messaging Performance Test App',
+ category = 'Test',
+ url = 'http://onosproject.org',
+ description = 'Messaging performance test application.',
+)
diff --git a/apps/xos-integration/BUCK b/apps/xos-integration/BUCK
index 198cc6b..c1fb6c7 100644
--- a/apps/xos-integration/BUCK
+++ b/apps/xos-integration/BUCK
@@ -1,9 +1,3 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-app-xos-integration'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:jersey-client',
@@ -13,24 +7,16 @@
'//utils/rest:onlab-rest',
]
-TEST_DEPS = [
- '//lib:TEST',
-]
-
-java_library(
- name = CURRENT_NAME,
- srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
deps = COMPILE_DEPS,
- visibility = ['PUBLIC'],
+ import_packages = '*,org.onosproject.cli.net',
resources_root = 'src/main/resources',
resources = glob(['src/main/resources/**']),
)
-java_test(
- name = 'tests',
- srcs = glob([TEST + '/*.java']),
- deps = COMPILE_DEPS +
- TEST_DEPS +
- [CURRENT_TARGET],
- source_under_test = [CURRENT_TARGET],
+onos_app (
+ title = 'ONOS XOS Integration App',
+ category = 'Utility',
+ url = 'http://onosproject.org',
+ description = 'ONOS XOS integration application.',
)