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%2FRepoUtils.java;h=4a175ac594ce641569e269bd37c6c201d753e5a3;hb=399702cec859f48ec171c30d268c55eb632d472a;hp=da4c35a99eb562a871812d8c009a5d2ccebe8296;hpb=5686259eb6e4da5006034087c71f349b3097be8d;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoUtils.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoUtils.java index da4c35a99..4a175ac59 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoUtils.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoUtils.java @@ -200,10 +200,13 @@ public class RepoUtils implements ArgeoNames, SlcNames { jarOut = new JarOutputStream(out, manifest); JarEntry jarEntry = null; while ((jarEntry = jarIn.getNextJarEntry()) != null) { - jarOut.putNextEntry(jarEntry); - IOUtils.copy(jarIn, jarOut); - jarIn.closeEntry(); - jarOut.closeEntry(); + if (!jarEntry.getName().equals("META-INF/MANIFEST.MF")) { + JarEntry newJarEntry = new JarEntry(jarEntry.getName()); + jarOut.putNextEntry(newJarEntry); + IOUtils.copy(jarIn, jarOut); + jarIn.closeEntry(); + jarOut.closeEntry(); + } } } catch (IOException e) { throw new SlcException("Could not copy jar with MANIFEST " @@ -313,6 +316,10 @@ public class RepoUtils implements ArgeoNames, SlcNames { .getProperty(SLC_ARTIFACT_CLASSIFIER).getString(), node.getProperty(SLC_ARTIFACT_EXTENSION).getString(), node .getProperty(SLC_ARTIFACT_VERSION).getString()); + } else if (node.isNodeType(SlcTypes.SLC_MODULE_COORDINATES)) { + return new DefaultArtifact(node.getProperty(SLC_CATEGORY) + .getString(), node.getProperty(SLC_NAME).getString(), + "jar", node.getProperty(SLC_VERSION).getString()); } else { throw new SlcException("Unsupported node type for " + node); }