Updating Buck files to build OSGi jars
- Using osgi_jar for all modules except apps
- Adding target for installation of core modules to .m2 repo
Change-Id: I65d9e3a9567918e275191724842d7d9b1f485128
diff --git a/bucklets/onos.bucklet b/bucklets/onos.bucklet
index 8bb6811..c7837b3 100644
--- a/bucklets/onos.bucklet
+++ b/bucklets/onos.bucklet
@@ -1,3 +1,4 @@
+import random
DEBUG_ARG='JAVA_TOOL_OPTIONS="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=y"'
@@ -82,16 +83,18 @@
)
### .m2 Install
- mvn_cmd = ' '.join(('mvn install:install-file',
- '-Dfile=$(location :%s)' % name,
- '-DgroupId=%s' % group_id,
- '-DartifactId=%s' % name,
- '-Dversion=%s' % version,
- '-Dpackaging=jar'
- ))
+ mvn_cmd = ' '.join(( 'mvn install:install-file',
+ '-Dfile=$(location :%s)' % name,
+ '-DgroupId=%s' % group_id,
+ '-DartifactId=%s' % name,
+ '-Dversion=%s' % version,
+ '-Dpackaging=jar' ))
+ # TODO This rule must be run every time, adding random number as rule input.
+ # We should make this configurable, perhaps with a flag.
+ cmd = 'FOO=%s ' % random.random() + mvn_cmd + ' > $OUT'
genrule(
name = name + '-install',
- bash = mvn_cmd + ' > $OUT',
+ bash = cmd,
out = 'install.log',
visibility = visibility,
)