X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.repo%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Frepo%2Fosgi%2FProcessDistribution.java;h=9ea467d773d9d5a507ad6e60b835d9cc6c49b7fa;hb=399702cec859f48ec171c30d268c55eb632d472a;hp=544b1c634aa38e2fd6539be2850395ee580fcbd3;hpb=91379d32885f30ad22147a45998ae270da032c83;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ProcessDistribution.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ProcessDistribution.java index 544b1c634..9ea467d77 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ProcessDistribution.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ProcessDistribution.java @@ -29,22 +29,16 @@ public class ProcessDistribution implements Runnable { Session javaSession = null; try { javaSession = osgiFactory.openJavaSession(); - for (Iterator it = osgiDistribution .nameVersions(); it.hasNext();) processNameVersion(javaSession, it.next()); + // explicitly create the corresponding modular distribution as we + // have here all necessary info. ModularDistributionFactory mdf = new ModularDistributionFactory( - javaSession, osgiDistribution); + osgiFactory, osgiDistribution); mdf.run(); - // TODO why is the created distribution not automatically indexed? - // osgiFactory.indexNode(node); - // javaSession.save(); - - // Node artifact = createDistributionArtifact(javaSession, - // osgiDistribution); - } catch (RepositoryException e) { throw new SlcException("Cannot process distribution " + osgiDistribution, e); @@ -68,12 +62,14 @@ public class ProcessDistribution implements Runnable { if (log.isDebugEnabled()) log.debug("Run factory for : " + nv + "..."); ((BndWrapper) nv).getFactory().run(); + } else if (nv instanceof Runnable) { + ((Runnable) nv).run(); } else { log.warn("Skip unsupported : " + nv); } } else { - if (log.isDebugEnabled()) - log.debug("Already available : " + nv); + if (log.isTraceEnabled()) + log.trace("Already available : " + nv); } }