diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index df026e02c..57b59afbc 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -6,7 +6,8 @@ Bundle-Version: 2.2.0.qualifier Bundle-Vendor: %provider_name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.eclipse.jgit.api;version="[2.2.0,2.3.0)", +Import-Package: org.apache.commons.compress.archivers.zip;version="[1.3,2.0)", + org.eclipse.jgit.api;version="[2.2.0,2.3.0)", org.eclipse.jgit.api.errors;version="[2.2.0,2.3.0)", org.eclipse.jgit.awtui;version="[2.2.0,2.3.0)", org.eclipse.jgit.blame;version="[2.2.0,2.3.0)", diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index 02d346365..5cf108420 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -71,6 +71,11 @@ args4j + + org.apache.commons + commons-compress + + org.eclipse.jgit org.eclipse.jgit diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java index 786524eca..ec937a3cc 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java @@ -46,9 +46,9 @@ package org.eclipse.jgit.pgm; import java.lang.String; import java.lang.System; import java.text.MessageFormat; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; +import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; +import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.eclipse.jgit.lib.FileMode; import org.eclipse.jgit.lib.MutableObjectId; import org.eclipse.jgit.lib.ObjectLoader; @@ -69,7 +69,7 @@ class Archive extends TextBuiltin { final TreeWalk walk = new TreeWalk(db); final ObjectReader reader = walk.getObjectReader(); final MutableObjectId idBuf = new MutableObjectId(); - final ZipOutputStream out = new ZipOutputStream(outs); + final ZipArchiveOutputStream out = new ZipArchiveOutputStream(outs); if (tree == null) throw die(CLIText.get().treeIsRequired); @@ -87,11 +87,12 @@ class Archive extends TextBuiltin { continue; walk.getObjectId(idBuf, 0); - final ZipEntry entry = new ZipEntry(name); + final ZipArchiveEntry entry = new ZipArchiveEntry(name); final ObjectLoader loader = reader.open(idBuf); entry.setSize(loader.getSize()); - out.putNextEntry(entry); + out.putArchiveEntry(entry); loader.copyTo(out); + out.closeArchiveEntry(); if (mode != FileMode.REGULAR_FILE) System.err.println(MessageFormat.format( // diff --git a/pom.xml b/pom.xml index 891a023c0..085e00fef 100644 --- a/pom.xml +++ b/pom.xml @@ -173,6 +173,7 @@ 0.1.44-1 4.5 2.0.12 + 1.3 2.5 7.6.0.v20120127 2.4 @@ -415,6 +416,12 @@ ${servlet-api-version} + + org.apache.commons + commons-compress + ${commons-compress-version} + + org.eclipse.jetty jetty-servlet