Author: sboscarine
Date: 2009-11-12 22:08:25 -0500 (Thu, 12 Nov 2009)
New Revision: 5017
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/pom.xml
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/META-INF/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/META-INF/archetype.xml
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/pom.xml
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/java/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/resources/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/resources/META-INF/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/META-INF/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/index.jsp
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/test/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/test/java/
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/test/resources/
Modified:
extensions/trunk/archetypes/weld-jsf-minimal-jee/
Log:
initial commit
Property changes on: extensions/trunk/archetypes/weld-jsf-minimal-jee
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
Added: extensions/trunk/archetypes/weld-jsf-minimal-jee/pom.xml
===================================================================
--- extensions/trunk/archetypes/weld-jsf-minimal-jee/pom.xml (rev
0)
+++ extensions/trunk/archetypes/weld-jsf-minimal-jee/pom.xml 2009-11-13 03:08:25 UTC (rev
5017)
@@ -0,0 +1,35 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.weld.archetype</groupId>
+ <artifactId>weld-archetype-parent</artifactId>
+ <version>0.0.1-BETA-SNAPSHOT</version>
+ </parent>
+ <artifactId>weld-jsf-minimal-jee</artifactId>
+ <name>JSF 2.0 and Weld 1.0 on JEE6 containers like JBoss 6.0</name>
+ <packaging>maven-archetype</packaging>
+ <build>
+ <extensions>
+ <!-- TODO: Explain what I do. -->
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ </extension>
+ </extensions>
+ <plugins>
+ <!-- TODO: Explain what I do. -->
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <!--
+ Ommitting a version throws this error: [WARNING] Rule 1:
+ org.apache.maven.plugins.enforcer.RequirePluginVersions failed with
message: Some plugins are missing
+ valid versions:(LATEST RELEASE SNAPSHOT are not allowed )
+ -->
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/META-INF/archetype.xml
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/META-INF/archetype.xml
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/META-INF/archetype.xml 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,15 @@
+<archetype>
+ <id>weld-archetype-servlet-quickstart</id>
+ <resources>
+ <resource>src/main/webapp/index.xhtml</resource>
+ <resource>src/main/webapp/index.jsp</resource>
+ <resource>src/main/webapp/WEB-INF/web.xml</resource>
+ <resource>src/main/resources/META-INF/beans.xml</resource>
+ <resource>src/main/webapp/META-INF/context.xml</resource>
+ </resources>
+ <sources>
+ <source>src/main/java/HelloWorld.java</source>
+ </sources>
+ <testSources />
+ <testResources />
+</archetype>
\ No newline at end of file
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/pom.xml
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/pom.xml
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/pom.xml 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,116 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}</artifactId>
+ <packaging>war</packaging>
+ <name>${artifactId}</name>
+ <version>${version}</version>
+ <properties>
+ <!--
+ eliminates [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is
+ platform dependent!
+ -->
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencyManagement>
+ <dependencies>
+ <!-- Import scope will provide versions and scopes for dependency below.
-->
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions-bom</artifactId>
+ <version>1.0.0-CR2</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <dependencies>
+ <!-- Common to JEE and Servlet containers -->
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ </dependency>
+ <!-- JSF 2.0 -->
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Optional, but pretty useful. -->
+ <!-- <dependency>-->
+ <!-- <groupId>javax.servlet</groupId>-->
+ <!-- <artifactId>jstl</artifactId>-->
+ <!-- </dependency>-->
+
+ <!-- Optional, but highly recommended. -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.10</version>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- Sun Bean Validation API (JSR 303) -->
+ <!--<dependency>-->
+ <!-- <groupId>javax.validation</groupId>-->
+ <!-- <artifactId>validation-api</artifactId>-->
+ <!--</dependency>-->
+ <!-- Bean Validation Implementation -->
+ <!--<dependency>-->
+ <!-- <groupId>org.hibernate</groupId>-->
+ <!-- <artifactId>hibernate-validator</artifactId>-->
+ <!-- <version>4.0.0.GA</version>-->
+ <!--</dependency>-->
+ <!-- Additional Bean Validation Validation Dependency-->
+ <!--<dependency>-->
+ <!-- <groupId>org.slf4j</groupId>-->
+ <!-- <artifactId>slf4j-log4j12</artifactId>-->
+ <!-- <version>1.4.2</version>-->
+ <!--</dependency>-->
+ </dependencies>
+ <build>
+ <finalName>${artifactId}</finalName>
+ <plugins>
+ <!-- Compiler plugin enforces Java 1.6 -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+
+ <!-- Eclipse plugin enforces download of source and JavaDoc jars -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <wtpversion>2.0</wtpversion>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>true</downloadJavadocs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,24 @@
+package ${package};
+
+import java.io.Serializable;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Named;
+@RequestScoped
+@Named
+public class HelloWorld implements Serializable
+{
+ public HelloWorld()
+ {
+ System.out.println(this.getClass().getSimpleName() + " was
constructed");
+ }
+
+ private final String text = "Hello World!";
+
+ public String getText()
+ {
+ return text;
+ }
+
+ private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/resources/META-INF/beans.xml 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,7 @@
+<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">
+ <alternatives />
+ <decorators />
+ <interceptors />
+</beans>
\ No newline at end of file
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+ <Manager pathname="" /> <!-- disables storage of sessions across
restarts -->
+ <Resource name="BeanManager" auth="Container"
type="javax.enterprise.inject.spi.BeanManager"
factory="org.jboss.weld.resources.ManagerObjectFactory" />
+ <!-- Uncomment to enable injection into Servlet -->
+ <!-- <Listener
className="org.jboss.weld.environment.tomcat.WeldLifecycleListener"/> -->
+</Context>
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!-- This file is optional. It can be deleted at any time. -->
+<faces-config version="2.0"
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">
+</faces-config>
\ No newline at end of file
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app
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" version="2.5">
+
+ <!-- Standard JSF 2.0 Configuration Paramters. -->
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Tell the context which URLs to process as facelets. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <!-- This is an optional parameter, but it makes troubleshooting errors much
easier. -->
+ <!-- You may want to delete it before final deployment -->
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- Weld Jetty/Tomcat specific configuration parameters -->
+ <!-- Both the listener and resource-env-ref tags can be deleted in JEE6 containers.
-->
+ <listener>
+
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
+ </listener>
+ <resource-env-ref>
+ <description>Object factory for the CDI Bean Manager</description>
+ <resource-env-ref-name>BeanManager</resource-env-ref-name>
+
<resource-env-ref-type>javax.enterprise.inject.spi.BeanManager</resource-env-ref-type>
+ </resource-env-ref>
+</web-app>
\ No newline at end of file
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/index.jsp
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/index.jsp
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/index.jsp 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,5 @@
+<html>
+<head>
+<meta HTTP-EQUIV="REFRESH" content="0; url=index.jsf">
+</head>
+</html>
Added:
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
---
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
(rev 0)
+++
extensions/trunk/archetypes/weld-jsf-minimal-jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-11-13
03:08:25 UTC (rev 5017)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html">
+<h:head>
+ <title>JSF Demo</title>
+</h:head>
+<h:body>
+ <h1>Does Weld Work?</h1>
+ <p>My weld-injected bean says: #{helloWorld.text} in a JSF EL
+ dialect.</p>
+ <p>You can write the same value using UEL ${helloWorld.text}</p>
+</h:body>
+</html>
\ No newline at end of file