Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schreiber2015-08-10 04:54:23 -0400
committerMartin Schreiber2015-08-13 09:10:41 -0400
commit918aa5bdc59d66318ba61a23c67c68abc6dab7c9 (patch)
treee43e82cbf32bbc30a647ee7c52ff415e0caac816
parent1b76a13be4a9ddc8dd5fbb8f6a732bd58bd6e4de (diff)
downloadorg.eclipse.tycho-918aa5bdc59d66318ba61a23c67c68abc6dab7c9.tar.gz
org.eclipse.tycho-918aa5bdc59d66318ba61a23c67c68abc6dab7c9.tar.xz
org.eclipse.tycho-918aa5bdc59d66318ba61a23c67c68abc6dab7c9.zip
461974 Updating to plexus archiver v2.9.1
By updating plexus-archiver to v2.9.1 and plexus-io to v2.4.1, large repository zip files do now contain a correct header signature. CQ: 9829 CQ: 9830 Bug: 461974 Change-Id: I55c3da65eb7b7c0890b1b9159df1fdd27baf9c70 Signed-off-by: Martin Schreiber <m.schreiber@bachmann.info>
-rw-r--r--pom.xml4
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO0439repositoryCategories/RepositoryCategoriesTest.java4
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java11
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java17
4 files changed, 14 insertions, 22 deletions
diff --git a/pom.xml b/pom.xml
index 50da9adf2..8d71db888 100644
--- a/pom.xml
+++ b/pom.xml
@@ -165,12 +165,12 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-io</artifactId>
- <version>2.0.5</version>
+ <version>2.4.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
- <version>2.2</version>
+ <version>2.9.1</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO0439repositoryCategories/RepositoryCategoriesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO0439repositoryCategories/RepositoryCategoriesTest.java
index be5b03bf1..7decef568 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO0439repositoryCategories/RepositoryCategoriesTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO0439repositoryCategories/RepositoryCategoriesTest.java
@@ -11,10 +11,10 @@
package org.eclipse.tycho.test.TYCHO0439repositoryCategories;
import java.io.File;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
import org.apache.maven.it.Verifier;
-import org.codehaus.plexus.archiver.zip.ZipEntry;
-import org.codehaus.plexus.archiver.zip.ZipFile;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.junit.Assert;
import org.junit.Test;
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java b/tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java
index 8515e0aa7..8219191b9 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java
@@ -15,10 +15,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.Set;
+import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
-
-import org.codehaus.plexus.archiver.zip.ZipEntry;
-import org.codehaus.plexus.archiver.zip.ZipFile;
+import java.util.zip.ZipFile;
import de.pdark.decentxml.Document;
import de.pdark.decentxml.Element;
@@ -36,11 +35,7 @@ class Util {
try {
ZipEntry contentXmlEntry = zip.getEntry(xmlFile);
InputStream entryStream = zip.getInputStream(contentXmlEntry);
- try {
- return parser.parse(new XMLIOSource(entryStream));
- } finally {
- entryStream.close();
- }
+ return parser.parse(new XMLIOSource(entryStream));
} finally {
zip.close();
}
diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
index 5a86bddc4..5a9c58d9b 100644
--- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
+++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
@@ -26,6 +26,7 @@ import org.apache.maven.project.MavenProjectHelper;
import org.codehaus.plexus.archiver.Archiver;
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.tar.TarArchiver;
+import org.codehaus.plexus.archiver.tar.TarArchiver.TarCompressionMethod;
import org.codehaus.plexus.archiver.tar.TarLongFileMode;
import org.eclipse.tycho.core.shared.TargetEnvironment;
import org.eclipse.tycho.plugins.tar.TarGzArchiver;
@@ -95,13 +96,9 @@ public final class ProductArchiverMojo extends AbstractProductMojo {
productArchivers.put(TAR_GZ_ARCHIVE_FORMAT, new ProductArchiver() {
@Override
Archiver getArchiver() throws ArchiverException {
- TarArchiver.TarCompressionMethod tarCompressionMethod = new TarArchiver.TarCompressionMethod();
- tarCompressionMethod.setValue("gzip"); // surprisingly, compression names are private in plexus
- tarArchiver.setCompression(tarCompressionMethod);
+ tarArchiver.setCompression(TarCompressionMethod.gzip);
// avoid lots of long file path (> 100 chars) warnings
- TarLongFileMode gnuMode = new TarLongFileMode();
- gnuMode.setValue(TarLongFileMode.GNU);
- tarArchiver.setLongfile(gnuMode);
+ tarArchiver.setLongfile(TarLongFileMode.gnu);
return tarArchiver;
}
});
@@ -122,12 +119,12 @@ public final class ProductArchiverMojo extends AbstractProductMojo {
String format = getArchiveFormat(env);
ProductArchiver productArchiver = productArchivers.get(format);
if (productArchiver == null) {
- throw new MojoExecutionException("Unknown or unsupported archive format os=" + env.getOs()
- + " format=" + format);
+ throw new MojoExecutionException(
+ "Unknown or unsupported archive format os=" + env.getOs() + " format=" + format);
}
- File productArchive = new File(getProductsBuildDirectory(), getArchiveFileName(product) + "-"
- + getOsWsArch(env, '.') + "." + format);
+ File productArchive = new File(getProductsBuildDirectory(),
+ getArchiveFileName(product) + "-" + getOsWsArch(env, '.') + "." + format);
try {
final File sourceDir = getProductMaterializeDirectory(product, env);

Back to the top