summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-spring/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-09-01 23:00:24 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-09-01 23:00:24 +0000
commit0ec0ec377b22783500b5d692d391b70ee37045ea (patch)
tree9e43b3f835e5718814bf3771dd332f75f227794a /sca-java-2.x/trunk/modules/implementation-spring/src
parent1ec8932a224de7f9beb078d49ca084b3cf1c7301 (diff)
Allow the location to be out of the contribution root
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@991751 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-spring/src')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java b/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
index cca7586734..4fbe5da43d 100644
--- a/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
+++ b/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
@@ -297,6 +297,11 @@ public class SpringXMLComponentTypeLoader {
if (!artifact.isUnresolved()) {
resource = new URL(artifact.getLocation());
} else {
+ // The resource can be out of scope of the contribution root
+ if (parent != null && parent.getLocation() != null) {
+ resource = new URL(new URL(parent.getLocation()), contextPath);
+ return resource;
+ }
throw new ContributionReadException("Location cannot be resloved: " + contextPath);
}
} else {