X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=runtime%2Forg.argeo.slc.repo%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Frepo%2Fosgi%2FImportBundlesZip.java;h=a11f2439c7d494114df8fa7c7eadbaae447a1d43;hb=e146631736be22397edf93f81f3218b5a178dc06;hp=092101a8d8b7e822ab0819e28252057df9683247;hpb=cdc8471021f12b7ec16f8fe2a6ce628fba1f4406;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ImportBundlesZip.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ImportBundlesZip.java index 092101a8d..a11f2439c 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ImportBundlesZip.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/osgi/ImportBundlesZip.java @@ -22,7 +22,6 @@ import org.argeo.slc.SlcException; import org.argeo.slc.repo.ArtifactIndexer; import org.argeo.slc.repo.JarFileIndexer; import org.argeo.slc.repo.RepoUtils; -import org.argeo.slc.repo.maven.MavenConventionsUtils; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.util.artifact.DefaultArtifact; @@ -53,14 +52,14 @@ public class ImportBundlesZip implements Runnable { session = repository.login(workspace); // clear - String groupPath = MavenConventionsUtils.groupPath( - artifactBasePath, groupId); - if (session.itemExists(groupPath)) { - session.getNode(groupPath).remove(); - session.save(); - if (log.isDebugEnabled()) - log.debug("Cleared " + groupPath); - } + // String groupPath = MavenConventionsUtils.groupPath( + // artifactBasePath, groupId); + // if (session.itemExists(groupPath)) { + // session.getNode(groupPath).remove(); + // session.save(); + // if (log.isDebugEnabled()) + // log.debug("Cleared " + groupPath); + // } zipIn = new ZipInputStream(url.openStream()); ZipEntry zipEntry = null; @@ -86,10 +85,15 @@ public class ImportBundlesZip implements Runnable { continue entries; } + String bundleName = RepoUtils.extractBundleNameFromSourceName(nv + .getName()); // skip excluded bundles and their sources - if (excludedBundles.contains(extractBundleNameFromSourceName(nv - .getName()))) + if (excludedBundles.contains(bundleName)) continue entries; + // for(String excludedBundle:excludedBundles){ + // if(bundleName.contains(excludedBundle)) + // continue entries; + // } Artifact artifact = new DefaultArtifact(groupId, nv.getName(), "jar", nv.getVersion()); @@ -115,15 +119,6 @@ public class ImportBundlesZip implements Runnable { } - /** If a source return the base bundle name, does not change otherwise */ - private String extractBundleNameFromSourceName(String sourceBundleName) { - if (sourceBundleName.endsWith(".source")) - return sourceBundleName.substring(0, sourceBundleName.length() - - ".source".length()); - else - return sourceBundleName; - } - public void setRepository(Repository repository) { this.repository = repository; }