EXTSCRIPT-107: CDI Integration work started
git-svn-id: https://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk@1309351 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/extscript-core-root/extscript-cdi/pom.xml b/extscript-core-root/extscript-cdi/pom.xml
new file mode 100644
index 0000000..d098bc4
--- /dev/null
+++ b/extscript-core-root/extscript-cdi/pom.xml
@@ -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>
diff --git a/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupPlugin.java b/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupPlugin.java
new file mode 100644
index 0000000..c856d04
--- /dev/null
+++ b/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupPlugin.java
@@ -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--------------------");
+ }
+}
diff --git a/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/org.apache.myfaces.extensions.scripting.core.api.Plugin b/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/org.apache.myfaces.extensions.scripting.core.api.Plugin
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/org.apache.myfaces.extensions.scripting.core.api.Plugin
diff --git a/extscript-core-root/extscript-core/pom.xml b/extscript-core-root/extscript-core/pom.xml
index 3a39690..7fe794b 100644
--- a/extscript-core-root/extscript-core/pom.xml
+++ b/extscript-core-root/extscript-core/pom.xml
@@ -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>
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/Plugin.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/Plugin.java
new file mode 100644
index 0000000..fcbd61b
--- /dev/null
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/api/Plugin.java
@@ -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);
+
+}
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java
index bb2a512..c8b698f 100644
--- a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/startup/StartupServletContextPluginChainLoader.java
@@ -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 @@
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 @@
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 @@
{
//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 @@
//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);
+ }
}
}
diff --git a/extscript-core-root/pom.xml b/extscript-core-root/pom.xml
index fdc38d3..0c0d2a1 100644
--- a/extscript-core-root/pom.xml
+++ b/extscript-core-root/pom.xml
@@ -23,6 +23,7 @@
<modules>
<module>extscript-core</module>
+ <module>extscript-cdi</module>
<!--
<module>extscript-myfaces12-extensions</module>
<module>extscript-myfaces2-extensions</module>
diff --git a/extscript-examples/cdi-example/pom.xml b/extscript-examples/cdi-example/pom.xml
new file mode 100644
index 0000000..b9881e3
--- /dev/null
+++ b/extscript-examples/cdi-example/pom.xml
@@ -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>
diff --git a/extscript-examples/cdi-example/src/main/resources/META-INF/beans.xml b/extscript-examples/cdi-example/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000..4ca8195
--- /dev/null
+++ b/extscript-examples/cdi-example/src/main/resources/META-INF/beans.xml
@@ -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>
diff --git a/extscript-examples/cdi-example/src/main/webapp/WEB-INF/faces-config.xml b/extscript-examples/cdi-example/src/main/webapp/WEB-INF/faces-config.xml
new file mode 100644
index 0000000..5cd83af
--- /dev/null
+++ b/extscript-examples/cdi-example/src/main/webapp/WEB-INF/faces-config.xml
@@ -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
diff --git a/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml b/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..40e5079
--- /dev/null
+++ b/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml
@@ -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>
diff --git a/extscript-examples/pom.xml b/extscript-examples/pom.xml
index ab55c11..4985209 100644
--- a/extscript-examples/pom.xml
+++ b/extscript-examples/pom.xml
@@ -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>
-->
diff --git a/pom.xml b/pom.xml
index d7ea8a4..a9f5098 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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>