+// void generateManifest(String bundleSymbolicName, Path compiled) throws IOException {
+// Properties properties = new Properties();
+// Path argeoBnd = argeoBuildBase.resolve("argeo.bnd");
+// try (InputStream in = Files.newInputStream(argeoBnd)) {
+// properties.load(in);
+// }
+// // FIXME make it configurable
+// Path branchBnd = sdkSrcBase.resolve("cnf/unstable.bnd");
+// try (InputStream in = Files.newInputStream(branchBnd)) {
+// properties.load(in);
+// }
+//
+// Path bndBnd = compiled.resolve("bnd.bnd");
+// try (InputStream in = Files.newInputStream(bndBnd)) {
+// properties.load(in);
+// }
+//
+// // Normalise
+// properties.put("Bundle-SymbolicName", bundleSymbolicName);
+//
+// // Calculate MANIFEST
+// Path binP = compiled.resolve("bin");
+// Manifest manifest;
+// try (Analyzer bndAnalyzer = new Analyzer()) {
+// bndAnalyzer.setProperties(properties);
+// Jar jar = new Jar(bundleSymbolicName, binP.toFile());
+// bndAnalyzer.setJar(jar);
+// manifest = bndAnalyzer.calcManifest();
+//
+//// keys: for (Object key : manifest.getMainAttributes().keySet()) {
+//// System.out.println(key + ": " + manifest.getMainAttributes().getValue(key.toString()));
+//// }
+// } catch (Exception e) {
+// throw new RuntimeException("Bnd analysis of " + compiled + " failed", e);
+// }
+//
+// // Write manifest
+// Path manifestP = compiled.resolve("META-INF/MANIFEST.MF");
+// Files.createDirectories(manifestP.getParent());
+// try (OutputStream out = Files.newOutputStream(manifestP)) {
+// manifest.write(out);
+// }
+// }
+
+ /*
+ * JAR PACKAGING
+ */
+ void createBundle(Path source, Path compiled, Path jarP) throws IOException {
+ String bundleSymbolicName = source.getFileName().toString();
+
+ // Metadata