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/**/' |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 3 | |
| 4 | COMPILE_DEPS = [ |
| 5 | '//lib:CORE_DEPS', |
| 6 | '//lib:org.apache.karaf.shell.console', |
| 7 | '//cli:onos-cli', |
| 8 | '//utils/rest:onlab-rest', |
| 9 | '//lib:javax.ws.rs-api', |
| 10 | '//core/store/serializers:onos-core-serializers', |
| 11 | '//incubator/api:onos-incubator-api', |
| 12 | ] |
| 13 | |
| 14 | TEST_DEPS = [ |
Ray Milkey | 7c25182 | 2016-04-06 17:38:25 -0700 | [diff] [blame^] | 15 | '//lib:TEST_REST', |
| 16 | '//utils/osgi:onlab-osgi-tests', |
| 17 | '//web/api:onos-rest-tests', |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 18 | ] |
| 19 | |
| 20 | java_library( |
| 21 | name = 'onos-app-vtn', |
| 22 | visibility = ['PUBLIC'], |
| 23 | deps = [':onos-app-sfc-mgr', |
| 24 | ':onos-app-vtn-mgr', |
| 25 | ':onos-app-vtn-rsc', |
| 26 | ':onos-app-vtn-web', |
| 27 | ], |
| 28 | ) |
| 29 | |
| 30 | # sfcmgr |
| 31 | |
| 32 | java_library( |
| 33 | name = 'onos-app-sfc-mgr', |
| 34 | srcs = glob(['sfcmgr/' + SRC + '*.java']), |
| 35 | deps = COMPILE_DEPS + [':onos-app-vtn-rsc'], |
| 36 | visibility = ['PUBLIC'], |
| 37 | ) |
| 38 | |
| 39 | java_test( |
| 40 | name = 'onos-app-sfc-mgr-tests', |
| 41 | srcs = glob(['sfcmgr/' + TEST + '*.java']), |
| 42 | deps = COMPILE_DEPS + |
| 43 | TEST_DEPS + |
| 44 | [':onos-app-sfc-mgr', ':onos-app-vtn-rsc'], |
| 45 | source_under_test = [':onos-app-sfc-mgr'], |
| 46 | ) |
| 47 | |
| 48 | # vtnmgr |
| 49 | |
| 50 | java_library( |
| 51 | name = 'onos-app-vtn-mgr', |
| 52 | srcs = glob(['vtnmgr/' + SRC + '*.java']), |
| 53 | deps = COMPILE_DEPS + [':onos-app-vtn-rsc'], |
| 54 | visibility = ['PUBLIC'], |
| 55 | resources_root = 'vtnmgr/src/main/resources', |
| 56 | resources = glob(['vtnmgr/src/main/resources/**']), |
| 57 | ) |
| 58 | |
| 59 | java_test( |
| 60 | name = 'onos-app-vtn-mgr-tests', |
| 61 | srcs = glob(['vtnmgr/' + TEST + '*.java']), |
| 62 | deps = COMPILE_DEPS + |
| 63 | TEST_DEPS + |
| 64 | [':onos-app-vtn-mgr', ':onos-app-vtn-rsc'], |
| 65 | source_under_test = [':onos-app-vtn-mgr'], |
| 66 | ) |
| 67 | |
| 68 | # vtnrsc |
| 69 | |
| 70 | java_library( |
| 71 | name = 'onos-app-vtn-rsc', |
| 72 | srcs = glob(['vtnrsc/' + SRC + '*.java']), |
| 73 | deps = COMPILE_DEPS, |
| 74 | visibility = ['PUBLIC'], |
| 75 | resources_root = 'vtnrsc/src/main/resources', |
| 76 | resources = glob(['vtnrsc/src/main/resources/**']), |
| 77 | ) |
| 78 | |
| 79 | java_test( |
| 80 | name = 'onos-app-vtn-rsc-tests', |
| 81 | srcs = glob(['vtnrsc/' + TEST + '*.java']), |
| 82 | deps = COMPILE_DEPS + |
| 83 | TEST_DEPS + |
| 84 | [':onos-app-vtn-rsc'], |
| 85 | source_under_test = [':onos-app-vtn-rsc'], |
| 86 | ) |
| 87 | |
| 88 | # vtnweb |
| 89 | |
| 90 | java_library( |
| 91 | name = 'onos-app-vtn-web', |
| 92 | srcs = glob(['vtnweb/' + SRC + '*.java']), |
| 93 | deps = COMPILE_DEPS + [':onos-app-vtn-rsc'], |
| 94 | visibility = ['PUBLIC'], |
| 95 | ) |
| 96 | |
| 97 | java_test( |
| 98 | name = 'onos-app-vtn-web-tests', |
| 99 | srcs = glob(['vtnweb/' + TEST + '*.java']), |
| 100 | deps = COMPILE_DEPS + |
| 101 | TEST_DEPS + |
| 102 | [':onos-app-vtn-web', ':onos-app-vtn-rsc'], |
| 103 | source_under_test = [':onos-app-vtn-web'], |
| 104 | resources_root = 'vtnweb/src/test/resources', |
| 105 | resources = glob(['vtnweb/src/test/resources/**']), |
| 106 | ) |