You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by jc...@apache.org on 2012/02/03 23:04:10 UTC

svn commit: r1240369 - in /incubator/rave/trunk: rave-portal/ rave-shindig/src/main/java/org/apache/rave/commoncontainer/ rave-shindig/src/test/java/org/apache/rave/commoncontainer/

Author: jcian
Date: Fri Feb  3 22:04:10 2012
New Revision: 1240369

URL: http://svn.apache.org/viewvc?rev=1240369&view=rev
Log:
Fixing issues in shindig property override mechanism.  The two properties loaders (guice and spring) were looking at different system properties to decide when to override the default property file.  This commit updates the guice side loader to use the same override property as the spring side (and the same one referenced on the rave website).

Modified:
    incubator/rave/trunk/rave-portal/pom.xml
    incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModule.java
    incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModuleTest.java

Modified: incubator/rave/trunk/rave-portal/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/pom.xml?rev=1240369&r1=1240368&r2=1240369&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/pom.xml (original)
+++ incubator/rave/trunk/rave-portal/pom.xml Fri Feb  3 22:04:10 2012
@@ -176,7 +176,7 @@
                             <!-- Documentation: http://incubator.apache.org/rave/documentation/host-configuration.html -->
                             <!--
                                 <portal.override.properties>/path/to/custom.portal.properties</portal.override.properties>
-                                <shindig.override.properties>/path/to/custom.shindig.properties</shindig.override.properties>
+                                <rave-shindig.override.properties>/path/to/custom.shindig.properties</rave-shindig.override.properties>
                                 <shindig.host>localhost</shindig.host>
                                 <shindig.port>8080</shindig.port>
                                 <shindig.contextroot />

Modified: incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModule.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModule.java?rev=1240369&r1=1240368&r2=1240369&view=diff
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModule.java (original)
+++ incubator/rave/trunk/rave-shindig/src/main/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModule.java Fri Feb  3 22:04:10 2012
@@ -37,13 +37,13 @@ import java.util.Properties;
 
 /**
  * Injects everything from the a property file as a Named value.<br/>
- * Uses the {@literal shindig.properties} file unless the system property
- * {@literal shindig.override.properties} defines a different location.
+ * Uses the {@literal rave.shindig.properties} file unless the system property
+ * {@literal rave-shindig.override.properties} defines a different location.
  */
 public class ConfigurablePropertiesModule extends AbstractModule {
 
     private static final String DEFAULT_PROPERTIES = "rave.shindig.properties";
-    private static final String SHINDIG_OVERRIDE_PROPERTIES = "shindig.override.properties";
+    private static final String SHINDIG_OVERRIDE_PROPERTIES = "rave-shindig.override.properties";
 
     private static final String CLASSPATH = "classpath:";
 

Modified: incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModuleTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModuleTest.java?rev=1240369&r1=1240368&r2=1240369&view=diff
==============================================================================
--- incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModuleTest.java (original)
+++ incubator/rave/trunk/rave-shindig/src/test/java/org/apache/rave/commoncontainer/ConfigurablePropertiesModuleTest.java Fri Feb  3 22:04:10 2012
@@ -61,7 +61,7 @@ public class ConfigurablePropertiesModul
 
     @Test
     public void testCustomProperties() throws Exception {
-        System.setProperty("shindig.override.properties", "classpath:rave.shindig.custom.properties");
+        System.setProperty("rave-shindig.override.properties", "classpath:rave.shindig.custom.properties");
 
         TestableConfigurablePropertiesModule propertiesModule = new TestableConfigurablePropertiesModule();
         Properties properties = propertiesModule.initProperties();
@@ -74,14 +74,14 @@ public class ConfigurablePropertiesModul
         assertEquals("Custom shindig host", "127.0.0.1",
                 properties.getProperty("shindig.host"));
 
-        System.clearProperty("shindig.override.properties");
+        System.clearProperty("rave-shindig.override.properties");
     }
 
     @Test
     public void testCustomProperties_WithReplacedContextRoot() throws Exception {
         System.setProperty("shindig.contextroot", "shindigcontext");
         System.setProperty("shindig.host", "127.0.0.2");
-        System.setProperty("shindig.override.properties", "classpath:rave.shindig.custom.properties");
+        System.setProperty("rave-shindig.override.properties", "classpath:rave.shindig.custom.properties");
 
         TestableConfigurablePropertiesModule propertiesModule = new TestableConfigurablePropertiesModule();
         Properties properties = propertiesModule.initProperties();
@@ -96,7 +96,7 @@ public class ConfigurablePropertiesModul
 
         System.clearProperty("shindig.contextroot");
         System.clearProperty("shindig.host");
-        System.clearProperty("shindig.override.properties");
+        System.clearProperty("rave-shindig.override.properties");
     }
 
     @Test