import org.apache.commons.logging.LogFactory;\r
import org.apache.tools.ant.BuildException;\r
import org.argeo.slc.ant.SlcAntConfig;\r
+import org.argeo.slc.ant.SlcAntConstants;\r
import org.argeo.slc.ant.spring.SpringArg;\r
import org.argeo.slc.ant.structure.SAwareTask;\r
import org.argeo.slc.core.deploy.DeployedSystem;\r
import org.argeo.slc.core.test.TestResult;\r
import org.argeo.slc.core.test.WritableTestRun;\r
import org.argeo.slc.spring.SpringUtils;\r
+import org.springframework.beans.BeansException;\r
\r
/** Ant task wrapping a test run. */\r
public class SlcTestTask extends SAwareTask {\r
if (testRunBean != null) {\r
testRunBeanT = testRunBean;\r
} else {\r
- testRunBeanT = getProject().getUserProperty(\r
- SlcAntConfig.DEFAULT_TEST_RUN_PROPERTY);\r
+ testRunBeanT = getProject().getProperty(\r
+ SlcAntConstants.DEFAULT_TEST_RUN_PROPERTY);\r
}\r
WritableTestRun testRun = null;\r
\r
if (testRunBeanT != null) {\r
- testRun = (WritableTestRun) getContext().getBean(testRunBeanT);\r
- if (log.isTraceEnabled())\r
- log.trace("Load test run bean from bean name " + testRunBeanT);\r
+ try {\r
+ testRun = (WritableTestRun) getContext().getBean(testRunBeanT);\r
+ if (log.isTraceEnabled())\r
+ log.trace("Load test run bean from bean name " + testRunBeanT);\r
+ } catch (BeansException e) {\r
+ // silent, will try defaults\r
+ }\r
}\r
\r
if (testRun == null) {\r