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=d852fb623b249fe9a41312797c484b5db4a139b8;hpb=1a0340b557d4cd38e763e4922a3ee4e5dcc8f6d3;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 d852fb623..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,19 +29,15 @@ 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(); - // javaSession.save(); - - // osgiFactory.indexNode(node); - // Node artifact = createDistributionArtifact(javaSession, - // osgiDistribution); } catch (RepositoryException e) { throw new SlcException("Cannot process distribution " @@ -66,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); } }