diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-21 13:14:57 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-21 13:14:57 +0000 |
commit | bca8bdc82799c12f9f1bdfeaa09177db3c2ca77a (patch) | |
tree | 67a899f5b5f6541427c566c4f1a280cac07be899 /sca-java-2.x/trunk/modules | |
parent | a51dadea1a6c28a0b4e1fceafbee00c835320399 (diff) |
Don't do the build time binding if errors have been reported during the build steps
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1173616 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
2 files changed, 20 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java b/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java index 70e3815f35..0725237936 100644 --- a/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java +++ b/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java @@ -600,10 +600,12 @@ public class DeployerImpl implements Deployer { // build the top level composite BuilderContext builderContext = new BuilderContext(systemDefinitions, bindingMap, monitor); compositeBuilder.build(domainComposite, builderContext); - // analyzeProblems(monitor); - - // do build time reference binding - buildTimeReferenceBind(domainComposite, builderContext); + + // only do the local build if we know no errors have been detected + if (!monitor.isErrorDetected()) { + // do build time reference binding + buildTimeReferenceBind(domainComposite, builderContext); + } return domainComposite; } diff --git a/sca-java-2.x/trunk/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java b/sca-java-2.x/trunk/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java index 3eda98ee23..eca0b9aba1 100644 --- a/sca-java-2.x/trunk/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java +++ b/sca-java-2.x/trunk/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java @@ -361,4 +361,18 @@ public abstract class Monitor { reset(); } } + + public boolean isErrorDetected() { + + boolean errorDetected = false; + + for (Problem problem : getProblems()) { + if ((problem.getSeverity() == Severity.ERROR)) { + errorDetected = true; + break; + } + } + + return errorDetected; + } } |