Correct SONA imported pkgs, avoid duplicated dependencies embedding
Change-Id: I08846b14fb82e120a5edc02d21fa035b3a280032
diff --git a/apps/openstacknetworking/BUCK b/apps/openstacknetworking/BUCK
index d1e59f3..ba0f6db 100644
--- a/apps/openstacknetworking/BUCK
+++ b/apps/openstacknetworking/BUCK
@@ -1,3 +1,41 @@
+def get_openstack4j_deps_path():
+
+ WEB_INF_PATH = 'WEB-INF/classes/deps/'
+ OPENSTACK4J_DEPS = [
+ 'openstack4j-core',
+ 'openstack4j-http-connector',
+ 'openstack4j-httpclient',
+ ]
+ OPENSTACK4J_VER = '3.1.0'
+
+ openstack_deps_path = ''
+
+ for dep in OPENSTACK4J_DEPS:
+ name = dep + '-' + OPENSTACK4J_VER + '.jar'
+ path = WEB_INF_PATH + name
+ openstack_deps_path = openstack_deps_path + path + ','
+
+ return openstack_deps_path
+
+def get_jackson_deps_path():
+
+ WEB_INF_PATH = 'WEB-INF/classes/deps/'
+ JACKSON_DEPS_WITH_VER = [
+ 'json-patch-1.9.jar',
+ 'jackson-coreutils-1.6.jar',
+ 'msg-simple-1.1.jar',
+ 'btf-1.2.jar',
+ 'snakeyaml-1.15.jar'
+ ]
+
+ jackson_deps_path = ''
+
+ for dep in JACKSON_DEPS_WITH_VER:
+ path = WEB_INF_PATH + dep
+ jackson_deps_path = jackson_deps_path + path + ','
+
+ return jackson_deps_path
+
COMPILE_DEPS = [
'//lib:CORE_DEPS',
'//lib:JACKSON',
@@ -30,22 +68,9 @@
'//apps/openstacknetworking:onos-apps-openstacknetworking',
]
-RESOURCES = {
- 'openstack4j-core-3.1.0.jar': 'src/main/resources/deps/openstack4j-core-3.1.0.jar',
- 'openstack4j-http-connector-3.1.0.jar': 'src/main/resources/deps/openstack4j-http-connector-3.1.0.jar',
- 'openstack4j-httpclient-3.1.0.jar': 'src/main/resources/deps/openstack4j-httpclient-3.1.0.jar',
- 'json-patch-1.9.jar': 'src/main/resources/deps/json-patch-1.9.jar',
- 'jackson-coreutils-1.6.jar': 'src/main/resources/deps/jackson-coreutils-1.6.jar',
- 'msg-simple-1.1.jar': 'src/main/resources/deps/msg-simple-1.1.jar',
- 'btf-1.2.jar': 'src/main/resources/deps/btf-1.2.jar',
- 'snakeyaml-1.15.jar': 'src/main/resources/deps/snakeyaml-1.15.jar',
-}
-
-OPENSTACK4J_LIB = 'openstack4j-core-3.1.0.jar,openstack4j-http-connector-3.1.0.jar,openstack4j-httpclient-3.1.0.jar'
-JACKSON_LIB = 'json-patch-1.9.jar,jackson-coreutils-1.6.jar,msg-simple-1.1.jar,btf-1.2.jar,snakeyaml-1.15.jar'
-
-INCLUDE_PACKAGES = 'com.google.common.net,com.google.common.io,com.fasterxml.jackson.annotation,*'
+INCLUDE_PACKAGES = 'com.google.common.net,com.google.common.io,com.fasterxml.jackson.annotation'
EXCLUDE_PACKAGES = '!org.openstack4j,!org.openstack4j.*'
+ALL_PACKAGES = '*'
osgi_jar_with_tests (
deps = COMPILE_DEPS,
@@ -57,9 +82,8 @@
api_package = 'org.onosproject.openstacknetworking.web',
# dependency embedding
- include_resources = RESOURCES,
- import_packages = INCLUDE_PACKAGES + ',' + EXCLUDE_PACKAGES,
- bundle_classpath = OPENSTACK4J_LIB + ',' + JACKSON_LIB
+ import_packages = INCLUDE_PACKAGES + ',' + EXCLUDE_PACKAGES + ',' + ALL_PACKAGES,
+ bundle_classpath = get_openstack4j_deps_path() + get_jackson_deps_path()
)
onos_app (