You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2012/04/04 14:00:11 UTC

svn commit: r1309351 - in /myfaces/extensions/scripting/trunk: ./ extscript-core-root/ extscript-core-root/extscript-cdi/ extscript-core-root/extscript-cdi/src/ extscript-core-root/extscript-cdi/src/main/ extscript-core-root/extscript-cdi/src/main/java...

Author: werpu
Date: Wed Apr  4 12:00:09 2012
New Revision: 1309351

URL: http://svn.apache.org/viewvc?rev=1309351&view=rev
Log:
EXTSCRIPT-107: CDI Integration work started

Added:
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/pom.xml
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupPlugin.java
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/org.apache.myfaces.extensions.scripting.core.api.Plugin
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/Plugin.java
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/resources/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/resources/META-INF/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/resources/META-INF/beans.xml
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml
Modified:
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/pom.xml
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java
    myfaces/extensions/scripting/trunk/extscript-core-root/pom.xml
    myfaces/extensions/scripting/trunk/extscript-examples/pom.xml
    myfaces/extensions/scripting/trunk/pom.xml

Added: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/pom.xml?rev=1309351&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/pom.xml (added)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/pom.xml Wed Apr  4 12:00:09 2012
@@ -0,0 +1,167 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>extscript-cdi</artifactId>
+    <version>1.0.4-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>MyFaces Extension Scripting Core</name>
+
+    <description>
+        Core of the MyFaces extensions.scripting
+    </description>
+
+    <parent>
+        <groupId>org.apache.myfaces.extensions.scripting</groupId>
+        <artifactId>extscript-core-root</artifactId>
+        <version>1.0.4-SNAPSHOT</version>
+    </parent>
+
+    <repositories>
+        <repository>
+            <id>people.apache.snapshots</id>
+            <url>https://repository.apache.org/content/repositories/snapshots/</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+
+    <scm>
+        <connection>
+            scm:svn:http://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core
+        </connection>
+        <developerConnection>
+            scm:svn:https://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core
+        </developerConnection>
+        <url>http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core</url>
+    </scm>
+    <properties>
+
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.scripting</groupId>
+            <artifactId>extscript-core</artifactId>
+            <version>1.0.4-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.deltaspike.cdictrl</groupId>
+            <artifactId>deltaspike-cdictrl-api</artifactId>
+            <version>${deltaspike.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.deltaspike.cdictrl</groupId>
+            <artifactId>deltaspike-cdictrl-owb</artifactId>
+            <version>${deltaspike.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- openwebbeans -->
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-jsf</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-web</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-resource</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-spi</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <!-- openwebbeans -->
+        <!-- openwebbeans api -->
+        <dependency>
+           <groupId>org.apache.geronimo.specs</groupId>
+           <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+           <version>1.0</version>
+           <scope>provided</scope>
+       </dependency>
+
+       <!-- javax.inject jsr 330 -->
+       <dependency>
+           <groupId>org.apache.geronimo.specs</groupId>
+           <artifactId>geronimo-atinject_1.0_spec</artifactId>
+           <version>1.0</version>
+           <scope>provided</scope>
+       </dependency>
+
+
+    </dependencies>
+
+    <build>
+        <plugins>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <!--
+            - Build and install into the repository some additional artifacts that we don't
+            - want to build during normal development because they take too long.
+            -->
+            <id>generate-assembly</id>
+            <activation>
+                <property>
+                    <name>performRelease</name>
+                    <value>true</value>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <!-- Install in the repository a "-javadoc.jar" file -->
+                        <artifactId>maven-javadoc-plugin</artifactId>
+                        <version>2.8</version>
+                        <executions>
+                            <execution>
+                                <id>attach-javadoc</id>
+                                <goals>
+                                    <goal>jar</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <!-- Install in the repository a "-sources.jar" file -->
+                        <artifactId>maven-source-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>attach-source</id>
+                                <goals>
+                                    <goal>jar</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>

Added: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupPlugin.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupPlugin.java?rev=1309351&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupPlugin.java (added)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupPlugin.java Wed Apr  4 12:00:09 2012
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.extensions.scripting.cdi.startup;
+
+import javax.servlet.ServletContextEvent;
+import org.apache.myfaces.extensions.scripting.core.api.Plugin;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class StartupPlugin implements Plugin
+{
+    /**
+     * This method is called before myfaces initializes
+     *
+     * @param evt the corresponding servlet context event keeping all the servlet context data and references
+     */
+    public void preInit(ServletContextEvent evt)
+    {
+        System.out.println("-----------------PREINIT--------------------");
+    }
+
+    /**
+     * This method is called after myfaces has initialized
+     *
+     * @param evt the corresponding servlet context event keeping all the servlet context data and references
+     */
+    public void postInit(ServletContextEvent evt)
+    {
+        System.out.println("-----------------POSTINIT--------------------");
+    }
+
+    /**
+     * This method is called before myfaces is destroyed
+     *
+     * @param evt the corresponding servlet context event keeping all the servlet context data and references
+     */
+    public void preDestroy(ServletContextEvent evt)
+    {
+        System.out.println("-----------------PREDESTROY--------------------");
+    }
+
+    /**
+     * This method is called after myfaces is destroyed
+     *
+     * @param evt the corresponding servlet context event keeping all the servlet context data and references
+     */
+    public void postDestroy(ServletContextEvent evt)
+    {
+        System.out.println("-----------------POSTDESTROY--------------------");
+    }
+}

Added: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/org.apache.myfaces.extensions.scripting.core.api.Plugin
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/org.apache.myfaces.extensions.scripting.core.api.Plugin?rev=1309351&view=auto
==============================================================================
    (empty)

Modified: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/pom.xml?rev=1309351&r1=1309350&r2=1309351&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/pom.xml (original)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/pom.xml Wed Apr  4 12:00:09 2012
@@ -54,7 +54,7 @@
         <dependency>
             <groupId>commons-beanutils</groupId>
             <artifactId>commons-beanutils</artifactId>
-            <version>1.8.0</version>
+            <version>1.8.3</version>
         </dependency>
 
         <!-- asm dependency readded for class scanning -->
@@ -67,7 +67,7 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.3</version>
+            <version>4.8.1</version>
             <scope>test</scope>
         </dependency>
 
@@ -146,7 +146,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
-                <version>1.3.1</version>
+                <version>1.3.3</version>
                 <executions>
                     <execution>
                         <phase>package</phase>
@@ -190,7 +190,7 @@
                     <plugin>
                         <!-- Install in the repository a "-javadoc.jar" file -->
                         <artifactId>maven-javadoc-plugin</artifactId>
-                        <version>2.4</version>
+                        <version>2.8</version>
                         <executions>
                             <execution>
                                 <id>attach-javadoc</id>

Added: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/Plugin.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/Plugin.java?rev=1309351&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/Plugin.java (added)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/Plugin.java Wed Apr  4 12:00:09 2012
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.extensions.scripting.core.api;
+
+import org.apache.myfaces.webapp.StartupListener;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ * Plugin SPI which is called in different phases of the startup process
+ */
+public interface Plugin
+{
+    /**
+      * This method is called before myfaces initializes
+      *
+      * @param evt the corresponding servlet context event keeping all the servlet context data and references
+      */
+     public void preInit(ServletContextEvent evt);
+
+     /**
+      * This method is called after myfaces has initialized
+      *
+      * @param evt the corresponding servlet context event keeping all the servlet context data and references
+      */
+     public void postInit(ServletContextEvent evt);
+
+     /**
+      * This method is called before myfaces is destroyed
+      *
+      * @param evt the corresponding servlet context event keeping all the servlet context data and references
+      */
+     public void preDestroy(ServletContextEvent evt);
+
+     /**
+      * This method is called after myfaces is destroyed
+      *
+      * @param evt the corresponding servlet context event keeping all the servlet context data and references
+      */
+     public void postDestroy(ServletContextEvent evt);
+
+}

Modified: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java?rev=1309351&r1=1309350&r2=1309351&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java (original)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java Wed Apr  4 12:00:09 2012
@@ -19,14 +19,18 @@
 
 package org.apache.myfaces.extensions.scripting.jsf.startup;
 
-import org.apache.myfaces.webapp.StartupListener;
+import org.apache.myfaces.extensions.scripting.core.api.Plugin;
 import org.apache.myfaces.extensions.scripting.core.api.WeavingContext;
 import org.apache.myfaces.extensions.scripting.core.monitor.ResourceMonitor;
 import org.apache.myfaces.extensions.scripting.jsf.adapters.MyFacesSPI;
+import org.apache.myfaces.webapp.StartupListener;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
 import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ServiceLoader;
 import java.util.logging.Logger;
 
 /**
@@ -42,6 +46,19 @@ import java.util.logging.Logger;
 public class StartupServletContextPluginChainLoader implements StartupListener
 {
     final Logger _log = Logger.getLogger(this.getClass().getName());
+    Plugin[] _plugins = new Plugin[]{};
+
+    public StartupServletContextPluginChainLoader()
+    {
+        ServiceLoader<Plugin> pluginLoader
+                = ServiceLoader.load(Plugin.class);
+        List<Plugin> plugins = new LinkedList<Plugin>();
+        for (Plugin plugin : pluginLoader)
+        {
+            plugins.add(plugin);
+        }
+        _plugins = plugins.toArray(new Plugin[plugins.size()]);
+    }
 
     public void preInit(ServletContextEvent servletContextEvent)
     {
@@ -68,6 +85,11 @@ public class StartupServletContextPlugin
             MyFacesSPI.getInstance().registerClassloadingExtension(servletContext);
             _log.info("[EXT-SCRIPTING] registering the JSF Implementation");
             WeavingContext.getInstance().setImplementation(MyFacesSPI.getInstance());
+
+            for (Plugin plugin : _plugins)
+            {
+                plugin.preInit(servletContextEvent);
+            }
         }
         catch (IOException e)
         {
@@ -80,11 +102,18 @@ public class StartupServletContextPlugin
     {
         //tell the system that the startup phase is done
         WeavingContext.getInstance().markPostInit();
+        for (Plugin plugin : _plugins)
+        {
+            plugin.postInit(evt);
+        }
     }
 
     public void preDestroy(ServletContextEvent evt)
     {
-
+        for (Plugin plugin : _plugins)
+        {
+            plugin.preDestroy(evt);
+        }
     }
 
     public void postDestroy(ServletContextEvent evt)
@@ -92,5 +121,9 @@ public class StartupServletContextPlugin
         //context is destroyed we have to shut down our daemon as well, by giving it
         //a hint to shutdown
         ResourceMonitor.getInstance().setRunning(false);
+        for (Plugin plugin : _plugins)
+        {
+            plugin.postDestroy(evt);
+        }
     }
 }

Modified: myfaces/extensions/scripting/trunk/extscript-core-root/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/pom.xml?rev=1309351&r1=1309350&r2=1309351&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/pom.xml (original)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/pom.xml Wed Apr  4 12:00:09 2012
@@ -23,6 +23,7 @@
 
     <modules>
         <module>extscript-core</module>
+        <module>extscript-cdi</module>
         <!--
         <module>extscript-myfaces12-extensions</module>
         <module>extscript-myfaces2-extensions</module>

Added: myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml?rev=1309351&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml (added)
+++ myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml Wed Apr  4 12:00:09 2012
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <artifactId>extscript-examples</artifactId>
+        <groupId>org.apache.myfaces.extensions.scripting</groupId>
+        <version>1.0.4-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.myfaces.extensions.scripting</groupId>
+    <artifactId>myfaces21-extscript-cdi</artifactId>
+    <packaging>war</packaging>
+    <name>A simple project for MyFaces 2.1 and Ext-Scripting 1.0</name>
+    <version>1.0.4-SNAPSHOT</version>
+    <url>http://www.apache.org</url>
+
+    <scm>
+        <connection>
+            scm:svn:http://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-extscript-helloworld
+        </connection>
+        <developerConnection>
+            scm:svn:https://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-extscript-helloworld
+        </developerConnection>
+        <url>
+            http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/myfaces20-extscript-helloworld
+        </url>
+    </scm>
+
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+
+
+        </plugins>
+    </build>
+
+    <dependencies>
+        <!--
+             optional Groovy include,
+             if we leave it out, Groovy support is disabled
+             and only java support will work
+         -->
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-all</artifactId>
+            <version>${groovy.version}</version>
+        </dependency>
+
+        <!--
+             Note this is the only dependency we need
+             for ext-scripting, the include is a so called
+             meta bundle, which includes the entire
+             ext-scripting core+java6 support + myfaces 2 support
+         -->
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.scripting</groupId>
+            <artifactId>extscript-myfaces20-bundle</artifactId>
+            <version>1.0.4-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-api</artifactId>
+            <version>${myfaces2.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-impl</artifactId>
+            <version>${myfaces2.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.scripting</groupId>
+            <artifactId>extscript-myfaces20-bundle</artifactId>
+            <version>1.0.4-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.extensions.scripting</groupId>
+            <artifactId>extscript-cdi</artifactId>
+            <version>1.0.4-SNAPSHOT</version>
+        </dependency>
+
+        <!-- openwebbeans -->
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+            <version>${openwebbeans.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-jsf</artifactId>
+            <version>${openwebbeans.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-web</artifactId>
+            <version>${openwebbeans.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-resource</artifactId>
+            <version>${openwebbeans.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-spi</artifactId>
+            <version>${openwebbeans.version}</version>
+        </dependency>
+
+        <dependency>
+           <groupId>org.apache.geronimo.specs</groupId>
+           <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+           <version>1.0</version>
+
+       </dependency>
+
+       <!-- javax.inject jsr 330 -->
+       <dependency>
+           <groupId>org.apache.geronimo.specs</groupId>
+           <artifactId>geronimo-atinject_1.0_spec</artifactId>
+           <version>1.0</version>
+       </dependency>
+
+    </dependencies>
+</project>

Added: myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/resources/META-INF/beans.xml?rev=1309351&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/resources/META-INF/beans.xml (added)
+++ myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/resources/META-INF/beans.xml Wed Apr  4 12:00:09 2012
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+</beans>

Added: myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/faces-config.xml?rev=1309351&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/faces-config.xml Wed Apr  4 12:00:09 2012
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+              version="2.0">
+</faces-config>
\ No newline at end of file

Added: myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml?rev=1309351&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml (added)
+++ myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml Wed Apr  4 12:00:09 2012
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+    <description>Webproject.xml</description>
+
+
+    <!--
+    Note this entry is vital it plugs the ext-scripting system into
+    a myfaces extension point
+    -->
+    <context-param>
+        <description>
+            Initializes the plugins for our groovy handlers
+        </description>
+        <param-name>org.apache.myfaces.FACES_INIT_PLUGINS</param-name>
+        <param-value>org.apache.myfaces.extensions.scripting.jsf.startup.StartupServletContextPluginChainLoader
+        </param-value>
+    </context-param>
+
+
+    <!--
+    <context-param>
+        <description>Additional comma separated loader paths to allow direct editing on the sources directory instead
+            of the deployment dir
+        </description>
+        <param-name>org.apache.myfaces.extensions.scripting.groovy.LOADER_PATHS</param-name>
+        <param-value>
+            /whatever/development/workspace/extensions-scripting3/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy
+        </param-value>
+    </context-param>
+
+
+    <context-param>
+        <description>Additional comma separated loader paths to allow direct editing on the sources directory instead
+            of the deployment dir
+        </description>
+        <param-name>org.apache.myfaces.extensions.scripting.java.LOADER_PATHS</param-name>
+        <param-value>
+            /whatever/development/workspace/extensions-scripting3/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java
+        </param-value>
+    </context-param>
+
+    <context-param>
+        <description>resource paths for our custom JSF2 resource resolver</description>
+        <param-name>org.apache.myfaces.extensions.scripting.resources.LOADER_PATHS</param-name>
+        <param-value>
+            /whatever/development/workspace/extensions-scripting3/extscript-examples/myfaces20-example/src/main/webapp
+        </param-value>
+    </context-param>
+
+    <context-param>
+        <description>a redirecting Facelet resource resolver which allows to pick up templates and resources from our
+            source dir
+        </description>
+        <param-name>facelets.RESOURCE_RESOLVER</param-name>
+        <param-value>org.apache.myfaces.extensions.scripting.facelet.ReroutingResourceResolver</param-value>
+    </context-param>
+    -->
+    <!--
+    <context-param>
+        <description>a comma separated whitelist of root packages which are compiled those and nothing else
+            will be compiled during all compile stages, all other files stay permanently as they are
+        </description>
+        <param-name>org.apache.myfaces.extensions.scripting.PGK_WHITELIST</param-name>
+        <param-value>org.apache.myfaces.groovyloader.blog</param-value>
+    </context-param>
+    -->
+
+
+    <!--
+     <context-param>
+        <description>Additional comma separated loader paths to allow direct editing on the sources directory instead
+            of the deployment dir
+        </description>
+        <param-name>org.apache.myfaces.extensions.scripting.groovy.LOADER_PATHS</param-name>
+        <param-value>D:/whatever/threads/extscript/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy</param-value>
+    </context-param>
+
+
+    <context-param>
+        <description>Additional comma separated loader paths to allow direct editing on the sources directory instead
+            of the deployment dir
+        </description>
+        <param-name>org.apache.myfaces.extensions.scripting.java.LOADER_PATHS</param-name>
+        <param-value>D:/whatever/threads/extscript/examples/myfaces20-example/src/main/webapp/WEB-INF/java</param-value>
+    </context-param>
+
+
+    -->
+
+
+    <context-param>
+        <param-name>javax.faces.PROJECT_STAGE</param-name>
+        <param-value>Development</param-value>
+    </context-param>
+
+
+    <context-param>
+        <description>State saving method: "client" or "server" (= default)
+            See JSF Specification 2.5.3
+        </description>
+        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+        <param-value>server</param-value>
+    </context-param>
+
+
+    <!--
+    Note, this servlet filter is vital without it Ext-Scripting will not work,
+    if you do not set it you will get an appropriate warning in the command line
+    -->
+
+    <!-- Listener, to allow Jetty serving MyFaces apps -->
+    <listener>
+        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+    </listener>
+
+    <!-- Faces Servlet -->
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <!-- Faces Servlet Mapping -->
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.jsf</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>/faces/*</url-pattern>
+    </servlet-mapping>
+
+
+    <!-- Welcome files -->
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+
+</web-app>

Modified: myfaces/extensions/scripting/trunk/extscript-examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/pom.xml?rev=1309351&r1=1309350&r2=1309351&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/pom.xml (original)
+++ myfaces/extensions/scripting/trunk/extscript-examples/pom.xml Wed Apr  4 12:00:09 2012
@@ -60,6 +60,7 @@
         <module>myfaces20-example</module>
         <module>myfaces20-extscript-helloworld</module>
         <module>blog-example</module>
+        <module>cdi-example</module>
         <!--
         <module>spring-example</module>
         -->

Modified: myfaces/extensions/scripting/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/pom.xml?rev=1309351&r1=1309350&r2=1309351&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/pom.xml (original)
+++ myfaces/extensions/scripting/trunk/pom.xml Wed Apr  4 12:00:09 2012
@@ -27,11 +27,13 @@
     <!-- test -->
     <properties>
         <myfaces12.version>1.2.9</myfaces12.version>
-        <myfaces2.version>2.1.6</myfaces2.version>
+        <myfaces2.version>2.1.7-SNAPSHOT</myfaces2.version>
         <extval.version>2.0.5</extval.version>
         <groovy.version>1.7.2</groovy.version>
         <maven-scala-plugin.scalaVersion>2.15.2</maven-scala-plugin.scalaVersion>
         <scala-library.version>2.10.0-M2</scala-library.version>
+        <deltaspike.version>0.2-incubating-SNAPSHOT</deltaspike.version>
+         <openwebbeans.version>1.1.2</openwebbeans.version>
     </properties>