[jboss-cvs] JBossAS SVN: r101605 - in projects/snowdrop/trunk: documentation/samples/web-scanning/src/main/resources/spring-contexts and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Feb 27 14:33:29 EST 2010


Author: marius.bogoevici
Date: 2010-02-27 14:33:29 -0500 (Sat, 27 Feb 2010)
New Revision: 101605

Added:
   projects/snowdrop/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/imported.xml
   projects/snowdrop/trunk/documentation/samples/web-scanning/web-scanning.iml
   projects/snowdrop/trunk/vfs/src/test/resources/org/
   projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/
   projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/
   projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/
   projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/
   projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/importer.xml
   projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/spring-app-config.xml
Modified:
   projects/snowdrop/trunk/documentation/samples/web-scanning/pom.xml
   projects/snowdrop/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/web.xml
   projects/snowdrop/trunk/vfs/src/main/java/org/jboss/spring/vfs/VFSResource.java
   projects/snowdrop/trunk/vfs/src/test/java/org/jboss/spring/vfs/context/SpringResourceLoadingTestCase.java
Log:
SNOWDROP-10 fixed in the 1.1 branch (including tests).

Modified: projects/snowdrop/trunk/documentation/samples/web-scanning/pom.xml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/web-scanning/pom.xml	2010-02-27 11:29:45 UTC (rev 101604)
+++ projects/snowdrop/trunk/documentation/samples/web-scanning/pom.xml	2010-02-27 19:33:29 UTC (rev 101605)
@@ -40,7 +40,7 @@
       </dependency>      
       <dependency>
           <groupId>org.jboss.snowdrop</groupId>
-          <artifactId>snowdrop-extensions</artifactId>
+          <artifactId>snowdrop-deployers</artifactId>
           <version>1.1.0-SNAPSHOT</version>
       </dependency>
       <dependency>

Added: projects/snowdrop/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/imported.xml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/imported.xml	                        (rev 0)
+++ projects/snowdrop/trunk/documentation/samples/web-scanning/src/main/resources/spring-contexts/imported.xml	2010-02-27 19:33:29 UTC (rev 101605)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+</beans>              
\ No newline at end of file

