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 = '''\ ...@@ -28,9 +28,28 @@ APP_HEADER = '''\
28 ARTIFACT = ' <artifact>%s</artifact>\n' 28 ARTIFACT = ' <artifact>%s</artifact>\n'
29 APP_FOOTER = '</app>' 29 APP_FOOTER = '</app>'
30 30
31 +NON_OSGI_TAG = 'NON-OSGI'
31 32
32 def mvnUrl(bundle): 33 def mvnUrl(bundle):
33 - return 'mvn:' + bundle.replace(':', '/') 34 + #mvn-uri := 'mvn:' [ repository-url '!' ] group-id '/' artifact-id [ '/' [version] [ '/' [type] [ '/' classifier ] ] ] ]
35 + parts = bundle.split(':')
36 + prefix = 'mvn:'
37 + suffix = ''
38 + if len(parts) > 3:
39 + parts.insert(2, parts.pop()) # move version to the 3rd position
40 + if len(parts) >= 5:
41 + # check classifier for special non-OSGi tag
42 + i = parts[4].find(NON_OSGI_TAG)
43 + if i == 0:
44 + prefix = 'wrap:' + prefix
45 + suffix = '$Bundle-SymbolicName=%s.%s&amp;Bundle-Version=%s' % tuple(parts[0:3])
46 + if len(parts[4]) == len(NON_OSGI_TAG):
47 + parts.pop() # pop off empty classifier
48 + if parts[3].lower() == 'jar':
49 + parts.pop() # pop off default extension: jar
50 + else:
51 + parts[4] = parts[4][len(NON_OSGI_TAG):]
52 + return prefix + '/'.join(parts) + suffix
34 53
35 def generateFeatureFile(feature_name, 54 def generateFeatureFile(feature_name,
36 version, 55 version,
......
1 -# ***** This file was auto-generated at Fri Apr 22 16:32:01 PDT 2016. Do not edit this file manually. ***** 1 +# ***** This file was auto-generated at Mon Apr 25 15:01:03 PDT 2016. Do not edit this file manually. *****
2 java_library( 2 java_library(
3 name = 'COMPILE', 3 name = 'COMPILE',
4 visibility = ['PUBLIC'], 4 visibility = ['PUBLIC'],
...@@ -247,7 +247,7 @@ remote_file( ...@@ -247,7 +247,7 @@ remote_file(
247 prebuilt_jar( 247 prebuilt_jar(
248 name = 'catalyst-common', 248 name = 'catalyst-common',
249 binary_jar = ':catalyst-common-1.0.4.jar', 249 binary_jar = ':catalyst-common-1.0.4.jar',
250 - maven_coords = 'io.atomix.catalyst:catalyst-common:1.0.4', 250 + maven_coords = 'io.atomix.catalyst:catalyst-common:jar:NON-OSGI:1.0.4',
251 visibility = [ 'PUBLIC' ], 251 visibility = [ 'PUBLIC' ],
252 ) 252 )
253 253
...@@ -289,7 +289,7 @@ remote_file( ...@@ -289,7 +289,7 @@ remote_file(
289 prebuilt_jar( 289 prebuilt_jar(
290 name = 'catalyst-transport', 290 name = 'catalyst-transport',
291 binary_jar = ':catalyst-transport-1.0.4.jar', 291 binary_jar = ':catalyst-transport-1.0.4.jar',
292 - maven_coords = 'io.atomix.catalyst:catalyst-transport:1.0.4', 292 + maven_coords = 'io.atomix.catalyst:catalyst-transport:jar:NON-OSGI:1.0.4',
293 visibility = [ 'PUBLIC' ], 293 visibility = [ 'PUBLIC' ],
294 ) 294 )
295 295
...@@ -373,7 +373,7 @@ remote_file( ...@@ -373,7 +373,7 @@ remote_file(
373 prebuilt_jar( 373 prebuilt_jar(
374 name = 'commons-logging', 374 name = 'commons-logging',
375 binary_jar = ':commons-logging-1.1.1.jar', 375 binary_jar = ':commons-logging-1.1.1.jar',
376 - maven_coords = 'commons-logging:commons-logging:1.1.1', 376 + maven_coords = 'commons-logging:commons-logging:jar:NON-OSGI:1.1.1',
377 visibility = [ 'PUBLIC' ], 377 visibility = [ 'PUBLIC' ],
378 ) 378 )
379 379
...@@ -415,7 +415,7 @@ remote_file( ...@@ -415,7 +415,7 @@ remote_file(
415 prebuilt_jar( 415 prebuilt_jar(
416 name = 'concurrent-trees', 416 name = 'concurrent-trees',
417 binary_jar = ':concurrent-trees-2.4.0.jar', 417 binary_jar = ':concurrent-trees-2.4.0.jar',
418 - maven_coords = 'com.googlecode.concurrent-trees:concurrent-trees:2.4.0', 418 + maven_coords = 'com.googlecode.concurrent-trees:concurrent-trees:jar:NON-OSGI:2.4.0',
419 visibility = [ 'PUBLIC' ], 419 visibility = [ 'PUBLIC' ],
420 ) 420 )
421 421
...@@ -429,7 +429,7 @@ remote_file( ...@@ -429,7 +429,7 @@ remote_file(
429 prebuilt_jar( 429 prebuilt_jar(
430 name = 'copycat-api', 430 name = 'copycat-api',
431 binary_jar = ':copycat-api-0.5.1.onos.jar', 431 binary_jar = ':copycat-api-0.5.1.onos.jar',
432 - maven_coords = 'org.onosproject:copycat-api:0.5.1.onos', 432 + maven_coords = 'org.onosproject:copycat-api:jar:NON-OSGI:0.5.1.onos',
433 visibility = [ 'PUBLIC' ], 433 visibility = [ 'PUBLIC' ],
434 ) 434 )
435 435
...@@ -457,7 +457,7 @@ remote_file( ...@@ -457,7 +457,7 @@ remote_file(
457 prebuilt_jar( 457 prebuilt_jar(
458 name = 'copycat-core', 458 name = 'copycat-core',
459 binary_jar = ':copycat-core-0.5.1.onos.jar', 459 binary_jar = ':copycat-core-0.5.1.onos.jar',
460 - maven_coords = 'org.onosproject:copycat-core:0.5.1.onos', 460 + maven_coords = 'org.onosproject:copycat-core:jar:NON-OSGI:0.5.1.onos',
461 visibility = [ 'PUBLIC' ], 461 visibility = [ 'PUBLIC' ],
462 ) 462 )
463 463
...@@ -471,7 +471,7 @@ remote_file( ...@@ -471,7 +471,7 @@ remote_file(
471 prebuilt_jar( 471 prebuilt_jar(
472 name = 'copycat-event-log', 472 name = 'copycat-event-log',
473 binary_jar = ':copycat-event-log-0.5.1.onos.jar', 473 binary_jar = ':copycat-event-log-0.5.1.onos.jar',
474 - maven_coords = 'org.onosproject:copycat-event-log:0.5.1.onos', 474 + maven_coords = 'org.onosproject:copycat-event-log:jar:NON-OSGI:0.5.1.onos',
475 visibility = [ 'PUBLIC' ], 475 visibility = [ 'PUBLIC' ],
476 ) 476 )
477 477
...@@ -485,7 +485,7 @@ remote_file( ...@@ -485,7 +485,7 @@ remote_file(
485 prebuilt_jar( 485 prebuilt_jar(
486 name = 'copycat-leader-election', 486 name = 'copycat-leader-election',
487 binary_jar = ':copycat-leader-election-0.5.1.onos.jar', 487 binary_jar = ':copycat-leader-election-0.5.1.onos.jar',
488 - maven_coords = 'org.onosproject:copycat-leader-election:0.5.1.onos', 488 + maven_coords = 'org.onosproject:copycat-leader-election:jar:NON-OSGI:0.5.1.onos',
489 visibility = [ 'PUBLIC' ], 489 visibility = [ 'PUBLIC' ],
490 ) 490 )
491 491
...@@ -527,7 +527,7 @@ remote_file( ...@@ -527,7 +527,7 @@ remote_file(
527 prebuilt_jar( 527 prebuilt_jar(
528 name = 'copycat-state-log', 528 name = 'copycat-state-log',
529 binary_jar = ':copycat-state-log-0.5.1.onos.jar', 529 binary_jar = ':copycat-state-log-0.5.1.onos.jar',
530 - maven_coords = 'org.onosproject:copycat-state-log:0.5.1.onos', 530 + maven_coords = 'org.onosproject:copycat-state-log:jar:NON-OSGI:0.5.1.onos',
531 visibility = [ 'PUBLIC' ], 531 visibility = [ 'PUBLIC' ],
532 ) 532 )
533 533
...@@ -541,7 +541,7 @@ remote_file( ...@@ -541,7 +541,7 @@ remote_file(
541 prebuilt_jar( 541 prebuilt_jar(
542 name = 'copycat-state-machine', 542 name = 'copycat-state-machine',
543 binary_jar = ':copycat-state-machine-0.5.1.onos.jar', 543 binary_jar = ':copycat-state-machine-0.5.1.onos.jar',
544 - maven_coords = 'org.onosproject:copycat-state-machine:0.5.1.onos', 544 + maven_coords = 'org.onosproject:copycat-state-machine:jar:NON-OSGI:0.5.1.onos',
545 visibility = [ 'PUBLIC' ], 545 visibility = [ 'PUBLIC' ],
546 ) 546 )
547 547
...@@ -569,7 +569,7 @@ remote_file( ...@@ -569,7 +569,7 @@ remote_file(
569 prebuilt_jar( 569 prebuilt_jar(
570 name = 'error_prone_annotations', 570 name = 'error_prone_annotations',
571 binary_jar = ':error_prone_annotations-2.0.2.jar', 571 binary_jar = ':error_prone_annotations-2.0.2.jar',
572 - maven_coords = 'com.google.errorprone:error_prone_annotations:2.0.2', 572 + maven_coords = 'com.google.errorprone:error_prone_annotations:jar:NON-OSGI:2.0.2',
573 visibility = [ 'PUBLIC' ], 573 visibility = [ 'PUBLIC' ],
574 ) 574 )
575 575
...@@ -583,7 +583,7 @@ remote_file( ...@@ -583,7 +583,7 @@ remote_file(
583 prebuilt_jar( 583 prebuilt_jar(
584 name = 'ganymed-ssh2', 584 name = 'ganymed-ssh2',
585 binary_jar = ':ganymed-ssh2-262.jar', 585 binary_jar = ':ganymed-ssh2-262.jar',
586 - maven_coords = 'ch.ethz.ganymed:ganymed-ssh2:262', 586 + maven_coords = 'ch.ethz.ganymed:ganymed-ssh2:jar:NON-OSGI:262',
587 visibility = [ 'PUBLIC' ], 587 visibility = [ 'PUBLIC' ],
588 ) 588 )
589 589
...@@ -625,7 +625,7 @@ remote_file( ...@@ -625,7 +625,7 @@ remote_file(
625 prebuilt_jar( 625 prebuilt_jar(
626 name = 'guava-testlib', 626 name = 'guava-testlib',
627 binary_jar = ':guava-testlib-19.0.jar', 627 binary_jar = ':guava-testlib-19.0.jar',
628 - maven_coords = 'com.google.guava:guava-testlib:19.0', 628 + maven_coords = 'com.google.guava:guava-testlib:jar:NON-OSGI:19.0',
629 visibility = [ 'PUBLIC' ], 629 visibility = [ 'PUBLIC' ],
630 ) 630 )
631 631
...@@ -639,7 +639,7 @@ remote_file( ...@@ -639,7 +639,7 @@ remote_file(
639 prebuilt_jar( 639 prebuilt_jar(
640 name = 'hamcrest-all', 640 name = 'hamcrest-all',
641 binary_jar = ':hamcrest-all-1.3.jar', 641 binary_jar = ':hamcrest-all-1.3.jar',
642 - maven_coords = 'org.hamcrest:hamcrest-all:1.3', 642 + maven_coords = 'org.hamcrest:hamcrest-all:jar:NON-OSGI:1.3',
643 visibility = [ 'PUBLIC' ], 643 visibility = [ 'PUBLIC' ],
644 ) 644 )
645 645
...@@ -653,7 +653,7 @@ remote_file( ...@@ -653,7 +653,7 @@ remote_file(
653 prebuilt_jar( 653 prebuilt_jar(
654 name = 'hamcrest-core', 654 name = 'hamcrest-core',
655 binary_jar = ':hamcrest-core-1.3.jar', 655 binary_jar = ':hamcrest-core-1.3.jar',
656 - maven_coords = 'org.hamcrest:hamcrest-core:1.3', 656 + maven_coords = 'org.hamcrest:hamcrest-core:jar:NON-OSGI:1.3',
657 visibility = [ 'PUBLIC' ], 657 visibility = [ 'PUBLIC' ],
658 ) 658 )
659 659
...@@ -667,7 +667,7 @@ remote_file( ...@@ -667,7 +667,7 @@ remote_file(
667 prebuilt_jar( 667 prebuilt_jar(
668 name = 'hamcrest-library', 668 name = 'hamcrest-library',
669 binary_jar = ':hamcrest-library-1.3.jar', 669 binary_jar = ':hamcrest-library-1.3.jar',
670 - maven_coords = 'org.hamcrest:hamcrest-library:1.3', 670 + maven_coords = 'org.hamcrest:hamcrest-library:jar:NON-OSGI:1.3',
671 visibility = [ 'PUBLIC' ], 671 visibility = [ 'PUBLIC' ],
672 ) 672 )
673 673
...@@ -765,7 +765,7 @@ remote_file( ...@@ -765,7 +765,7 @@ remote_file(
765 prebuilt_jar( 765 prebuilt_jar(
766 name = 'influxdb-java', 766 name = 'influxdb-java',
767 binary_jar = ':influxdb-java-2.1.jar', 767 binary_jar = ':influxdb-java-2.1.jar',
768 - maven_coords = 'org.influxdb:influxdb-java:2.1', 768 + maven_coords = 'org.influxdb:influxdb-java:jar:NON-OSGI:2.1',
769 visibility = [ 'PUBLIC' ], 769 visibility = [ 'PUBLIC' ],
770 ) 770 )
771 771
...@@ -933,7 +933,7 @@ remote_file( ...@@ -933,7 +933,7 @@ remote_file(
933 prebuilt_jar( 933 prebuilt_jar(
934 name = 'jersey-test-framework-core', 934 name = 'jersey-test-framework-core',
935 binary_jar = ':jersey-test-framework-core-2.22.2.jar', 935 binary_jar = ':jersey-test-framework-core-2.22.2.jar',
936 - maven_coords = 'org.glassfish.jersey.test-framework:jersey-test-framework-core:2.22.2', 936 + maven_coords = 'org.glassfish.jersey.test-framework:jersey-test-framework-core:jar:NON-OSGI:2.22.2',
937 visibility = [ 'PUBLIC' ], 937 visibility = [ 'PUBLIC' ],
938 ) 938 )
939 939
...@@ -947,7 +947,7 @@ remote_file( ...@@ -947,7 +947,7 @@ remote_file(
947 prebuilt_jar( 947 prebuilt_jar(
948 name = 'jersey-test-framework-jetty', 948 name = 'jersey-test-framework-jetty',
949 binary_jar = ':jersey-test-framework-provider-jetty-2.22.2.jar', 949 binary_jar = ':jersey-test-framework-provider-jetty-2.22.2.jar',
950 - maven_coords = 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:2.22.2', 950 + maven_coords = 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:jar:NON-OSGI:2.22.2',
951 visibility = [ 'PUBLIC' ], 951 visibility = [ 'PUBLIC' ],
952 ) 952 )
953 953
...@@ -1073,7 +1073,7 @@ remote_file( ...@@ -1073,7 +1073,7 @@ remote_file(
1073 prebuilt_jar( 1073 prebuilt_jar(
1074 name = 'jsch', 1074 name = 'jsch',
1075 binary_jar = ':jsch-0.1.53.jar', 1075 binary_jar = ':jsch-0.1.53.jar',
1076 - maven_coords = 'com.jcraft:jsch:0.1.53', 1076 + maven_coords = 'com.jcraft:jsch:jar:NON-OSGI:0.1.53',
1077 visibility = [ 'PUBLIC' ], 1077 visibility = [ 'PUBLIC' ],
1078 ) 1078 )
1079 1079
...@@ -1101,7 +1101,7 @@ remote_file( ...@@ -1101,7 +1101,7 @@ remote_file(
1101 prebuilt_jar( 1101 prebuilt_jar(
1102 name = 'junit', 1102 name = 'junit',
1103 binary_jar = ':junit-4.12.jar', 1103 binary_jar = ':junit-4.12.jar',
1104 - maven_coords = 'junit:junit:4.12', 1104 + maven_coords = 'junit:junit:jar:NON-OSGI:4.12',
1105 visibility = [ 'PUBLIC' ], 1105 visibility = [ 'PUBLIC' ],
1106 ) 1106 )
1107 1107
...@@ -1185,7 +1185,7 @@ remote_file( ...@@ -1185,7 +1185,7 @@ remote_file(
1185 prebuilt_jar( 1185 prebuilt_jar(
1186 name = 'metrics-influxdb', 1186 name = 'metrics-influxdb',
1187 binary_jar = ':metrics-influxdb-1.1.1.jar', 1187 binary_jar = ':metrics-influxdb-1.1.1.jar',
1188 - maven_coords = 'com.izettle:metrics-influxdb:1.1.1', 1188 + maven_coords = 'com.izettle:metrics-influxdb:jar:NON-OSGI:1.1.1',
1189 visibility = [ 'PUBLIC' ], 1189 visibility = [ 'PUBLIC' ],
1190 ) 1190 )
1191 1191
...@@ -1381,7 +1381,7 @@ remote_file( ...@@ -1381,7 +1381,7 @@ remote_file(
1381 prebuilt_jar( 1381 prebuilt_jar(
1382 name = 'org.apache.felix.scr.annotations', 1382 name = 'org.apache.felix.scr.annotations',
1383 binary_jar = ':org.apache.felix.scr.annotations-1.9.12.jar', 1383 binary_jar = ':org.apache.felix.scr.annotations-1.9.12.jar',
1384 - maven_coords = 'org.apache.felix:org.apache.felix.scr.annotations:1.9.12', 1384 + maven_coords = 'org.apache.felix:org.apache.felix.scr.annotations:jar:NON-OSGI:1.9.12',
1385 visibility = [ 'PUBLIC' ], 1385 visibility = [ 'PUBLIC' ],
1386 ) 1386 )
1387 1387
...@@ -1507,7 +1507,7 @@ remote_file( ...@@ -1507,7 +1507,7 @@ remote_file(
1507 prebuilt_jar( 1507 prebuilt_jar(
1508 name = 'rrd4j', 1508 name = 'rrd4j',
1509 binary_jar = ':rrd4j-2.2.jar', 1509 binary_jar = ':rrd4j-2.2.jar',
1510 - maven_coords = 'org.rrd4j:rrd4j:2.2', 1510 + maven_coords = 'org.rrd4j:rrd4j:jar:NON-OSGI:2.2',
1511 visibility = [ 'PUBLIC' ], 1511 visibility = [ 'PUBLIC' ],
1512 ) 1512 )
1513 1513
...@@ -1521,7 +1521,7 @@ remote_file( ...@@ -1521,7 +1521,7 @@ remote_file(
1521 prebuilt_jar( 1521 prebuilt_jar(
1522 name = 'servlet-api', 1522 name = 'servlet-api',
1523 binary_jar = ':servlet-api-2.5.jar', 1523 binary_jar = ':servlet-api-2.5.jar',
1524 - maven_coords = 'javax.servlet:servlet-api:2.5', 1524 + maven_coords = 'javax.servlet:servlet-api:jar:NON-OSGI:2.5',
1525 visibility = [ 'PUBLIC' ], 1525 visibility = [ 'PUBLIC' ],
1526 ) 1526 )
1527 1527
......