app buck refactor for apps: aaa, acl, bgprouter

Change-Id: Iaa970e3a937cc1df0aff29cc45f4c08c2d79cd13
diff --git a/BUCK b/BUCK
index da39409..2fe2ca5 100644
--- a/BUCK
+++ b/BUCK
@@ -1,9 +1,3 @@
-SRC = 'src/main/java/org/onosproject/**/'
-TEST = 'src/test/java/org/onosproject/**/'
-
-CURRENT_NAME = 'onos-app-aaa'
-CURRENT_TARGET = ':' + CURRENT_NAME
-
 COMPILE_DEPS = [
     '//lib:CORE_DEPS',
     '//lib:org.apache.karaf.shell.console',
@@ -15,18 +9,14 @@
     '//core/common:onos-core-common',
 ]
 
-java_library(
-    name = CURRENT_NAME,
-    srcs = glob([SRC + '/*.java']),
+osgi_jar_with_tests (
     deps = COMPILE_DEPS,
-    visibility = ['PUBLIC'],
+    test_deps = TEST_DEPS,
 )
 
-java_test(
-    name = 'tests',
-    srcs = glob([TEST + '/*.java']),
-    deps = COMPILE_DEPS +
-           TEST_DEPS +
-           [CURRENT_TARGET],
-    source_under_test = [CURRENT_TARGET],
+onos_app (
+    title = 'Authentication App',
+    category = 'Security',
+    url = 'http://onosproject.org',
+    description = 'ONOS authentication application.',
 )