blob: b1a9a7c204d8b8517f094d19ae872d858356c265 [file] [log] [blame]
SRC = 'src/main/java/org/onosproject/**/'
TEST = 'src/test/java/org/onosproject/**/'
RESOURCES_ROOT = 'src/main/resources/'
CURRENT_NAME = 'onos-gui'
CURRENT_TARGET = ':' + CURRENT_NAME
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:javax.ws.rs-api',
'//lib:servlet-api',
'//lib:jetty-websocket',
'//lib:jetty-util',
'//lib:jersey-media-multipart',
'//incubator/api:onos-incubator-api',
'//incubator/net:onos-incubator-net',
'//utils/rest:onlab-rest',
'//core/store/serializers:onos-core-serializers',
]
TEST_DEPS = [
'//lib:TEST',
]
RESOURCES = [
'WEB-INF/classes/index.html=src/main/webapp/index.html',
'WEB-INF/classes/login.html=src/main/webapp/login.html',
'WEB-INF/classes/error.html=src/main/webapp/error.html',
'WEB-INF/classes/not-ready.html=src/main/webapp/not-ready.html',
'WEB-INF/classes/onos.js=src/main/webapp/onos.js',
'WEB-INF/classes/nav.html=src/main/webapp/nav.html',
'WEB-INF/classes/app/view=src/main/webapp/app/view',
'WEB-INF/classes/raw=src/main/webapp/raw',
]
osgi_jar(
name = CURRENT_NAME,
srcs = glob([SRC + '/*.java']),
resources = glob([RESOURCES_ROOT + '**']),
resources_root = RESOURCES_ROOT,
deps = COMPILE_DEPS,
visibility = ['PUBLIC'],
include_resources = ','.join(RESOURCES),
web_context = '/onos/ui',
debug = False,
)
java_test(
name = 'tests',
srcs = glob([TEST + '/*.java']),
deps = COMPILE_DEPS +
TEST_DEPS +
[CURRENT_TARGET],
source_under_test = [CURRENT_TARGET],
)