diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-15 15:40:23 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-15 15:40:23 +0000 |
commit | df1e1e0109c5f7c4e4835285a8f677c70014d876 (patch) | |
tree | 859f1293434d84d0c7822a98db04d4a6ba1c8ba2 /branches/sca-java-1.3.2/modules/node2-impl/src/main | |
parent | 194d160392e5e782b885d4dbd07b451f03689896 (diff) |
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
Diffstat (limited to 'branches/sca-java-1.3.2/modules/node2-impl/src/main')
-rw-r--r-- | branches/sca-java-1.3.2/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
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(), |