Modified: projects/snowdrop/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/web.xml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/web.xml	2010-02-27 11:29:45 UTC (rev 101604)
+++ projects/snowdrop/trunk/documentation/samples/web-scanning/src/main/webapp/WEB-INF/web.xml	2010-02-27 19:33:29 UTC (rev 101605)
@@ -10,26 +10,17 @@
     <param-value>classpath*:spring-contexts/*.xml</param-value>
   </context-param>
 
-  <context-param>
-    <param-name>contextClass</param-name>
-    <param-value>org.jboss.spring.vfs.context.VFSXmlWebApplicationContext</param-value>
-  </context-param>
-
   <listener>
-    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    <listener-class>org.jboss.spring.vfs.context.DelegatingContextLoaderListener</listener-class>
   </listener>
 
   <servlet>
     <servlet-name>spring-mvc-servlet</servlet-name>
-    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+    <servlet-class>org.jboss.spring.vfs.context.DelegatingDispatcherServlet</servlet-class>
     <init-param>
       <param-name>contextConfigLocation</param-name>
       <param-value>/WEB-INF/mvc-config.xml</param-value>
     </init-param>
-    <init-param>
-      <param-name>contextClass</param-name>
-      <param-value>org.jboss.spring.vfs.context.VFSXmlWebApplicationContext</param-value>
-    </init-param>
   </servlet>
 
   <servlet-mapping>

Added: projects/snowdrop/trunk/documentation/samples/web-scanning/web-scanning.iml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/web-scanning/web-scanning.iml	                        (rev 0)
+++ projects/snowdrop/trunk/documentation/samples/web-scanning/web-scanning.iml	2010-02-27 19:33:29 UTC (rev 101605)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="web" name="Web">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
+        </webroots>
+        <context-artifact name="web-scanning:war exploded" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" exported="" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" exported="" name="Maven: org.springframework:spring-context:2.5.6.SEC01" level="project" />
+    <orderEntry type="library" exported="" name="Maven: aopalliance:aopalliance:1.0" level="project" />
+    <orderEntry type="library" exported="" name="Maven: org.springframework:spring-beans:2.5.6.SEC01" level="project" />
+    <orderEntry type="library" exported="" name="Maven: org.springframework:spring-core:2.5.6.SEC01" level="project" />
+    <orderEntry type="library" exported="" name="Maven: org.springframework:spring-web:2.5.6.SEC01" level="project" />
+    <orderEntry type="library" exported="" name="Maven: org.springframework:spring-webmvc:2.5.6.SEC01" level="project" />
+    <orderEntry type="library" exported="" name="Maven: org.springframework:spring-context-support:2.5.6.SEC01" level="project" />
+    <orderEntry type="module" module-name="snowdrop-deployers" exported="" />
+    <orderEntry type="module" module-name="snowdrop-vfs" exported="" />
+    <orderEntry type="module" module-name="snowdrop-weaving" exported="" />
+    <orderEntry type="library" exported="" name="Maven: org.springframework:spring-aop:2.5.6" level="project" />
+    <orderEntry type="library" exported="" name="Maven: javax.servlet:jstl:1.1.0" level="project" />
+    <orderEntry type="library" exported="" name="Maven: taglibs:standard:1.1.1" level="project" />
+  </component>
+</module>
+

Modified: projects/snowdrop/trunk/vfs/src/main/java/org/jboss/spring/vfs/VFSResource.java
===================================================================
--- projects/snowdrop/trunk/vfs/src/main/java/org/jboss/spring/vfs/VFSResource.java	2010-02-27 11:29:45 UTC (rev 101604)
+++ projects/snowdrop/trunk/vfs/src/main/java/org/jboss/spring/vfs/VFSResource.java	2010-02-27 19:33:29 UTC (rev 101605)
@@ -112,7 +112,7 @@
    public Resource createRelative(String relativePath) throws IOException
    {
       //VirtualFile.findChild will not scan the parent or current directory
-      if (relativePath.startsWith("."))
+      if (relativePath.startsWith(".") || relativePath.indexOf("/")==-1)
          return new VFSResource(getChild(new URL(getURL(), relativePath)));
       else
          return new VFSResource(file.getChild(relativePath));

Modified: projects/snowdrop/trunk/vfs/src/test/java/org/jboss/spring/vfs/context/SpringResourceLoadingTestCase.java
===================================================================
--- projects/snowdrop/trunk/vfs/src/test/java/org/jboss/spring/vfs/context/SpringResourceLoadingTestCase.java	2010-02-27 11:29:45 UTC (rev 101604)
+++ projects/snowdrop/trunk/vfs/src/test/java/org/jboss/spring/vfs/context/SpringResourceLoadingTestCase.java	2010-02-27 19:33:29 UTC (rev 101605)
@@ -70,4 +70,15 @@
       Assert.assertNotNull(r);
    }
 
+   @Test
+   public void testLoadImportLocally()
+   {
+      VFSXmlWebApplicationContext context = new VFSXmlWebApplicationContext();
+      context.setConfigLocations(new String[]{"classpath:/org/jboss/spring/vfs/context/spring-*.xml"});
+      context.refresh();
+      String myBean = (String) context.getBean("myBean");
+      Resource r = context.getResource("classpath:/spring-config/spring-app-config.xml");
+      Assert.assertNotNull(r);
+   }
+
 }

Added: projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/importer.xml
===================================================================
--- projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/importer.xml	                        (rev 0)
+++ projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/importer.xml	2010-02-27 19:33:29 UTC (rev 101605)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <import resource="spring-app-config.xml"/>
+    
+</beans>
\ No newline at end of file

Copied: projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/spring-app-config.xml (from rev 97593, projects/snowdrop/trunk/vfs/src/test/resources/spring-config/spring-app-config.xml)
===================================================================
--- projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/spring-app-config.xml	                        (rev 0)
+++ projects/snowdrop/trunk/vfs/src/test/resources/org/jboss/spring/vfs/context/spring-app-config.xml	2010-02-27 19:33:29 UTC (rev 101605)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean id="myBean" class="java.lang.String"/>
+    
+</beans>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list