portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r643660 - in /portals/jetspeed-2/portal/trunk/components: jetspeed-capability/ jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/ jetspeed-capability/src/test/resources/boot/ jetspeed-cm/src/main/java/org/apache/jetspeed/co...
Date Wed, 02 Apr 2008 00:10:49 GMT
Author: ate
Date: Tue Apr  1 17:10:46 2008
New Revision: 643660

URL: http://svn.apache.org/viewvc?rev=643660&view=rev
Log:
Configuring Spring configuration filtering for the unit test to load a non-standard jdbc based
JetspeedDS instead of the default jndi version.
As result, all custom test boot/datasource.xml files are no longer needed as the standard
assembly/boot/datasource.xml itself now can be used for the unit tests too.

Removed:
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/resources/boot/
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/resources/boot/
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/resources/boot/
    portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/resources/boot/
    portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/resources/boot/
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/resources/boot/
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/resources/boot/
    portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/resources/boot/
Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/pom.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/pom.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/pom.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/pom.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/pom.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/pom.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/pom.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/pom.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-capability/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-capability/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-capability/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-capability/pom.xml Tue Apr  1 17:10:46
2008
@@ -89,9 +89,9 @@
                    <resources>
                        <resource>
                            <path>assembly</path>
-                           <include>capabilities.xml,transaction.xml</include>
+                           <include>capabilities.xml,transaction.xml,boot/datasource.xml</include>
                        </resource>
-                       <resource>
+                     <resource>
                            <path>db-ojb</path>
                        </resource>
                        <resource>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java
Tue Apr  1 17:10:46 2008
@@ -17,6 +17,7 @@
 
 package org.apache.jetspeed.capabilities;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -24,6 +25,7 @@
 
 import junit.framework.Test;
 
+import org.apache.jetspeed.components.JetspeedBeanDefinitionFilter;
 import org.apache.jetspeed.components.test.AbstractSpringTestCase;
 import org.apache.jetspeed.serializer.JetspeedSerializer;
 
@@ -539,5 +541,10 @@
     {
         return new String[]
         { "boot/datasource.xml"};
+    }
+
+    protected String getBeanDefinitionFilterCategories()
+    {
+        return "jdbcDS";
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/test/AbstractSpringTestCase.java
Tue Apr  1 17:10:46 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.components.test;
 
+import java.io.IOException;
 import java.util.Properties;
 
 import org.apache.jetspeed.components.JetspeedBeanDefinitionFilter;
@@ -75,8 +76,10 @@
         return new Properties();
     }
     
-    protected JetspeedBeanDefinitionFilter getBeanDefinitionFilter()
+    protected JetspeedBeanDefinitionFilter getBeanDefinitionFilter() throws IOException
     {
-        return null;
+        return new JetspeedBeanDefinitionFilter(getBeanDefinitionFilterCategories());
     }
+    
+    protected abstract String getBeanDefinitionFilterCategories();
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java
Tue Apr  1 17:10:46 2008
@@ -76,4 +76,9 @@
     {
         return new String[] {"org/apache/jetspeed/cache/general/cache-test.xml"};
     }
