+ // NodeIterator bundles = listBundleArtifacts(session);
+ // if (log.isDebugEnabled())
+ // log.debug("## Copying to " + libDir);
+ //
+ // File equinoxJar = null;
+ // List<File> files = new ArrayList<File>();
+ // bundles: while (bundles.hasNext()) {
+ // Node bundleNode = bundles.nextNode();
+ // String symbolicName = JcrUtils.get(bundleNode,
+ // SLC_SYMBOLIC_NAME);
+ //
+ // // skip sources
+ // if (symbolicName.endsWith(".source"))
+ // continue bundles;
+ // // skip eclipse
+ // if (symbolicName.startsWith("org.eclipse")
+ // && !symbolicName.equals("org.eclipse.osgi"))
+ // continue bundles;
+ // if (symbolicName.equals("org.polymap.openlayers.rap.widget"))
+ // continue bundles;
+ //
+ // File targetFile = new File(libDir, bundleNode.getName());
+ // out = new FileOutputStream(targetFile);
+ // jarStream = bundleNode.getNode(Node.JCR_CONTENT)
+ // .getProperty(Property.JCR_DATA).getBinary().getStream();
+ // IOUtils.copy(jarStream, out);
+ // if (symbolicName.equals("org.eclipse.osgi"))
+ // equinoxJar = targetFile;
+ // else
+ // files.add(targetFile);
+ // if (log.isDebugEnabled())
+ // log.debug("Copied " + targetFile.getName());
+ //
+ // IOUtils.closeQuietly(out);
+ // IOUtils.closeQuietly(jarStream);
+ // }
+ //
+ // StringBuffer osgiBundles = new StringBuffer("osgi.bundles=");
+ // for (int i = 0; i < files.size(); i++) {
+ // if (i != 0)
+ // osgiBundles.append(',');
+ // osgiBundles.append(files.get(i).getName());
+ // }
+
+ String equinoxJar = null;