diff options
Diffstat (limited to '')
2 files changed, 12 insertions, 0 deletions
diff --git a/branches/sca-java-1.3.2/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java b/branches/sca-java-1.3.2/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java index 875a139ca2..e029fce35b 100644 --- a/branches/sca-java-1.3.2/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java +++ b/branches/sca-java-1.3.2/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java @@ -471,6 +471,12 @@ public class DefaultSCADomain extends SCADomain { // workaround for evil url/uri from maven contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL(); + } else if ("zip".equals(protocol)) { + // See https://issues.apache.org/jira/browse/TUSCANY-2598 + // zip contribution, remove the zip prefix and pad with file: + String location = "file:"+url.substring(4, url.lastIndexOf("!/")); + contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL(); + } else if (protocol != null && (protocol.equals("bundle") || protocol.equals("bundleresource"))) { contributionURL = new URL(contributionArtifactURL.getProtocol(), contributionArtifactURL.getHost(), diff --git a/branches/sca-java-1.3.2/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/branches/sca-java-1.3.2/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index cb2ee6e4c7..745d8558cf 100644 --- a/branches/sca-java-1.3.2/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/branches/sca-java-1.3.2/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -299,6 +299,12 @@ public class NodeImpl implements SCANode2, SCAClient { // workaround for evil url/uri from maven contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL(); + } else if ("zip".equals(protocol)) { + // See https://issues.apache.org/jira/browse/TUSCANY-2598 + // zip contribution, remove the zip prefix and pad with file: + String location = "file:"+url.substring(4, url.lastIndexOf("!/")); + contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL(); + } else if (protocol != null && (protocol.equals("bundle") || protocol.equals("bundleresource"))) { contributionURL = new URL(contributionArtifactURL.getProtocol(), contributionArtifactURL.getHost(), |