import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.argeo.jcr.JcrUtils;
import org.argeo.slc.CategorizedNameVersion;
import org.argeo.slc.DefaultNameVersion;
import org.argeo.slc.NameVersion;
distNode.setProperty(SlcNames.SLC_CATEGORY, osgiDist.getCategory());
distNode.setProperty(SlcNames.SLC_NAME, osgiDist.getName());
distNode.setProperty(SlcNames.SLC_VERSION, osgiDist.getVersion());
- Node modules = JcrUtils.mkdirs(distNode, SlcNames.SLC_MODULES,
- NodeType.NT_UNSTRUCTURED);
+ if (distNode.hasNode(SLC_MODULES))
+ distNode.getNode(SLC_MODULES).remove();
+ Node modules = distNode.addNode(SLC_MODULES, NodeType.NT_UNSTRUCTURED);
for (Iterator<? extends NameVersion> it = osgiDist.nameVersions(); it
.hasNext();)
NameVersion nv = RepoUtils.readNameVersion(jis
.getManifest());
if (nv != null) {
+ if (nv.getName().endsWith(".source"))
+ continue entries;
CategorizedNameVersion cnv = new OsgiCategorizedNV(
groupId, nv.getName(), nv.getVersion(),
this);
+ "from " + name + " in binary archive.");
}
- } else if (baseName.endsWith(".source")) {
- // TODO Eclipse source already available
}
+ // else if (baseName.endsWith(".source")) {
+ // }
// binaries
if (wrappers.containsKey(name)) {
for (String include : includes.keySet()) {
if (pathMatcher.match(include, name)) {
String groupId = includes.get(include);
- byte[] sourceJarBytes = IOUtils.toByteArray(zin);
+ byte[] origJarBytes = IOUtils.toByteArray(zin);
Artifact artifact = importZipEntry(javaSession,
- zentry, sourceJarBytes, groupId);
+ zentry, origJarBytes, groupId);
if (artifact == null) {
log.warn("Skipped non identified " + zentry);
continue entries;
import java.util.SortedSet;
import java.util.TreeSet;
-import javax.swing.text.StyledEditorKit.ItalicAction;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.argeo.slc.ModuleSet;