From df1e1e0109c5f7c4e4835285a8f677c70014d876 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 15 Sep 2008 15:40:23 +0000 Subject: TUSCANY-2598: Apply fix from Dave Sowerby to 1.3.2 branch to support zip protocol type git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@695512 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'branches/sca-java-1.3.2/modules/node2-impl/src/main') 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(), -- cgit v1.2.3