diff --git a/apps/tenbi/BUCK b/apps/tenbi/BUCK index 30ed481a12..461fddd882 100644 --- a/apps/tenbi/BUCK +++ b/apps/tenbi/BUCK @@ -11,8 +11,8 @@ onos_app ( url = 'http://onosproject.org', included_bundles = BUNDLES, description = 'TE YANG NBI.', - required_apps = [ 'org.onosproject.onos-app-tetopology', - 'org.onosproject.onos-app-tetunnel', - 'org.onosproject.onos-app-yms' ], + required_apps = [ 'org.onosproject.tetopology', + 'org.onosproject.tetunnel', + 'org.onosproject.yms' ], ) diff --git a/apps/tenbi/yangmodel/BUCK b/apps/tenbi/yangmodel/BUCK index 4422110ff4..3ee4e7df26 100644 --- a/apps/tenbi/yangmodel/BUCK +++ b/apps/tenbi/yangmodel/BUCK @@ -2,7 +2,7 @@ COMPILE_DEPS = [ '//lib:CORE_DEPS' ] -yang_library( +yang_osgi_jar( deps = COMPILE_DEPS, name = 'onos-apps-tenbi-yangmodel', srcs = glob(['src/main/**/*.yang']), diff --git a/apps/yms/app/pom.xml b/apps/yms/app/pom.xml index 5da851d67c..1b6f0d4765 100644 --- a/apps/yms/app/pom.xml +++ b/apps/yms/app/pom.xml @@ -57,7 +57,7 @@ org.onosproject onos-yang-utils-generator - 1.10 + 1.11 diff --git a/apps/yms/pom.xml b/apps/yms/pom.xml index a351876198..1c1b65e314 100644 --- a/apps/yms/pom.xml +++ b/apps/yms/pom.xml @@ -39,7 +39,7 @@ org.onosproject onos-yang-datamodel - 1.10 + 1.11 diff --git a/buck-tools/default.defs b/buck-tools/default.defs index 9c72161d4a..0c556301bf 100644 --- a/buck-tools/default.defs +++ b/buck-tools/default.defs @@ -2,6 +2,7 @@ include_defs('//onos.defs') include_defs('//bucklets/maven_jar.bucklet') include_defs('//bucklets/onos.bucklet') include_defs('//bucklets/onos_app.bucklet') +include_defs('//bucklets/yang.bucklet') include_defs('//bucklets/remote_jar.bucklet') BASE_DEPS = [ diff --git a/bucklets/yang.bucklet b/bucklets/yang.bucklet new file mode 100644 index 0000000000..9c15a51706 --- /dev/null +++ b/bucklets/yang.bucklet @@ -0,0 +1,51 @@ +include_defs('//onos.defs') + +def _get_name(): + base_path = get_base_path() + return ONOS_ARTIFACT_BASE + base_path.replace('/', '-') #TODO Unix-separator + +def yang_osgi_jar( + name = None, + srcs = None, + group_id = ONOS_GROUP_ID, + version = ONOS_VERSION, + deps = [], + visibility = ['PUBLIC'], + license = 'NONE', + **kwargs + ): + + if name is None: + name = _get_name() + + yang_jar = name + '-yang' + bnd_jar = name + '-bnd' + + args = { 'group':group_id, 'artifact':name, 'version':version } + + yang_library( + deps = deps, + name = yang_jar, + srcs = srcs, + visibility = [ ], + ) + + cmd = 'java -jar $(location //lib:bndexe) wrap -o $OUT ' + cmd += '-b %(group)s.%(artifact)s ' % args + cmd += '-v ' + version.replace('-', '.') + ' ' + cmd += '$(location :%s) ' % yang_jar + cmd += ' >/dev/null 2>&1' + + genrule( + name = bnd_jar, + bash = cmd, + out = name + '.jar', + visibility = [], + ) + + prebuilt_jar( + name = name, + binary_jar = ':' + bnd_jar, + maven_coords = '%(group)s:%(artifact)s:%(version)s'%args, + visibility = visibility, + ) diff --git a/lib/BUCK b/lib/BUCK index 26a4910e54..907270b9ee 100644 --- a/lib/BUCK +++ b/lib/BUCK @@ -1,4 +1,4 @@ -# ***** This file was auto-generated at Fri Dec 02 15:14:44 IST 2016. Do not edit this file manually. ***** +# ***** This file was auto-generated at Fri Dec 16 13:24:41 PST 2016. Do not edit this file manually. ***** osgi_feature_group( name = 'COMPILE', visibility = ['PUBLIC'], @@ -1025,6 +1025,14 @@ remote_jar ( visibility = [ 'PUBLIC' ], ) +remote_jar ( + name = 'bndexe', + out = 'biz.aQute.bnd-3.1.0.jar', + url = 'http://onlab.vicci.org/onos/third-party/biz.aQute.bnd-3.1.0.jar', + sha1 = 'ebd6c2af025b66ea94a9fcb217c2699ba23d3ca2', + visibility = [ 'PUBLIC' ], +) + remote_jar ( name = 'cord-config', out = 'cord-config-1.0-b1.jar', diff --git a/lib/deps.json b/lib/deps.json index 6b4ee734b8..b9710ed156 100644 --- a/lib/deps.json +++ b/lib/deps.json @@ -189,6 +189,7 @@ "checkstyle": "mvn:com.puppycrawl.tools:checkstyle:6.11.2", "apache-karaf": "http://onlab.vicci.org/onos/third-party/apache-karaf-3.0.5-offline-20161115.tar.gz", "bndlib": "mvn:biz.aQute.bnd:biz.aQute.bndlib:jar:3.1.0", + "bndexe": "http://onlab.vicci.org/onos/third-party/biz.aQute.bnd-3.1.0.jar", "cord-config": "mvn:org.onosproject:cord-config:1.0-b1", "libthrift": "mvn:org.apache.thrift:libthrift:0.9.3", "qdox": "mvn:com.thoughtworks.qdox:qdox:2.0-M3",