From: Mathieu Baudier Date: Tue, 6 Jul 2010 16:37:46 +0000 (+0000) Subject: Prepare the introduction of Spring 3 X-Git-Tag: argeo-slc-2.1.7~1265 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;ds=sidebyside;h=603eba9ddae4b917fba7e262743c837f71660f8b;p=gpl%2Fargeo-slc.git Prepare the introduction of Spring 3 git-svn-id: https://svn.argeo.org/slc/trunk@3649 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/integration-tests/org.argeo.slc.it.webapp/pom.xml b/integration-tests/org.argeo.slc.it.webapp/pom.xml index fbe7005ad..cf75dba96 100644 --- a/integration-tests/org.argeo.slc.it.webapp/pom.xml +++ b/integration-tests/org.argeo.slc.it.webapp/pom.xml @@ -16,12 +16,14 @@ maven-argeo-osgi-plugin ${version.maven-argeo-osgi} + false -clean ${basedir}/../../demo/site;in=*;ex=target;ex=pom.xml;ex=.*, + ${project.build.directory}/lib;in=*.jar, + class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"> diff --git a/pom.xml b/pom.xml index df1c54f85..8ef3043f5 100644 --- a/pom.xml +++ b/pom.xml @@ -12,9 +12,9 @@ 0.13.0-SNAPSHOT 0.13 - 1.0.4 + 1.1.0-SNAPSHOT 0.12.4 - 0.2.0 + 0.2.1-SNAPSHOT 3.5.1.R35x_v20090827 2.0.1 0.1.28 diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionSpec.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionSpec.java index b8535c572..078ee569e 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionSpec.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionSpec.java @@ -104,6 +104,10 @@ public class DefaultExecutionSpec implements ExecutionSpec, BeanNameAware, } } + /** + * Generates a list of ref value choices based on the bean available in the + * application ocntext. + */ protected List buildRefValueChoices(RefSpecAttribute rsa) { List choices = new ArrayList(); if (applicationContext == null) { @@ -112,8 +116,14 @@ public class DefaultExecutionSpec implements ExecutionSpec, BeanNameAware, return choices; } - for (String beanName : getBeanFactory().getBeanNamesForType( + beanNames: for (String beanName : getBeanFactory().getBeanNamesForType( rsa.getTargetClass(), true, false)) { + + // Since Spring 3, systemProperties is implicitly defined but has no + // bean definition +// if (beanName.equals("systemProperties")) +// continue beanNames; + BeanDefinition bd = getBeanFactory().getBeanDefinition(beanName); RefValueChoice choice = new RefValueChoice(); choice.setName(beanName); diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java index 3c7cd4524..82491fc58 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java @@ -138,4 +138,8 @@ public class ExecutionScope implements Scope { throw new UnsupportedOperationException(); } + public Object resolveContextualObject(String key) { + return executionContext.get().getVariable(key); + } + } diff --git a/runtime/org.argeo.slc.core/src/test/java/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java b/runtime/org.argeo.slc.core/src/test/java/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java index d7a56aeda..4e6b1b167 100644 --- a/runtime/org.argeo.slc.core/src/test/java/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java +++ b/runtime/org.argeo.slc.core/src/test/java/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java @@ -52,6 +52,7 @@ public class FlowNamespaceTest extends AbstractExecutionFlowTestCase { .getBean("testResult")); } + // THis tests causes pb when using Spring 3 public void testContainers() throws Exception { ConfigurableApplicationContext applicationContext = createApplicationContext("containers.xml"); ((ExecutionFlow) applicationContext.getBean("test.list.flow1")).run();