geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1090158 - in /geronimo/server/trunk/plugins/openwebbeans: geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/ geronimo-openwebbeans/ geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/...
Date Fri, 08 Apr 2011 08:28:31 GMT
Author: xuhaihong
Date: Fri Apr  8 08:28:30 2011
New Revision: 1090158

URL: http://svn.apache.org/viewvc?rev=1090158&view=rev
Log:
GERONIMO-5893 Use a separate environment to host the JSF plug-in dependency, and only adds
it to the environment if beans.xml is found

Modified:
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/pom.xml
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java
    geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/pom.xml
    geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java?rev=1090158&r1=1090157&r2=1090158&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
Fri Apr  8 08:28:30 2011
@@ -23,7 +23,6 @@ import java.lang.reflect.Method;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -32,7 +31,7 @@ import java.util.Set;
 import java.util.jar.JarFile;
 
 import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.Producer;
+
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
@@ -74,6 +73,7 @@ public class OpenWebBeansModuleBuilderEx
     private static final Logger log = LoggerFactory.getLogger(OpenWebBeansModuleBuilderExtension.class);
 
     private final Environment defaultEnvironment;
+    private final Environment jsfPluginEnvironment;
     //only plausible naming builder is ours that adds BeanManager entry
     private final NamingBuilder namingBuilders;
 
@@ -82,8 +82,10 @@ public class OpenWebBeansModuleBuilderEx
 
     public OpenWebBeansModuleBuilderExtension(
             @ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment,
+            @ParamAttribute(name = "jsfPluginEnvironment") Environment jsfPluginEnvironment,
             @ParamReference(name = "NamingBuilders", namingType = NameFactory.MODULE_BUILDER)
NamingBuilder namingBuilders) {
         this.defaultEnvironment = defaultEnvironment;
+        this.jsfPluginEnvironment = jsfPluginEnvironment;
         this.namingBuilders = namingBuilders;
     }
 
@@ -95,6 +97,9 @@ public class OpenWebBeansModuleBuilderEx
         }
 
         EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), defaultEnvironment);
+        if(hasBeanXml(module)){
+            EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), jsfPluginEnvironment);
+        }
     }
 
     public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath,
URL specDDUrl,
@@ -103,9 +108,12 @@ public class OpenWebBeansModuleBuilderEx
         if (!(module instanceof WebModule) /*|| !hasBeanXml(module)*/) {
             // not a web module, nothing to do
             return;
-        }
-
+        }       
+        
         EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), defaultEnvironment);
+        if(hasBeanXml(module)){
+            EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), jsfPluginEnvironment);
+        }
     }
 
     public void installModule(JarFile earFile, EARContext earContext, Module module, Collection
configurationStores,

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/pom.xml?rev=1090158&r1=1090157&r2=1090158&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/pom.xml (original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/pom.xml Fri Apr  8 08:28:30
2011
@@ -160,12 +160,7 @@
         <dependency>
             <groupId>org.apache.openwebbeans</groupId>
             <artifactId>openwebbeans-web</artifactId>         
-        </dependency>  
-      
-        <dependency>
-            <groupId>org.apache.openwebbeans</groupId>
-            <artifactId>openwebbeans-jsf</artifactId>        
-        </dependency>
+        </dependency>              
 
         <dependency>
             <groupId>org.apache.openwebbeans</groupId>

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java?rev=1090158&r1=1090157&r2=1090158&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java
Fri Apr  8 08:28:30 2011
@@ -31,15 +31,14 @@ import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpSessionActivationListener;
 import javax.servlet.http.HttpSessionEvent;
 import javax.servlet.http.HttpSessionListener;
+
 import org.apache.webbeans.component.InjectionPointBean;
 import org.apache.webbeans.config.OWBLogConst;
-import org.apache.webbeans.config.OpenWebBeansConfiguration;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.conversation.ConversationManager;
 import org.apache.webbeans.el.ELContextStore;
 import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.spi.ContainerLifecycle;
-import org.apache.webbeans.spi.ContextsService;
 import org.apache.webbeans.spi.FailOverService;
 import org.apache.webbeans.util.WebBeansUtil;
 import org.apache.webbeans.web.context.WebContextsService;

Modified: geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/pom.xml?rev=1090158&r1=1090157&r2=1090158&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/pom.xml (original)
+++ geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/pom.xml Fri Apr  8 08:28:30
2011
@@ -52,6 +52,11 @@
             <version>${project.version}</version>
             <type>car</type>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-jsf</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>

Modified: geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml?rev=1090158&r1=1090157&r2=1090158&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml
Fri Apr  8 08:28:30 2011
@@ -54,6 +54,16 @@
                 <import-package>javassist.util.proxy</import-package>
             </environment>
         </xml-attribute>
+        <xml-attribute name="jsfPluginEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.openwebbeans</groupId>
+                        <artifactId>openwebbeans-jsf</artifactId>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
     </gbean>
 
     <gbean name="OWBNamingBuilder" class="org.apache.geronimo.openwebbeans.deployment.OpenWebBeansNamingBuilder"/>



Mime
View raw message