diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-15 14:50:15 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-15 14:50:15 +0000 |
commit | 194d160392e5e782b885d4dbd07b451f03689896 (patch) | |
tree | ae446f2a3b36f53f540f1d33993ab4a15299f7f4 /java/sca/modules | |
parent | ecfc25c5a329a3e7528d8aff7279adfd68965806 (diff) |
TUSCANY-2598: Apply fix from Dave Sowerby to support zip protocol type
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@695486 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r-- | java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index 36069bb7ee..a8a076a602 100644 --- a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/java/sca/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(), |