blob: df70a200469525d1c7f75e46aaa0061d8e08c5d4 [file] [log] [blame]
Thomas Vachuskaba4b5ec2018-06-28 13:48:29 -07001NODE_VERSION = 'v8.11.1'
Steven Burrowsa145e102017-06-16 13:37:50 -04002
Ray Milkeyf80bbb22016-03-11 10:16:22 -08003COMPILE_DEPS = [
4 '//lib:CORE_DEPS',
Ray Milkey446f4462017-08-17 15:36:01 -07005 '//lib:JACKSON',
6 '//lib:KRYO',
Ray Milkeyf80bbb22016-03-11 10:16:22 -08007 '//lib:javax.ws.rs-api',
8 '//lib:servlet-api',
9 '//lib:jetty-websocket',
10 '//lib:jetty-util',
11 '//lib:jersey-media-multipart',
Simon Hunt10973dd2016-08-01 15:50:35 -070012 '//lib:org.apache.karaf.shell.console',
13 '//cli:onos-cli',
Ray Milkey2a749832016-08-02 15:22:20 -070014 '//lib:jersey-server',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080015 '//incubator/api:onos-incubator-api',
16 '//incubator/net:onos-incubator-net',
17 '//utils/rest:onlab-rest',
18 '//core/store/serializers:onos-core-serializers',
Ray Milkey446f4462017-08-17 15:36:01 -070019 ':onos-tools-gui',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080020]
21
22TEST_DEPS = [
23 '//lib:TEST',
Ray Milkey0c2a28f2016-04-28 10:17:19 -070024 '//core/api:onos-api-tests',
Simon Huntf257a962017-08-25 18:58:47 -070025 '//drivers/default:onos-drivers-default',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080026]
27
Brian O'Connor79b70672016-10-20 13:44:52 -070028RESOURCES = {
29 'WEB-INF/classes/index.html': 'src/main/webapp/index.html',
30 'WEB-INF/classes/login.html': 'src/main/webapp/login.html',
31 'WEB-INF/classes/error.html': 'src/main/webapp/error.html',
32 'WEB-INF/classes/not-ready.html': 'src/main/webapp/not-ready.html',
33 'WEB-INF/classes/onos.js': 'src/main/webapp/onos.js',
34 'WEB-INF/classes/nav.html': 'src/main/webapp/nav.html',
35 'WEB-INF/classes/app/view': 'src/main/webapp/app/view',
36 'WEB-INF/classes/raw': 'src/main/webapp/raw',
37}
Brian O'Connore5817c92016-04-06 15:41:48 -070038
Steven Burrowsa145e102017-06-16 13:37:50 -040039include_defs('//bucklets/node.bucklet')
40sh_src='onos-gui-build'
41
Thomas Vachuskaba4b5ec2018-06-28 13:48:29 -070042fetch_node(version = NODE_VERSION)
Steven Burrowsa145e102017-06-16 13:37:50 -040043
44export_file (
45 name = 'onos-tools-gui-exe',
46 src = sh_src,
47 visibility = [ 'PUBLIC' ],
48)
49
50genrule(
51 name = 'onos-tools-gui',
Steven Burrowsad018202017-11-02 14:43:45 +000052 srcs = glob(['src/main/webapp/*.js', 'src/main/webapp/app/**/*.js'], excludes = ['src/main/webapp/dist/*.js']),
Steven Burrowsa145e102017-06-16 13:37:50 -040053 bash = '$(location :onos-tools-gui-exe) '
Ray Milkey6b3775a2018-06-28 11:18:44 -070054 + ' $(location :node-release-' + NODE_VERSION + ') '
Thomas Vachuskaba4b5ec2018-06-28 13:48:29 -070055 + '$(location :node-bin-' + NODE_VERSION + ') > $OUT',
Steven Burrowsa145e102017-06-16 13:37:50 -040056 out = 'onos-tools-gui.log',
57 visibility = [ 'PUBLIC' ],
58)
59
Brian O'Connore4da59d2016-04-08 00:32:18 -070060osgi_jar_with_tests (
61 name = 'onos-gui',
Ray Milkeyf80bbb22016-03-11 10:16:22 -080062 deps = COMPILE_DEPS,
Brian O'Connore4da59d2016-04-08 00:32:18 -070063 test_deps = TEST_DEPS,
Brian O'Connor79b70672016-10-20 13:44:52 -070064 include_resources = RESOURCES,
Brian O'Connore5817c92016-04-06 15:41:48 -070065 web_context = '/onos/ui',
Steven Burrowsa145e102017-06-16 13:37:50 -040066 do_javadocs = False,
Ray Milkeyf80bbb22016-03-11 10:16:22 -080067)