Brian O'Connor

Updating onos_app to add "wrap:" to features file for non-OSGi jars

Change-Id: I47b8e11918269c1a2f3b084d49264dcc9b87a053
......@@ -28,9 +28,28 @@ APP_HEADER = '''\
ARTIFACT = ' <artifact>%s</artifact>\n'
APP_FOOTER = '</app>'
NON_OSGI_TAG = 'NON-OSGI'
def mvnUrl(bundle):
return 'mvn:' + bundle.replace(':', '/')
#mvn-uri := 'mvn:' [ repository-url '!' ] group-id '/' artifact-id [ '/' [version] [ '/' [type] [ '/' classifier ] ] ] ]
parts = bundle.split(':')
prefix = 'mvn:'
suffix = ''
if len(parts) > 3:
parts.insert(2, parts.pop()) # move version to the 3rd position
if len(parts) >= 5:
# check classifier for special non-OSGi tag
i = parts[4].find(NON_OSGI_TAG)
if i == 0:
prefix = 'wrap:' + prefix
suffix = '$Bundle-SymbolicName=%s.%s&amp;Bundle-Version=%s' % tuple(parts[0:3])
if len(parts[4]) == len(NON_OSGI_TAG):
parts.pop() # pop off empty classifier
if parts[3].lower() == 'jar':
parts.pop() # pop off default extension: jar
else:
parts[4] = parts[4][len(NON_OSGI_TAG):]
return prefix + '/'.join(parts) + suffix
def generateFeatureFile(feature_name,
version,
......
# ***** This file was auto-generated at Fri Apr 22 16:32:01 PDT 2016. Do not edit this file manually. *****
# ***** This file was auto-generated at Mon Apr 25 15:01:03 PDT 2016. Do not edit this file manually. *****
java_library(
name = 'COMPILE',
visibility = ['PUBLIC'],
......@@ -247,7 +247,7 @@ remote_file(
prebuilt_jar(
name = 'catalyst-common',
binary_jar = ':catalyst-common-1.0.4.jar',
maven_coords = 'io.atomix.catalyst:catalyst-common:1.0.4',
maven_coords = 'io.atomix.catalyst:catalyst-common:jar:NON-OSGI:1.0.4',
visibility = [ 'PUBLIC' ],
)
......@@ -289,7 +289,7 @@ remote_file(
prebuilt_jar(
name = 'catalyst-transport',
binary_jar = ':catalyst-transport-1.0.4.jar',
maven_coords = 'io.atomix.catalyst:catalyst-transport:1.0.4',
maven_coords = 'io.atomix.catalyst:catalyst-transport:jar:NON-OSGI:1.0.4',
visibility = [ 'PUBLIC' ],
)
......@@ -373,7 +373,7 @@ remote_file(
prebuilt_jar(
name = 'commons-logging',
binary_jar = ':commons-logging-1.1.1.jar',
maven_coords = 'commons-logging:commons-logging:1.1.1',
maven_coords = 'commons-logging:commons-logging:jar:NON-OSGI:1.1.1',
visibility = [ 'PUBLIC' ],
)
......@@ -415,7 +415,7 @@ remote_file(
prebuilt_jar(
name = 'concurrent-trees',
binary_jar = ':concurrent-trees-2.4.0.jar',
maven_coords = 'com.googlecode.concurrent-trees:concurrent-trees:2.4.0',
maven_coords = 'com.googlecode.concurrent-trees:concurrent-trees:jar:NON-OSGI:2.4.0',
visibility = [ 'PUBLIC' ],
)
......@@ -429,7 +429,7 @@ remote_file(
prebuilt_jar(
name = 'copycat-api',
binary_jar = ':copycat-api-0.5.1.onos.jar',
maven_coords = 'org.onosproject:copycat-api:0.5.1.onos',
maven_coords = 'org.onosproject:copycat-api:jar:NON-OSGI:0.5.1.onos',
visibility = [ 'PUBLIC' ],
)
......@@ -457,7 +457,7 @@ remote_file(
prebuilt_jar(
name = 'copycat-core',
binary_jar = ':copycat-core-0.5.1.onos.jar',
maven_coords = 'org.onosproject:copycat-core:0.5.1.onos',
maven_coords = 'org.onosproject:copycat-core:jar:NON-OSGI:0.5.1.onos',
visibility = [ 'PUBLIC' ],
)
......@@ -471,7 +471,7 @@ remote_file(
prebuilt_jar(
name = 'copycat-event-log',
binary_jar = ':copycat-event-log-0.5.1.onos.jar',
maven_coords = 'org.onosproject:copycat-event-log:0.5.1.onos',
maven_coords = 'org.onosproject:copycat-event-log:jar:NON-OSGI:0.5.1.onos',
visibility = [ 'PUBLIC' ],
)
......@@ -485,7 +485,7 @@ remote_file(
prebuilt_jar(
name = 'copycat-leader-election',
binary_jar = ':copycat-leader-election-0.5.1.onos.jar',
maven_coords = 'org.onosproject:copycat-leader-election:0.5.1.onos',
maven_coords = 'org.onosproject:copycat-leader-election:jar:NON-OSGI:0.5.1.onos',
visibility = [ 'PUBLIC' ],
)
......@@ -527,7 +527,7 @@ remote_file(
prebuilt_jar(
name = 'copycat-state-log',
binary_jar = ':copycat-state-log-0.5.1.onos.jar',
maven_coords = 'org.onosproject:copycat-state-log:0.5.1.onos',
maven_coords = 'org.onosproject:copycat-state-log:jar:NON-OSGI:0.5.1.onos',
visibility = [ 'PUBLIC' ],
)
......@@ -541,7 +541,7 @@ remote_file(
prebuilt_jar(
name = 'copycat-state-machine',
binary_jar = ':copycat-state-machine-0.5.1.onos.jar',
maven_coords = 'org.onosproject:copycat-state-machine:0.5.1.onos',
maven_coords = 'org.onosproject:copycat-state-machine:jar:NON-OSGI:0.5.1.onos',
visibility = [ 'PUBLIC' ],
)
......@@ -569,7 +569,7 @@ remote_file(
prebuilt_jar(
name = 'error_prone_annotations',
binary_jar = ':error_prone_annotations-2.0.2.jar',
maven_coords = 'com.google.errorprone:error_prone_annotations:2.0.2',
maven_coords = 'com.google.errorprone:error_prone_annotations:jar:NON-OSGI:2.0.2',
visibility = [ 'PUBLIC' ],
)
......@@ -583,7 +583,7 @@ remote_file(
prebuilt_jar(
name = 'ganymed-ssh2',
binary_jar = ':ganymed-ssh2-262.jar',
maven_coords = 'ch.ethz.ganymed:ganymed-ssh2:262',
maven_coords = 'ch.ethz.ganymed:ganymed-ssh2:jar:NON-OSGI:262',
visibility = [ 'PUBLIC' ],
)
......@@ -625,7 +625,7 @@ remote_file(
prebuilt_jar(
name = 'guava-testlib',
binary_jar = ':guava-testlib-19.0.jar',
maven_coords = 'com.google.guava:guava-testlib:19.0',
maven_coords = 'com.google.guava:guava-testlib:jar:NON-OSGI:19.0',
visibility = [ 'PUBLIC' ],
)
......@@ -639,7 +639,7 @@ remote_file(
prebuilt_jar(
name = 'hamcrest-all',
binary_jar = ':hamcrest-all-1.3.jar',
maven_coords = 'org.hamcrest:hamcrest-all:1.3',
maven_coords = 'org.hamcrest:hamcrest-all:jar:NON-OSGI:1.3',
visibility = [ 'PUBLIC' ],
)
......@@ -653,7 +653,7 @@ remote_file(
prebuilt_jar(
name = 'hamcrest-core',
binary_jar = ':hamcrest-core-1.3.jar',
maven_coords = 'org.hamcrest:hamcrest-core:1.3',
maven_coords = 'org.hamcrest:hamcrest-core:jar:NON-OSGI:1.3',
visibility = [ 'PUBLIC' ],
)
......@@ -667,7 +667,7 @@ remote_file(
prebuilt_jar(
name = 'hamcrest-library',
binary_jar = ':hamcrest-library-1.3.jar',
maven_coords = 'org.hamcrest:hamcrest-library:1.3',
maven_coords = 'org.hamcrest:hamcrest-library:jar:NON-OSGI:1.3',
visibility = [ 'PUBLIC' ],
)
......@@ -765,7 +765,7 @@ remote_file(
prebuilt_jar(
name = 'influxdb-java',
binary_jar = ':influxdb-java-2.1.jar',
maven_coords = 'org.influxdb:influxdb-java:2.1',
maven_coords = 'org.influxdb:influxdb-java:jar:NON-OSGI:2.1',
visibility = [ 'PUBLIC' ],
)
......@@ -933,7 +933,7 @@ remote_file(
prebuilt_jar(
name = 'jersey-test-framework-core',
binary_jar = ':jersey-test-framework-core-2.22.2.jar',
maven_coords = 'org.glassfish.jersey.test-framework:jersey-test-framework-core:2.22.2',
maven_coords = 'org.glassfish.jersey.test-framework:jersey-test-framework-core:jar:NON-OSGI:2.22.2',
visibility = [ 'PUBLIC' ],
)
......@@ -947,7 +947,7 @@ remote_file(
prebuilt_jar(
name = 'jersey-test-framework-jetty',
binary_jar = ':jersey-test-framework-provider-jetty-2.22.2.jar',
maven_coords = 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:2.22.2',
maven_coords = 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:jar:NON-OSGI:2.22.2',
visibility = [ 'PUBLIC' ],
)
......@@ -1073,7 +1073,7 @@ remote_file(
prebuilt_jar(
name = 'jsch',
binary_jar = ':jsch-0.1.53.jar',
maven_coords = 'com.jcraft:jsch:0.1.53',
maven_coords = 'com.jcraft:jsch:jar:NON-OSGI:0.1.53',
visibility = [ 'PUBLIC' ],
)
......@@ -1101,7 +1101,7 @@ remote_file(
prebuilt_jar(
name = 'junit',
binary_jar = ':junit-4.12.jar',
maven_coords = 'junit:junit:4.12',
maven_coords = 'junit:junit:jar:NON-OSGI:4.12',
visibility = [ 'PUBLIC' ],
)
......@@ -1185,7 +1185,7 @@ remote_file(
prebuilt_jar(
name = 'metrics-influxdb',
binary_jar = ':metrics-influxdb-1.1.1.jar',
maven_coords = 'com.izettle:metrics-influxdb:1.1.1',
maven_coords = 'com.izettle:metrics-influxdb:jar:NON-OSGI:1.1.1',
visibility = [ 'PUBLIC' ],
)
......@@ -1381,7 +1381,7 @@ remote_file(
prebuilt_jar(
name = 'org.apache.felix.scr.annotations',
binary_jar = ':org.apache.felix.scr.annotations-1.9.12.jar',
maven_coords = 'org.apache.felix:org.apache.felix.scr.annotations:1.9.12',
maven_coords = 'org.apache.felix:org.apache.felix.scr.annotations:jar:NON-OSGI:1.9.12',
visibility = [ 'PUBLIC' ],
)
......@@ -1507,7 +1507,7 @@ remote_file(
prebuilt_jar(
name = 'rrd4j',
binary_jar = ':rrd4j-2.2.jar',
maven_coords = 'org.rrd4j:rrd4j:2.2',
maven_coords = 'org.rrd4j:rrd4j:jar:NON-OSGI:2.2',
visibility = [ 'PUBLIC' ],
)
......@@ -1521,7 +1521,7 @@ remote_file(
prebuilt_jar(
name = 'servlet-api',
binary_jar = ':servlet-api-2.5.jar',
maven_coords = 'javax.servlet:servlet-api:2.5',
maven_coords = 'javax.servlet:servlet-api:jar:NON-OSGI:2.5',
visibility = [ 'PUBLIC' ],
)
......