Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Sievers2015-07-06 05:02:27 -0400
committerJan Sievers2015-07-06 08:32:40 -0400
commit0d6b69a6b78ac5b8a55894477ef5738c51a2ece4 (patch)
tree6e30561b7788f9e281480e9947657b5aa31fa56b
parent052c143f73fe284f0bf2eede187160fa8ca26290 (diff)
downloadorg.eclipse.tycho-0d6b69a6b78ac5b8a55894477ef5738c51a2ece4.tar.gz
org.eclipse.tycho-0d6b69a6b78ac5b8a55894477ef5738c51a2ece4.tar.xz
org.eclipse.tycho-0d6b69a6b78ac5b8a55894477ef5738c51a2ece4.zip
Bug 470074: revert to plexus-archiver 2.2
Revert "Bug 461974 - Updating the plexus archiver and plexus io plugin " This reverts commit 483f7317d76e4441d8a910dacf614b44cef82727. Revert "Don't use deprecated plexus-archiver API" This reverts commit 066c03d6d6064384c611de540442a21cf75d172a. Change-Id: I7c8338e85384ba7d0bf9da1d54b2d2f1e437e59e Signed-off-by: Jan Sievers <jan.sievers@sap.com>
-rw-r--r--pom.xml10
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/TYCHO0439repositoryCategories/RepositoryCategoriesTest.java8
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/product/Util.java15
-rw-r--r--tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java9
-rw-r--r--tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java3
5 files changed, 30 insertions, 15 deletions
diff --git a/pom.xml b/pom.xml
index bf6fa78c9..ac1a1612f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,7 @@
<junitVersion>3.8.2</junitVersion>
<plexusVersion>1.5.5</plexusVersion>
<plexusInterpolationVersion>1.14</plexusInterpolationVersion>
- <plexusUtilsVersion>3.0.20</plexusUtilsVersion>
+ <plexusUtilsVersion>3.0.7</plexusUtilsVersion>
<securityDispatcherVersion>1.3</securityDispatcherVersion>
<cipherVersion>1.7</cipherVersion>
<modelloVersion>1.4</modelloVersion>
@@ -172,15 +172,19 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-io</artifactId>
- <version>2.6</version>
+ <version>2.0.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
- <version>2.10.1</version>
+ <version>2.2</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
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 cac54a555..be5b03bf1 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;
@@ -44,8 +44,8 @@ public class RepositoryCategoriesTest extends AbstractTychoIntegrationTest {
Document document = null;
ZipFile contentJar = new ZipFile(content);
try {
- ZipEntry entry = contentJar.getEntry("content.xml");
- document = parser.parse(new XMLIOSource(contentJar.getInputStream(entry)));
+ ZipEntry contentXmlEntry = contentJar.getEntry("content.xml");
+ document = parser.parse(new XMLIOSource(contentJar.getInputStream(contentXmlEntry)));
} finally {
contentJar.close();
}
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 8ebb92962..9fef6d3a7 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
@@ -12,11 +12,13 @@ package org.eclipse.tycho.test.product;
import java.io.File;
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 java.util.zip.ZipFile;
+
+import org.codehaus.plexus.archiver.zip.ZipEntry;
+import org.codehaus.plexus.archiver.zip.ZipFile;
import de.pdark.decentxml.Document;
import de.pdark.decentxml.Element;
@@ -32,8 +34,13 @@ class Util {
XMLParser parser = new XMLParser();
ZipFile zip = new ZipFile(zipFile);
try {
- ZipEntry entry = zip.getEntry(xmlFile);
- return parser.parse(new XMLIOSource(zip.getInputStream(entry)));
+ ZipEntry contentXmlEntry = zip.getEntry(xmlFile);
+ InputStream entryStream = zip.getInputStream(contentXmlEntry);
+ try {
+ return parser.parse(new XMLIOSource(entryStream));
+ } finally {
+ entryStream.close();
+ }
} 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 7164d66d1..bca1c0eb8 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,7 +26,6 @@ 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;
@@ -96,9 +95,13 @@ public final class ProductArchiverMojo extends AbstractProductMojo {
productArchivers.put(TAR_GZ_ARCHIVE_FORMAT, new ProductArchiver() {
@Override
Archiver getArchiver() throws ArchiverException {
- tarArchiver.setCompression(TarCompressionMethod.gzip);
+ TarArchiver.TarCompressionMethod tarCompressionMethod = new TarArchiver.TarCompressionMethod();
+ tarCompressionMethod.setValue("gzip"); // surprisingly, compression names are private in plexus
+ tarArchiver.setCompression(tarCompressionMethod);
// avoid lots of long file path (> 100 chars) warnings
- tarArchiver.setLongfile(TarLongFileMode.gnu);
+ TarLongFileMode gnuMode = new TarLongFileMode();
+ gnuMode.setValue(TarLongFileMode.GNU);
+ tarArchiver.setLongfile(gnuMode);
return tarArchiver;
}
});
diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java
index eaa78b693..edf4f3d9e 100644
--- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java
+++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java
@@ -117,7 +117,8 @@ public class LicenseFeatureHelper {
// mavenArchiver ignores license feature files that are also present in 'this' feature
// i.e. if there is a conflict, files from 'this' feature win
- DefaultArchivedFileSet result = new DefaultArchivedFileSet(licenseFeature);
+ DefaultArchivedFileSet result = new DefaultArchivedFileSet();
+ result.setArchive(licenseFeature);
result.setIncludes(includes.toArray(new String[includes.size()]));
result.setExcludes(excludes.toArray(new String[excludes.size()]));

Back to the top