+ // Remove from source the resources already in the jar file
+// Path srcDir = bundleDir.resolve("OSGI-OPT/src");
+// Files.walkFileTree(srcDir, new SimpleFileVisitor<Path>() {
+//
+// @Override
+// public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+// // always keep .java file
+// if (file.getFileName().toString().endsWith(".java"))
+// return super.visitFile(file, attrs);
+//
+// Path relPath = srcDir.relativize(file);
+// Path bundlePath = bundleDir.resolve(relPath);
+// if (Files.exists(bundlePath)) {
+// Files.delete(file);
+// logger.log(DEBUG, () -> "Removed " + file + " from sources.");
+// }
+// return super.visitFile(file, attrs);
+// }
+//
+// });
+
+ // Create the jar