+
+    protected String getBeanDefinitionFilterCategories()
+    {
+        return "default";
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/pom.xml Tue Apr  1 17:10:46
2008
@@ -153,7 +153,7 @@
                                 <resources>
                                     <resource>
                                         <path>assembly</path>
-                                        <include>transaction.xml</include>
+                                        <include>transaction.xml,boot/datasource.xml</include>
                                         <destination>test-classes</destination>
                                     </resource>
                                     <resource>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/pom.xml Tue Apr  1 17:10:46
2008
@@ -83,4 +83,35 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>${pom.groupId}</groupId>
+                <artifactId>jetspeed-unpack-maven-plugin</artifactId>
+                <version>${pom.version}</version>
+                <executions>
+                    <execution>
+                        <id>unpack-test-resources</id>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <phase>process-test-resources</phase>
+                        <configuration>
+                            <skip>${maven.test.skip}</skip>
+                            <unpack>
+                                <targetDirectory>${project.build.testOutputDirectory}</targetDirectory>
+                                <resources>
+                                    <resource>
+                                        <path>assembly</path>
+                                        <include>boot/datasource.xml</include>
+                                    </resource>
+                                </resources>
+                            </unpack>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    
 </project>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
Tue Apr  1 17:10:46 2008
@@ -114,6 +114,11 @@
     {
         return new String[] {"/JETSPEED-INF/spring/test-spring.xml"};
     }
+    
+    protected String getBeanDefinitionFilterCategories()
+    {
+        return "default";
+    }
 
     /**
      * testPageManagerSetup - Test PageManager test configuration

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/pom.xml Tue Apr  1 17:10:46
2008
@@ -106,7 +106,7 @@
                                 <resources>
                                     <resource>
                                         <path>assembly</path>
-                                        <include>prefs.xml,transaction.xml,cache.xml</include>
+                                        <include>prefs.xml,transaction.xml,cache.xml,boot/datasource.xml</include>
                                     </resource>
                                     <resource>
                                         <path>db-ojb</path>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml Tue Apr  1 17:10:46
2008
@@ -113,7 +113,7 @@
                                 <resources>
                                     <resource>
                                         <path>assembly</path>
-                                        <include>profiler.xml,transaction.xml,prefs.xml,cache.xml,security-*.xml</include>
+                                        <include>profiler.xml,transaction.xml,prefs.xml,cache.xml,security-*.xml,boot/datasource.xml</include>
                                     </resource>
                                     <resource>
                                         <path>db-ojb</path>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/pom.xml Tue Apr  1 17:10:46
2008
@@ -93,6 +93,35 @@
     
   </dependencies>
   
-  <!-- TODO: test setup configuration -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>${pom.groupId}</groupId>
+        <artifactId>jetspeed-unpack-maven-plugin</artifactId>
+        <version>${pom.version}</version>
+        <executions>
+          <execution>
+            <id>unpack-test-resources</id>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <phase>process-test-resources</phase>
+            <configuration>
+              <skip>${maven.test.skip}</skip>
+              <unpack>
+                <targetDirectory>${project.build.testOutputDirectory}</targetDirectory>
+                <resources>
+                  <resource>
+                    <path>assembly</path>
+                    <include>boot/datasource.xml</include>
+                  </resource>
+                </resources>
+              </unpack>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
   
 </project>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java
Tue Apr  1 17:10:46 2008
@@ -59,4 +59,8 @@
         { "boot/datasource.xml"};
     }
 
+    protected String getBeanDefinitionFilterCategories()
+    {
+        return "jdbcDS";
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/pom.xml Tue Apr  1 17:10:46
2008
@@ -156,7 +156,7 @@
                                 <resources>
                                     <resource>
                                         <path>assembly</path>
-                                        <include>prefs.xml,transaction.xml,cache.xml</include>
+                                        <include>prefs.xml,transaction.xml,cache.xml,boot/datasource.xml</include>
                                     </resource>
                                     <resource>
                                         <path>db-ojb</path>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/pom.xml Tue Apr  1 17:10:46
2008
@@ -138,7 +138,7 @@
                                 <resources>
                                     <resource>
                                         <path>assembly</path>
-                                        <include>prefs.xml,transaction.xml,cache.xml,security-*.xml</include>
+                                        <include>prefs.xml,transaction.xml,cache.xml,security-*.xml,boot/datasource.xml</include>
                                     </resource>
                                     <resource>
                                         <path>db-ojb</path>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java
Tue Apr  1 17:10:46 2008
@@ -162,4 +162,9 @@
     {
         return new String[] {"JETSPEED-INF/directory/config/" + LDAP_CONFIG + "/security-spi-ldap.xml"
};
     }    
+
+    protected String getBeanDefinitionFilterCategories()
+    {
+        return "jdbcDS";
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/pom.xml?rev=643660&r1=643659&r2=643660&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/pom.xml Tue Apr  1 17:10:46
2008
@@ -112,7 +112,7 @@
                                 <resources>
                                     <resource>
                                         <path>assembly</path>
-                                        <include>statistics.xml,transaction.xml</include>
+                                        <include>statistics.xml,transaction.xml,boot/datasource.xml</include>
                                     </resource>
                                     <resource>
                                         <path>db-ojb</path>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message