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