| 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/**']), |
| ) |