summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/node-impl
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-17 05:43:52 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-17 05:43:52 +0000
commit2e35d1e1585b28d2b5acf08b1d87daee67bf2d94 (patch)
tree5b04f9b51ddbffa457fcf75be973edcb89e2015d /branches/sca-equinox/modules/node-impl
parente88e2112b229af176ea2e98f5f5f8dd7b863fd4f (diff)
TUSCANY-2598: Apply fix from Dave Sowerby to support zip protocol type
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696158 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/node-impl')
-rw-r--r--branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
index 36069bb7ee..a8a076a602 100644
--- a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
+++ b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
@@ -273,6 +273,12 @@ public class NodeImpl implements SCANode, 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(),