TUSCANY-2598: Apply fix from Dave Sowerby to support zip protocol type

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696169 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jsdelfino 2008-09-17 06:23:44 +00:00
parent d2cb32e2fe
commit 090149ae2f

View file

@ -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(),