]> git.argeo.org Git - gpl/argeo-slc.git/commitdiff
Prepare the introduction of Spring 3
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 6 Jul 2010 16:37:46 +0000 (16:37 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 6 Jul 2010 16:37:46 +0000 (16:37 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@3649 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

integration-tests/org.argeo.slc.it.webapp/pom.xml
modules/server/org.argeo.slc.webapp.war/META-INF/MANIFEST.MF
modules/server/org.argeo.slc.webapp.war/WEB-INF/slc-service-servlet.xml
pom.xml
runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionSpec.java
runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/ExecutionScope.java
runtime/org.argeo.slc.core/src/test/java/org/argeo/slc/core/execution/xml/FlowNamespaceTest.java

index fbe7005ad15e59d9033da7388b478109d39eb05d..cf75dba962fb4dc965ed6f751ba836e02298b844 100644 (file)
                                <artifactId>maven-argeo-osgi-plugin</artifactId>
                                <version>${version.maven-argeo-osgi}</version>
                                <configuration>
+                                       <useDependencies>false</useDependencies>
                                        <argsToAppend>
                                                <arg>-clean</arg>
                                        </argsToAppend>
                                        <systemProperties>
                                                <argeo.osgi.bundles>
                                                        ${basedir}/../../demo/site;in=*;ex=target;ex=pom.xml;ex=.*,
+                                                       ${project.build.directory}/lib;in=*.jar,
                                                </argeo.osgi.bundles>
                                                <!--
                                                        <argeo.osgi.bundles>
                                        </execution>
                                </executions>
                        </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-dependency-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>copy-dependencies</id>
+                                               <phase>process-resources</phase>
+                                               <goals>
+                                                       <goal>copy-dependencies</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <includeTypes>jar</includeTypes>
+                                                       <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
                </plugins>
        </build>
        <dependencies>
index 0f62a13ff754ae590bcff2d3ddefb22276dd7c61..cd331346e41b0d3ffa734b9d655d5c9f1aba6e3b 100644 (file)
@@ -59,4 +59,5 @@ Import-Package: javax.jcr;specification-version="1.0.0",
  org.springframework.web.servlet,
  org.springframework.web.servlet.handler,
  org.springframework.web.servlet.mvc,
+ org.springframework.web.servlet.mvc.annotation,
  org.springframework.web.servlet.view;specification-version="2.5.6.SEC01"
index 197ccb25ec1376871fb77fc111b62a400fab9bb8..4a08fc1163eb51ee28e88c511238dc0d6028a91e 100644 (file)
@@ -58,7 +58,7 @@
 
        <!-- MVC -->
        <bean id="handlerMapping"
-               class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping">
+               class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
                <property name="interceptors">
                        <list>
                                <ref bean="osivInterceptor" />
diff --git a/pom.xml b/pom.xml
index df1c54f851ad3848695f459aecd89985e8d3b7c8..8ef3043f5b40901cfd676c2e75414542918deb0c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -12,9 +12,9 @@
        <version>0.13.0-SNAPSHOT</version>
        <properties>
                <developmentCycle>0.13</developmentCycle>
-               <version.argeo-distribution>1.0.4</version.argeo-distribution>
+               <version.argeo-distribution>1.1.0-SNAPSHOT</version.argeo-distribution>
                <version.argeo-ria>0.12.4</version.argeo-ria>
-               <version.argeo-commons>0.2.0</version.argeo-commons>
+               <version.argeo-commons>0.2.1-SNAPSHOT</version.argeo-commons>
                <version.equinox>3.5.1.R35x_v20090827</version.equinox>
                <version.maven-bundle-plugin>2.0.1</version.maven-bundle-plugin>
                <version.maven-argeo-osgi>0.1.28</version.maven-argeo-osgi>
index b8535c572a2f72150fa10d6c62ffd9b888f10aa6..078ee569e53e78f30cc85871bfa66641c1fa3a33 100644 (file)
@@ -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<RefValueChoice> buildRefValueChoices(RefSpecAttribute rsa) {
                List<RefValueChoice> choices = new ArrayList<RefValueChoice>();
                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);
index 3c7cd45248db1afa7551c50992d78e0ca0ebb22d..82491fc589b163f2aca6c19c4c2839081cfc6446 100644 (file)
@@ -138,4 +138,8 @@ public class ExecutionScope implements Scope {
                throw new UnsupportedOperationException();
        }
 
+       public Object resolveContextualObject(String key) {
+               return executionContext.get().getVariable(key);
+       }
+
 }
index d7a56aeda249914075b3081c64952194790f5f53..4e6b1b167f5efb15ed7006ab49bf9c826af41918 100644 (file)
@@ -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();