geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r834362 - in /geronimo/server/trunk: plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java pom.xml
Date Tue, 10 Nov 2009 06:37:28 GMT
Author: xuhaihong
Date: Tue Nov 10 06:37:28 2009
New Revision: 834362

URL: http://svn.apache.org/viewvc?rev=834362&view=rev
Log:
GERONIMO-4815 First step change : update Myfaces version to 2.0.0-SNAPSHOT and fix some compile
errors

Modified:
    geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java?rev=834362&r1=834361&r2=834362&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
Tue Nov 10 06:37:28 2009
@@ -30,8 +30,6 @@
 
 import javax.faces.webapp.FacesServlet;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
@@ -60,15 +58,18 @@
 import org.apache.geronimo.xbeans.javaee.FacesConfigManagedBeanType;
 import org.apache.geronimo.xbeans.javaee.FacesConfigType;
 import org.apache.geronimo.xbeans.javaee.FullyQualifiedClassType;
+import org.apache.geronimo.xbeans.javaee.ListenerType;
 import org.apache.geronimo.xbeans.javaee.ParamValueType;
 import org.apache.geronimo.xbeans.javaee.ServletType;
 import org.apache.geronimo.xbeans.javaee.WebAppType;
-import org.apache.geronimo.xbeans.javaee.ListenerType;
 import org.apache.myfaces.webapp.StartupServletContextListener;
 import org.apache.xbean.finder.ClassFinder;
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
+import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev $Date
@@ -109,10 +110,10 @@
     public void installModule(JarFile earFile, EARContext earContext, Module module, Collection
configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws
DeploymentException {
     }
 
-    public void initContext(EARContext earContext, Module module, ClassLoader cl) throws
DeploymentException {
+    public void initContext(EARContext earContext, Module module, Bundle bundle) throws DeploymentException
{
     }
 
-    public void addGBeans(EARContext earContext, Module module, ClassLoader cl, Collection
repository) throws DeploymentException {
+    public void addGBeans(EARContext earContext, Module module, Bundle bundle, Collection
repository) throws DeploymentException {
         if (!(module instanceof WebModule)) {
             //not a web module, nothing to do
             return;
@@ -215,15 +216,14 @@
     private List<Class> getFacesClasses(WebAppType webApp, WebModule webModule) throws
DeploymentException {
         log.debug("getFacesClasses( " + webApp.toString() + "," + '\n' +
                            (webModule != null ? webModule.getName() : null) + " ): Entry");
-
-        // Get the classloader from the module's EARContext
-        ClassLoader classLoader = webModule.getEarContext().getClassLoader();
+        
+        Bundle bundle = webModule.getEarContext().getBundle();
 
         // 1. META-INF/faces-config.xml
         List<Class> classes = new ArrayList<Class>();
         try {
             URL url = DeploymentUtil.createJarURL(webModule.getModuleFile(), "META-INF/faces-config.xml");
-            parseConfigFile(url, classLoader, classes);
+            parseConfigFile(url, bundle, classes);
         } catch (MalformedURLException mfe) {
             throw new DeploymentException("Could not locate META-INF/faces-config.xml" +
mfe.getMessage(), mfe);
         }
@@ -231,7 +231,7 @@
         // 2. WEB-INF/faces-config.xml
         try {
             URL url = DeploymentUtil.createJarURL(webModule.getModuleFile(), "WEB-INF/faces-config.xml");
-            parseConfigFile(url, classLoader, classes);
+            parseConfigFile(url, bundle, classes);
         } catch (MalformedURLException mfe) {
             throw new DeploymentException("Could not locate WEB-INF/faces-config.xml" + mfe.getMessage(),
mfe);
         }
@@ -250,7 +250,7 @@
                         }
                         try {
                             URL url = DeploymentUtil.createJarURL(webModule.getModuleFile(),
configfile);
-                            parseConfigFile(url, classLoader, classes);
+                            parseConfigFile(url, bundle, classes);
                         } catch (MalformedURLException mfe) {
                             throw new DeploymentException("Could not locate config file "
+ configfile + ", " + mfe.getMessage(), mfe);
                         }
@@ -264,7 +264,7 @@
         return classes;
     }
 
-    private void parseConfigFile(URL url, ClassLoader classLoader, List<Class> classes)
throws DeploymentException {
+    private void parseConfigFile(URL url,  Bundle bundle, List<Class> classes) throws
DeploymentException {
         log.debug("parseConfigFile( " + url.toString() + " ): Entry");
 
         try {
@@ -279,7 +279,7 @@
                 String className = cls.getStringValue().trim();
                 Class<?> clas;
                 try {
-                    clas = classLoader.loadClass(className);
+                    clas = bundle.loadClass(className);
                     classes.add(clas);
                 }
                 catch (ClassNotFoundException e) {

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=834362&r1=834361&r2=834362&view=diff
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Tue Nov 10 06:37:28 2009
@@ -1392,7 +1392,7 @@
             <dependency>
                 <groupId>org.apache.myfaces.core</groupId>
                 <artifactId>myfaces-api</artifactId>
-                <version>1.2.6</version>
+                <version>2.0.0-SNAPSHOT</version>
                 <exclusions>
                     <exclusion>
                         <groupId>commons-logging</groupId>
@@ -1404,7 +1404,7 @@
             <dependency>
                 <groupId>org.apache.myfaces.core</groupId>
                 <artifactId>myfaces-impl</artifactId>
-                <version>1.2.6</version>
+                <version>2.0.0-SNAPSHOT</version>
                 <exclusions>
                     <exclusion>
                         <groupId>commons-logging</groupId>
@@ -2187,6 +2187,27 @@
         </plugins>
 
     </build>
+    
+    <repositories>
+        <!--
+        NOTE: The default repositories are picked up by Genesis.
+              We only need to include apache-snapshots for Genesis SNAPSHOTs. -->
+        <repository>
+            <id>servicemix-snapshots</id>
+            <name>Servicemix Snapshots Repository</name>
+            <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+        
+    </repositories>
 
     <distributionManagement>
         <!--



Mime
View raw message