summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-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 {