From 3ee2fdf1cb2047b3c4eda153ce1e9ac2b24f6f9c Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Fri, 2 Jan 2015 21:09:57 +0000 Subject: [PATCH] Deal with already existing MANIFEST git-svn-id: https://svn.argeo.org/slc/trunk@7614 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../src/main/java/org/argeo/slc/repo/RepoUtils.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 9ff8f15fb..ec3d17e41 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,11 +200,13 @@ public class RepoUtils implements ArgeoNames, SlcNames { jarOut = new JarOutputStream(out, manifest); JarEntry jarEntry = null; while ((jarEntry = jarIn.getNextJarEntry()) != null) { - JarEntry newJarEntry = new JarEntry(jarEntry.getName()); - jarOut.putNextEntry(newJarEntry); - 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 " -- 2.39.2