Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2019-05-11 04:41:23 -0400
committerEd Merks2019-05-11 04:41:23 -0400
commit0aa19765bd74c790aebdc91ec191e1210a5d3207 (patch)
treea3801bea205dc326bd173b0873eae0cf4ade3e89
parentbe75f4b2a6bdc95f8224994514c79b7afcbd022e (diff)
downloadorg.eclipse.oomph-0aa19765bd74c790aebdc91ec191e1210a5d3207.tar.gz
org.eclipse.oomph-0aa19765bd74c790aebdc91ec191e1210a5d3207.tar.xz
org.eclipse.oomph-0aa19765bd74c790aebdc91ec191e1210a5d3207.zip
[547178] Support unzipping archives using Resource Copy Task
https://bugs.eclipse.org/bugs/show_bug.cgi?id=547178
-rw-r--r--plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.oomph.setup.core/pom.xml2
-rw-r--r--plugins/org.eclipse.oomph.setup.edit/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.oomph.setup.edit/pom.xml2
-rw-r--r--plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.oomph.setup.editor/pom.xml2
-rw-r--r--plugins/org.eclipse.oomph.setup.git/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.oomph.setup.jdt.edit/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.oomph.setup.jdt/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.oomph.setup/pom.xml2
-rw-r--r--plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/impl/ResourceCopyTaskImpl.java115
14 files changed, 113 insertions, 70 deletions
diff --git a/plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF
index 546f00741..76e5ff9ba 100644
--- a/plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.core/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.oomph.setup.core;singleton:=true
-Bundle-Version: 1.12.0.qualifier
+Bundle-Version: 1.13.0.qualifier
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
@@ -31,15 +31,15 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.equinox.p2.touchpoint.natives;bundle-version="[1.0.0,2.0.0)",
org.eclipse.equinox.p2.updatesite;bundle-version="[1.0.0,2.0.0)",
org.eclipse.equinox.security;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.oomph.base.edit;bundle-version="[1.10.0,2.0.0)",
- org.eclipse.oomph.p2.core;bundle-version="[1.11.0,2.0.0)",
- org.eclipse.oomph.setup;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.base.edit;bundle-version="[1.11.0,2.0.0)",
+ org.eclipse.oomph.p2.core;bundle-version="[1.12.0,2.0.0)",
+ org.eclipse.oomph.setup;bundle-version="[1.13.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.setup.p2;bundle-version="[1.10.0,2.0.0)",
org.eclipse.oomph.preferences;bundle-version="[1.10.0,2.0.0)",
org.eclipse.core.net;bundle-version="[1.2.0,2.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.oomph.setup.internal.core;version="1.12.0";x-internal:=true,
- org.eclipse.oomph.setup.internal.core.util;version="1.12.0";x-internal:=true
+Export-Package: org.eclipse.oomph.setup.internal.core;version="1.13.0";x-internal:=true,
+ org.eclipse.oomph.setup.internal.core.util;version="1.13.0";x-internal:=true
Bundle-Activator: org.eclipse.oomph.setup.internal.core.SetupCorePlugin$Implementation
Automatic-Module-Name: org.eclipse.oomph.setup.core
diff --git a/plugins/org.eclipse.oomph.setup.core/pom.xml b/plugins/org.eclipse.oomph.setup.core/pom.xml
index 14ae8a8e7..305860647 100644
--- a/plugins/org.eclipse.oomph.setup.core/pom.xml
+++ b/plugins/org.eclipse.oomph.setup.core/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.oomph</groupId>
<artifactId>org.eclipse.oomph.setup.core</artifactId>
- <version>1.12.0-SNAPSHOT</version>
+ <version>1.13.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.setup.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.edit/META-INF/MANIFEST.MF
index c52709377..af5032bd9 100644
--- a/plugins/org.eclipse.oomph.setup.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.edit/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.oomph.setup.edit;singleton:=true
-Bundle-Version: 1.12.0.qualifier
+Bundle-Version: 1.13.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.oomph.setup.provider.SetupEditPlugin$Implementation
Bundle-Vendor: %providerName
@@ -10,8 +10,8 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.oomph.setup.provider;version="1.5.0";x-internal:=true
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.oomph.setup;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.setup;bundle-version="[1.13.0,2.0.0)";visibility:=reexport,
org.eclipse.emf.edit;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
- org.eclipse.oomph.base.edit;bundle-version="[1.10.0,2.0.0)";visibility:=reexport
+ org.eclipse.oomph.base.edit;bundle-version="[1.11.0,2.0.0)";visibility:=reexport
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.oomph.setup.edit
diff --git a/plugins/org.eclipse.oomph.setup.edit/pom.xml b/plugins/org.eclipse.oomph.setup.edit/pom.xml
index 2b9972d1c..358e657a8 100644
--- a/plugins/org.eclipse.oomph.setup.edit/pom.xml
+++ b/plugins/org.eclipse.oomph.setup.edit/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.oomph</groupId>
<artifactId>org.eclipse.oomph.setup.edit</artifactId>
- <version>1.12.0-SNAPSHOT</version>
+ <version>1.13.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF
index 0f8779360..5f4f2a8c1 100644
--- a/plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.editor/META-INF/MANIFEST.MF
@@ -2,13 +2,13 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.oomph.setup.editor;singleton:=true
-Bundle-Version: 1.12.0.qualifier
+Bundle-Version: 1.13.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.oomph.setup.presentation.SetupEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.oomph.setup.editor;version="1.12.0";x-internal:=true,
+Export-Package: org.eclipse.oomph.setup.editor;version="1.13.0";x-internal:=true,
org.eclipse.oomph.setup.presentation;version="1.5.0";x-internal:=true,
org.eclipse.oomph.setup.presentation.handlers;version="1.5.0";x-internal:=true,
org.eclipse.oomph.setup.presentation.templates;version="1.5.0";x-internal:=true
@@ -19,19 +19,19 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
org.eclipse.oomph.predicates.edit;bundle-version="[1.10.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.resources.edit;bundle-version="[1.10.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.preferences;bundle-version="[1.10.0,2.0.0)",
- org.eclipse.oomph.setup.edit;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
- org.eclipse.oomph.setup.ui;bundle-version="[1.12.0,2.0.0)",
+ org.eclipse.oomph.setup.edit;bundle-version="[1.13.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.setup.ui;bundle-version="[1.13.0,2.0.0)",
org.eclipse.oomph.setup.sync;bundle-version="[1.10.0,2.0.0)",
org.eclipse.oomph.workingsets.edit;bundle-version="[1.10.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.workingsets.editor;bundle-version="[1.10.0,2.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.edit.ui;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.oomph.ui;bundle-version="[1.10.0,2.0.0)",
+ org.eclipse.oomph.ui;bundle-version="[1.11.0,2.0.0)",
org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
- org.eclipse.oomph.base.edit;bundle-version="[1.10.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.base.edit;bundle-version="[1.11.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.setup.p2.edit;bundle-version="[1.10.0,2.0.0)",
- org.eclipse.oomph.p2.edit;bundle-version="[1.10.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.p2.edit;bundle-version="[1.11.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.p2.ui;bundle-version="[1.10.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.oomph.setup.editor
diff --git a/plugins/org.eclipse.oomph.setup.editor/pom.xml b/plugins/org.eclipse.oomph.setup.editor/pom.xml
index 6ff315df3..c4680329b 100644
--- a/plugins/org.eclipse.oomph.setup.editor/pom.xml
+++ b/plugins/org.eclipse.oomph.setup.editor/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.oomph</groupId>
<artifactId>org.eclipse.oomph.setup.editor</artifactId>
- <version>1.12.0-SNAPSHOT</version>
+ <version>1.13.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.setup.git/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.git/META-INF/MANIFEST.MF
index 84aa7ec27..9e7239639 100644
--- a/plugins/org.eclipse.oomph.setup.git/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.git/META-INF/MANIFEST.MF
@@ -13,7 +13,7 @@ Export-Package: org.eclipse.oomph.setup.git;version="1.13.0";x-internal:=true,
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
- org.eclipse.oomph.setup;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.setup;bundle-version="[1.13.0,2.0.0)";visibility:=reexport,
org.eclipse.egit.core;bundle-version="[2.0.0,6.0.0)",
org.eclipse.jgit;bundle-version="[2.0.0,6.0.0)"
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF
index be9645fdf..04bbbbced 100644
--- a/plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF
@@ -10,8 +10,8 @@ Bundle-Activator: org.eclipse.oomph.setup.internal.installer.SetupInstallerPlugi
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.10.0,3.0.0)",
org.eclipse.emf.edit.ui;bundle-version="[2.10.0,3.0.0)",
- org.eclipse.oomph.setup;bundle-version="[1.12.0,2.0.0)",
- org.eclipse.oomph.setup.edit;bundle-version="[1.12.0,2.0.0)",
+ org.eclipse.oomph.setup;bundle-version="[1.13.0,2.0.0)",
+ org.eclipse.oomph.setup.edit;bundle-version="[1.13.0,2.0.0)",
org.eclipse.oomph.setup.ui;bundle-version="[1.13.0,2.0.0)",
org.eclipse.equinox.p2.operations;bundle-version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
@@ -25,7 +25,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.oomph.ui;bundle-version="[1.11.0,2.0.0)",
org.eclipse.oomph.p2.ui;bundle-version="[1.10.0,2.0.0)",
org.eclipse.oomph.setup.p2;bundle-version="[1.10.0,2.0.0)",
- org.eclipse.oomph.setup.core;bundle-version="[1.12.0,2.0.0)",
+ org.eclipse.oomph.setup.core;bundle-version="[1.13.0,2.0.0)",
org.eclipse.oomph.jreinfo.ui;bundle-version="[1.10.0,2.0.0)",
org.eclipse.help;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui.net;bundle-version="[1.0.0,2.0.0)",
diff --git a/plugins/org.eclipse.oomph.setup.jdt.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.jdt.edit/META-INF/MANIFEST.MF
index 3641e9a58..4dcddad4e 100644
--- a/plugins/org.eclipse.oomph.setup.jdt.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.jdt.edit/META-INF/MANIFEST.MF
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.oomph.setup.jdt;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
org.eclipse.emf.edit;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
org.eclipse.oomph.base.edit;bundle-version="[1.11.0,2.0.0)";visibility:=reexport,
- org.eclipse.oomph.setup.edit;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.setup.edit;bundle-version="[1.13.0,2.0.0)";visibility:=reexport,
org.eclipse.jdt.launching;bundle-version="[3.6.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.oomph.setup.jdt.edit
diff --git a/plugins/org.eclipse.oomph.setup.jdt/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.jdt/META-INF/MANIFEST.MF
index 3385dcb3e..464c75d05 100644
--- a/plugins/org.eclipse.oomph.setup.jdt/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.jdt/META-INF/MANIFEST.MF
@@ -12,7 +12,7 @@ Export-Package: org.eclipse.oomph.setup.jdt;version="1.12.0";x-internal:=true,
org.eclipse.oomph.setup.jdt.util;version="1.12.0";x-internal:=true
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
- org.eclipse.oomph.setup;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.setup;bundle-version="[1.13.0,2.0.0)";visibility:=reexport,
org.eclipse.jdt.launching;bundle-version="[3.6.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.oomph.setup.jdt
diff --git a/plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF
index f1bb46008..165bb1940 100644
--- a/plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.ui/META-INF/MANIFEST.MF
@@ -26,8 +26,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.nebula.widgets.tablecombo;bundle-version="[1.0.0,2.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.edit.ui;bundle-version="[2.10.0,3.0.0)";visibility:=reexport,
- org.eclipse.oomph.setup.core;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
- org.eclipse.oomph.setup.edit;bundle-version="[1.12.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.setup.core;bundle-version="[1.13.0,2.0.0)";visibility:=reexport,
+ org.eclipse.oomph.setup.edit;bundle-version="[1.13.0,2.0.0)";visibility:=reexport,
org.eclipse.oomph.setup.p2.edit;bundle-version="[1.10.0,2.0.0)",
org.eclipse.oomph.setup.sync;bundle-version="[1.10.0,2.0.0)",
org.eclipse.oomph.ui;bundle-version="[1.11.0,2.0.0)",
diff --git a/plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF
index 1e38440dd..7f8ed310d 100644
--- a/plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.oomph.setup;singleton:=true
-Bundle-Version: 1.12.0.qualifier
+Bundle-Version: 1.13.0.qualifier
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
@@ -16,10 +16,10 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.10.0,3.0.0)";visibility:=reexport
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.oomph.internal.setup;version="1.12.0";x-internal:=true,
- org.eclipse.oomph.setup;version="1.12.0";x-internal:=true,
- org.eclipse.oomph.setup.impl;version="1.12.0";x-internal:=true,
- org.eclipse.oomph.setup.log;version="1.12.0";x-internal:=true,
- org.eclipse.oomph.setup.util;version="1.12.0";x-internal:=true
+Export-Package: org.eclipse.oomph.internal.setup;version="1.13.0";x-internal:=true,
+ org.eclipse.oomph.setup;version="1.13.0";x-internal:=true,
+ org.eclipse.oomph.setup.impl;version="1.13.0";x-internal:=true,
+ org.eclipse.oomph.setup.log;version="1.13.0";x-internal:=true,
+ org.eclipse.oomph.setup.util;version="1.13.0";x-internal:=true
Bundle-Activator: org.eclipse.oomph.internal.setup.SetupPlugin$Implementation
Automatic-Module-Name: org.eclipse.oomph.setup
diff --git a/plugins/org.eclipse.oomph.setup/pom.xml b/plugins/org.eclipse.oomph.setup/pom.xml
index 5cbeb177e..05ecde1a5 100644
--- a/plugins/org.eclipse.oomph.setup/pom.xml
+++ b/plugins/org.eclipse.oomph.setup/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.oomph</groupId>
<artifactId>org.eclipse.oomph.setup</artifactId>
- <version>1.12.0-SNAPSHOT</version>
+ <version>1.13.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/impl/ResourceCopyTaskImpl.java b/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/impl/ResourceCopyTaskImpl.java
index 4337ea926..0c302d96b 100644
--- a/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/impl/ResourceCopyTaskImpl.java
+++ b/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/impl/ResourceCopyTaskImpl.java
@@ -14,6 +14,7 @@ import org.eclipse.oomph.setup.ResourceCopyTask;
import org.eclipse.oomph.setup.SetupPackage;
import org.eclipse.oomph.setup.SetupTaskContext;
import org.eclipse.oomph.util.IOUtil;
+import org.eclipse.oomph.util.ZIPUtil;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.URI;
@@ -22,6 +23,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.resource.URIConverter;
import java.io.File;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -314,6 +316,38 @@ public class ResourceCopyTaskImpl extends SetupTaskImpl implements ResourceCopyT
return 2;
}
+ protected boolean isFile(URI uri)
+ {
+ if (uri.isFile())
+ {
+ return true;
+ }
+
+ URI archiveURI = getArchiveURI(uri);
+ return archiveURI != null && archiveURI.isFile();
+ }
+
+ protected URI getArchiveURI(URI uri)
+ {
+ if (uri.isArchive())
+ {
+ String authority = uri.authority();
+ if (authority != null && authority.endsWith("!"))
+ {
+ URI archiveURI = URI.createURI(authority.substring(0, authority.length() - 1));
+ archiveURI.appendQuery(uri.query());
+ return archiveURI;
+ }
+ }
+
+ return null;
+ }
+
+ protected boolean isFolder(URI uri)
+ {
+ return uri.hasTrailingPathSeparator() || uri.lastSegment() == null;
+ }
+
public boolean isNeeded(SetupTaskContext context) throws Exception
{
URI sourceURI = createResolvedURI(getSourceURL());
@@ -325,11 +359,11 @@ public class ResourceCopyTaskImpl extends SetupTaskImpl implements ResourceCopyT
}
URIConverter uriConverter = context.getURIConverter();
- if (targetURI.hasTrailingPathSeparator())
+ if (isFolder(targetURI))
{
- if (sourceURI.hasTrailingPathSeparator())
+ if (isFolder(sourceURI))
{
- if (uriConverter.normalize(targetURI).isFile() && uriConverter.normalize(sourceURI).isFile())
+ if (isFile(uriConverter.normalize(targetURI)))
{
return isForce() || !uriConverter.exists(targetURI, null);
}
@@ -343,6 +377,24 @@ public class ResourceCopyTaskImpl extends SetupTaskImpl implements ResourceCopyT
return isForce() || !uriConverter.exists(targetURI, null);
}
+ protected void copy(URIConverter uriConverter, URI sourceURI, URI targetURI) throws IOException
+ {
+ InputStream input = null;
+ OutputStream output = null;
+
+ try
+ {
+ input = uriConverter.createInputStream(sourceURI);
+ output = uriConverter.createOutputStream(targetURI, null);
+ IOUtil.copy(input, output);
+ }
+ finally
+ {
+ IOUtil.closeSilent(input);
+ IOUtil.closeSilent(output);
+ }
+ }
+
public void perform(SetupTaskContext context) throws Exception
{
URI sourceURI = createResolvedURI(getSourceURL());
@@ -351,12 +403,31 @@ public class ResourceCopyTaskImpl extends SetupTaskImpl implements ResourceCopyT
URI normalizedSourceURI = uriConverter.normalize(sourceURI);
URI normalizedTargetURI = uriConverter.normalize(targetURI);
- if (targetURI.hasTrailingPathSeparator())
+ if (isFolder(targetURI))
{
- if (sourceURI.hasTrailingPathSeparator())
+ if (isFolder(sourceURI))
{
- if (normalizedTargetURI.isFile() && normalizedSourceURI.isFile())
+ if (normalizedSourceURI.isArchive() && isFile(normalizedTargetURI))
{
+ URI archiveURI = getArchiveURI(normalizedSourceURI);
+ if (isFile(archiveURI))
+ {
+ context.log("Unzipping resource " + normalizedSourceURI + " to " + normalizedTargetURI);
+ ZIPUtil.unzip(new File(archiveURI.toFileString()), new File(normalizedTargetURI.toFileString()));
+ }
+ else
+ {
+ File tempZipFile = File.createTempFile("archive", "zip");
+ context.log("Downloading resource " + uriConverter.normalize(archiveURI) + " to temp file " + tempZipFile);
+ copy(uriConverter, archiveURI, URI.createFileURI(tempZipFile.getAbsolutePath()));
+
+ context.log("Unzipping temp file " + tempZipFile + " to " + normalizedTargetURI);
+ ZIPUtil.unzip(tempZipFile, new File(normalizedTargetURI.toFileString()));
+ }
+ }
+ else if (isFile(normalizedTargetURI) && isFile(normalizedSourceURI))
+ {
+ context.log("Copying folder " + normalizedSourceURI + " to " + normalizedTargetURI);
IOUtil.copyTree(new File(normalizedSourceURI.toFileString()), new File(normalizedTargetURI.toFileString()));
}
else
@@ -368,41 +439,13 @@ public class ResourceCopyTaskImpl extends SetupTaskImpl implements ResourceCopyT
{
URI targetResourceURI = targetURI.appendSegment(sourceURI.lastSegment());
context.log("Copying resource " + normalizedSourceURI + " to " + uriConverter.normalize(targetResourceURI));
-
- InputStream input = null;
- OutputStream output = null;
-
- try
- {
- input = uriConverter.createInputStream(sourceURI);
- output = uriConverter.createOutputStream(targetResourceURI, null);
- IOUtil.copy(input, output);
- }
- finally
- {
- IOUtil.closeSilent(input);
- IOUtil.closeSilent(output);
- }
+ copy(uriConverter, sourceURI, targetResourceURI);
}
}
else if (uriConverter.exists(sourceURI, null))
{
context.log("Copying resource " + normalizedSourceURI + " to " + normalizedTargetURI);
-
- InputStream input = null;
- OutputStream output = null;
-
- try
- {
- input = uriConverter.createInputStream(sourceURI);
- output = uriConverter.createOutputStream(targetURI, null);
- IOUtil.copy(input, output);
- }
- finally
- {
- IOUtil.closeSilent(input);
- IOUtil.closeSilent(output);
- }
+ copy(uriConverter, sourceURI, targetURI);
}
else
{

Back to the top