blob: 2b1d0fbfe705c3b087fb2e812f32a264c8e90dbb [file] [log] [blame]
Ray Milkeyf80bbb22016-03-11 10:16:22 -08001SRC = 'src/main/java/org/onosproject/**/'
Brian O'Connor85f28d02016-04-05 20:31:18 -07002TEST = 'src/test/java/org/onosproject/**/'
Brian O'Connorb86c9202016-04-05 20:15:04 -07003RESOURCES_ROOT = 'src/main/resources/'
Ray Milkeyf80bbb22016-03-11 10:16:22 -08004
5CURRENT_NAME = 'onos-rest'
6CURRENT_TARGET = ':' + CURRENT_NAME
7
8COMPILE_DEPS = [
9 '//lib:CORE_DEPS',
Brian O'Connorb86c9202016-04-05 20:15:04 -070010 '//incubator/api:onos-incubator-api',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080011 '//lib:javax.ws.rs-api',
12 '//utils/rest:onlab-rest',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080013]
14
15TEST_DEPS = [
Ray Milkey7c251822016-04-06 17:38:25 -070016 '//lib:TEST_REST',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080017]
18
Brian O'Connorb86c9202016-04-05 20:15:04 -070019osgi_jar(
Ray Milkeyf80bbb22016-03-11 10:16:22 -080020 name = CURRENT_NAME,
21 srcs = glob([SRC + '/*.java']),
Brian O'Connorb86c9202016-04-05 20:15:04 -070022 resources = glob([RESOURCES_ROOT + '**']),
23 resources_root = RESOURCES_ROOT,
Ray Milkeyf80bbb22016-03-11 10:16:22 -080024 deps = COMPILE_DEPS,
25 visibility = ['PUBLIC'],
Brian O'Connorb86c9202016-04-05 20:15:04 -070026 debug = False,
27 web_context = '/onos/v1'
Ray Milkeyf80bbb22016-03-11 10:16:22 -080028)
29
Ray Milkey7c251822016-04-06 17:38:25 -070030SOURCE_JAR = CURRENT_TARGET + '-jar'
Ray Milkeyf80bbb22016-03-11 10:16:22 -080031java_test(
Ray Milkey7c251822016-04-06 17:38:25 -070032 name = 'onos-rest-tests',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080033 srcs = glob([TEST + '/*.java']),
34 deps = COMPILE_DEPS +
35 TEST_DEPS +
Ray Milkey7c251822016-04-06 17:38:25 -070036 [SOURCE_JAR],
37 source_under_test = [SOURCE_JAR],
38 visibility = ['PUBLIC'],
39 resources_root = 'src/test/resources',
40 resources = glob(['src/test/resources/**']),
Ray Milkeyf80bbb22016-03-11 10:16:22 -080041)