BUCK
984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
RESOURCES_ROOT = 'src/main/resources/'
CURRENT_NAME = 'onos-rest'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
'//lib:javax.ws.rs-api',
'//utils/rest:onlab-rest',
]
TEST_DEPS = [
'//lib:TEST_REST',
]
osgi_jar(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
resources = glob([RESOURCES_ROOT + '**']),
resources_root = RESOURCES_ROOT,
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
debug = False,
web_context = '/onos/v1'
)
SOURCE_JAR = CURRENT_TARGET + '-jar'
java_test(
name = 'onos-rest-tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[SOURCE_JAR],
source_under_test = [SOURCE_JAR],
visibility = ['PUBLIC'],
resources_root = 'src/test/resources',
resources = glob(['src/test/resources/**']),
)