[weld-commits] Weld SVN: r7038 - in archetypes/jsf-weld-servlet-webapp/trunk: src/main/webapp and 4 other directories.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Wed Oct 20 23:36:44 EDT 2010
Author: dan.j.allen
Date: 2010-10-20 23:36:39 -0400 (Wed, 20 Oct 2010)
New Revision: 7038
Added:
archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.jsf
archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.xhtml
Removed:
archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/home.xhtml
archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.jsp
Modified:
archetypes/jsf-weld-servlet-webapp/trunk/
archetypes/jsf-weld-servlet-webapp/trunk/archetype-pom.xml
archetypes/jsf-weld-servlet-webapp/trunk/archetype.properties
archetypes/jsf-weld-servlet-webapp/trunk/build.sh
archetypes/jsf-weld-servlet-webapp/trunk/pom.xml
archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/faces-config.xml
archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/templates/default.xhtml
archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/web.xml
archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/resources/css/screen.css
archetypes/jsf-weld-servlet-webapp/trunk/src/test/java/com/mycompany/BeanManagerTest.java
Log:
migrate to new archetype creation strategy
update to latest Arquillian
change home page url
update information for steven
Property changes on: archetypes/jsf-weld-servlet-webapp/trunk
___________________________________________________________________
Name: svn:ignore
+ .classpath
.project
.settings
target
Modified: archetypes/jsf-weld-servlet-webapp/trunk/archetype-pom.xml
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/archetype-pom.xml 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/archetype-pom.xml 2010-10-21 03:36:39 UTC (rev 7038)
@@ -23,17 +23,17 @@
<developer>
<name>Steven Boscarine</name>
<roles>
- <role>Weld archetypes lead</role>
+ <role>Weld archetypes co-lead</role>
</roles>
- <email>steven.boscarine at childrens.harvard.edu</email>
- <organization>Children's Hospital Boston: Informatics Program</organization>
+ <email>stevenboscarine at gmail.com</email>
+ <organization>Community Volunteer</organization>
<organizationUrl>http://chip.org/</organizationUrl>
- <url>http://info.rmatics.org/</url>
+ <url>http://www.beacon16.com/</url>
</developer>
<developer>
<name>Dan Allen</name>
<roles>
- <role>Weld archetypes lead</role>
+ <role>Weld archetypes co-lead</role>
</roles>
<email>dan.j.allen at gmail.com</email>
<organization>JBoss, by Red Hat</organization>
Modified: archetypes/jsf-weld-servlet-webapp/trunk/archetype.properties
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/archetype.properties 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/archetype.properties 2010-10-21 03:36:39 UTC (rev 7038)
@@ -1,8 +1,9 @@
archetype.groupId=org.jboss.weld.archetypes
archetype.artifactId=jboss-jsf-weld-servlet-webapp
archetype.version=1.0.1-SNAPSHOT
-#archetype.package=com.acme.webapp
+# Java package of the source files; will be replaced with the ${package} expression
+archetype.package=com.mycompany
archetype.languages=java
# value of <artifactId> is converted to ${artifactId} expression in filtered files
-archetype.filteredExtensions=java,txt
-name=JSF and CDI webapp
+archetype.filteredExtensions=java,txt,html
+name=JSF and CDI webapp project
Modified: archetypes/jsf-weld-servlet-webapp/trunk/build.sh
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/build.sh 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/build.sh 2010-10-21 03:36:39 UTC (rev 7038)
@@ -1,17 +1,23 @@
#!/bin/sh
+# This script generates an archetype into target/archetype from the source project.
+#
+# Two optional commands can be provided (in the order listed):
+#
+# install - which will automatically install the generated archetype in the local repository
+# generate - generate a project from the archetype into target/generated-project
+#
+
ARCHETYPE_BUILD_DIR=target/generated-sources/archetype
ARCHETYPE_DIR=target/archetype
ARCHETYPE_RESOURCES_DIR=$ARCHETYPE_DIR/src/main/resources/archetype-resources
echo Generating archetype from project into $ARCHETYPE_BUILD_DIR...
-rm -Rf $ARCHETYPE_DIR/target
-#svn rm --force $ARCHETYPE_DIR/*
-rm -Rf target/generated-*
-mvn archetype:create-from-project -Darchetype.properties=archetype.properties
+txt2html -pb 1 -p 2 readme.txt > readme.html
+mvn clean archetype:create-from-project -Darchetype.properties=archetype.properties
echo Relocating generated archetype project to $ARCHETYPE_DIR...
rsync -az --exclude `basename $0` --exclude archetype-pom.xml $ARCHETYPE_BUILD_DIR/src $ARCHETYPE_DIR/
-#svn revert -R $ARCHETYPE_DIR
+#rsync -az --exclude `basename $0` --exclude archetype-pom.xml $ARCHETYPE_BUILD_DIR/src $ARCHETYPE_DIR/
cp -f archetype-pom.xml $ARCHETYPE_DIR/pom.xml
mvn -f $ARCHETYPE_DIR/pom.xml clean
echo Patching generated archetype...
@@ -21,6 +27,10 @@
sed -i 's;
;;' $ARCHETYPE_RESOURCES_DIR/readme.txt
sed -i 's;<name>jboss-jsf-weld-servlet-webapp-src</name>;<name>${name}</name>;' $ARCHETYPE_RESOURCES_DIR/pom.xml
+# remove local file that NetBeans add to source project
+rm -f $ARCHETYPE_RESOURCES_DIR/src/main/webapp/WEB-INF/sun-web.xml
+rm -f readme.html
+# could set the release version at this point, if specified
if [ ! -z $1 ] && [ "$1" = "install" ]; then
echo Installing archetype...
shift
@@ -32,10 +42,5 @@
cd target
mvn archetype:generate -B -DarchetypeCatalog=local \
-DarchetypeArtifactId=jboss-jsf-weld-webapp -DarchetypeGroupId=org.jboss.weld.archetypes -DarchetypeVersion=1.0.1-SNAPSHOT \
- -DartifactId=generated-project -DgroupId=com.acme -Dversion=1.0.0-SNAPSHOT -Dname="JSF and CDI Webapp"
+ -DartifactId=generated-project -DgroupId=com.acme -Dversion=1.0.0-SNAPSHOT -Dname="JSF and CDI webapp project"
fi
-
-#cd target/archetype
-#mvn release:prepare --batch-mode -Drelease -DdevelopmentVersion=1.0.1-SNAPSHOT -DreleaseVersion=1.0.1.Beta1 -Dtag=basic-javaee6-webapp-1.0.1.Beta1 -DdryRun=true
-#mvn release:prepare --batch-mode -Drelease -DdevelopmentVersion=1.0.1-SNAPSHOT -DreleaseVersion=1.0.1.Beta1 -Dtag=basic-javaee6-webapp-1.0.1.Beta1 -Dresume=false
-#mvn release:perform nexus:staging-close -Drelease
Modified: archetypes/jsf-weld-servlet-webapp/trunk/pom.xml
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/pom.xml 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/pom.xml 2010-10-21 03:36:39 UTC (rev 7038)
@@ -1,14 +1,14 @@
<?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">
+<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>org.jboss.weld.archetypes</groupId>
<artifactId>jboss-jsf-weld-servlet-webapp-src</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>jboss-jsf-weld-servlet-webapp-src</name>
- <description>A basic JSF and CDI webapp project for servlet containers generated from the jboss-jsf-weld-servlet-webapp archetype</description>
+ <description>A starter JSF and CDI webapp project that targets Servlet containers, generated from the jboss-jsf-weld-servlet-webapp archetype</description>
<properties>
<!--
@@ -16,14 +16,15 @@
[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>
- <weld-servlet.version>1.0.1-Final</weld-servlet.version>
- <arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
+ <version.weld-servlet>1.0.1-Final</version.weld-servlet>
+ <version.arquillian>1.0.0.Alpha4</version.arquillian>
+ <version.jsf>2.0.3</version.jsf>
</properties>
<repositories>
<!-- The JBoss public Nexus repository is a composite repository of several major repositories -->
<!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
- <!-- The goal is to get everything you would need into the central, but it's not there yet -->
+ <!-- At the time of writing, Arquillian and the JBoss Java EE specification POMs are only in the JBoss Community public repository (not Maven central) -->
<repository>
<id>jboss-public-repository</id>
<name>JBoss Repository</name>
@@ -61,7 +62,7 @@
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-parent</artifactId>
- <version>${weld-servlet.version}</version>
+ <version>${version.weld-servlet}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -83,21 +84,22 @@
<scope>provided</scope>
</dependency>
+ <!-- FIXME use profiles for Mojarra and MyFaces -->
<!-- JSF 2.0 API -->
<dependency>
- <groupId>javax.faces</groupId>
+ <groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.2-FCS</version>
+ <version>${version.jsf}</version>
</dependency>
<!-- Jetty/Tomcat-specific scopes and artifacts -->
- <!-- JSF 2.0 -->
+ <!-- JSF 2.0 Implementation -->
<dependency>
- <groupId>javax.faces</groupId>
+ <groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<scope>runtime</scope>
- <version>2.0.2-FCS</version>
+ <version>${version.jsf}</version>
</dependency>
<dependency>
@@ -106,27 +108,27 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
- <!-- SB: Perhaps this is a means of enabling EL 2.0 in tomcat? -->
- <!-- I will uncomment once I have an opportunity to test -->
- <!--
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-el</artifactId>
- <version>2.0.0.GA</version>
- <exclusions>
- <exclusion>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- -->
+ <!-- SB: Perhaps this is a means of enabling EL 2.0 in tomcat? -->
+ <!-- I will uncomment once I have an opportunity to test -->
+ <!--
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-el</artifactId>
+ <version>2.0.0.GA</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ -->
<!--
<dependency>
@@ -167,7 +169,7 @@
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-junit</artifactId>
- <version>${arquillian.version}</version>
+ <version>${version.arquillian}</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -200,7 +202,7 @@
<!-- force friendly name instead of artifact name + version -->
<contextPath>${project.build.finalName}</contextPath>
<!-- Where the BeanManager is constructed. This is where you'll declare datasources. -->
- <jettyEnvXml>${basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
+ <jettyEnvXml>${project.basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
<!-- This parameter will auto-deploy modified classes. -->
<!-- You can save changes in a file or class and refresh your browser to view the changes. -->
<scanIntervalSeconds>3</scanIntervalSeconds>
@@ -212,6 +214,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
+ <version>1.0</version>
<configuration>
<path>/${project.build.finalName}</path>
<!-- Embedded port -->
@@ -228,15 +231,16 @@
<profiles>
<profile>
- <id>weld-embedded</id>
+ <!-- FIXME broken, requires EE APIs -->
+ <id>arq-weld-embedded</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-embedded</artifactId>
- <version>${arquillian.version}</version>
+ <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
+ <version>${version.arquillian}</version>
<scope>test</scope>
</dependency>
<dependency>
Modified: archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/faces-config.xml 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/faces-config.xml 2010-10-21 03:36:39 UTC (rev 7038)
@@ -7,6 +7,6 @@
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
- <!-- Write your navigation rules here. You should use CDI for creating @Named managed beans! -->
+ <!-- Write your navigation rules here. You are encouraged to use CDI for creating @Named managed beans. -->
</faces-config>
Modified: archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/templates/default.xhtml
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/templates/default.xhtml 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/templates/default.xhtml 2010-10-21 03:36:39 UTC (rev 7038)
@@ -23,12 +23,12 @@
Learn more about Java EE 6 and the extensions provided by Weld and Seam.
</p>
<ul>
- <li><a href="http://seamframework.org/Weld/JSR299AndWeldOverview">Overview</a></li>
+ <li><a href="http://seamframework.org/Weld">Overview</a></li>
<li><a href="http://seamframework.org">Project site</a></li>
<li><a href="http://seamframework.org/Documentation/SeamDocumentation#H-WeldReferenceDocumentation">Documentation</a></li>
<li><a href="http://seamframework.org/Community/Forums">User forums</a></li>
<li><a href="http://seamframework.org/Community/MailingLists">Mailing lists</a></li>
- <li><a href="https://jira.jboss.org/jira/browse/WELD">Issue tracker</a></li>
+ <li><a href="https://jira.jboss.org/browse/WELDRAD">Issue tracker</a></li>
</ul>
<p>
If you have an add-on, please <a href="http://seamframework.org/Community/Forums">let us know</a> and
Modified: archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/web.xml 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/WEB-INF/web.xml 2010-10-21 03:36:39 UTC (rev 7038)
@@ -5,27 +5,33 @@
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
-
+
+ <!-- This is an optional parameter, but it makes troubleshooting errors much easier -->
+ <!-- You should remove this context parameter before deploying to production! -->
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+
<!-- Activate the JSF 2.0 servlet -->
<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 send through JSF -->
+
+ <!-- Tell the context which URLs to process with JSF -->
<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 are advised to remove this context parameter before a production deployment -->
- <context-param>
- <param-name>javax.faces.PROJECT_STAGE</param-name>
- <param-value>Development</param-value>
- </context-param>
+ <!-- This section is optional. We are allowing index.jsf to handle the root URL (i.e., /). -->
+ <welcome-file-list>
+ <!-- Add additional files here, if desired, for example: <welcome-file>index.html</welcome-file> -->
+ <welcome-file>index.jsf</welcome-file>
+ </welcome-file-list>
+
<!-- Weld Jetty/Tomcat specific configuration parameters -->
<!-- *** The <listener> and <resource-env-ref> elements can be deleted when running in a Java EE 6 container *** -->
<listener>
Deleted: archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/home.xhtml
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/home.xhtml 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/home.xhtml 2010-10-21 03:36:39 UTC (rev 7038)
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- template="/WEB-INF/templates/default.xhtml">
- <ui:define name="content">
- <h1>Hello World!</h1>
- <p>Your CDI bean <code>HelloWorld</code> says <span style="color: blue;">#{helloWorld.text}</span> using the Unified EL.</p>
-
- <h:form id="bv">
- <h2>Bean Validation examples</h2>
- <p>Enforces annotation-based constraints defined on the model class.</p>
- <table>
- <tr>
- <th style="text-align: right;">
- <h:outputLabel for="letters" value="Letters:"/>
- </th>
- <td>
- <h:inputText id="letters" value="#{helloWorld.letters}"/>
- <h:message for="letters" errorClass="invalid"/>
- </td>
- </tr>
- <tr>
- <th style="text-align: right;">
- <h:outputLabel for="numbers" value="Numbers:"/>
- </th>
- <td>
- <h:inputText id="numbers" value="#{helloWorld.numbers}"/>
- <h:message for="numbers" errorClass="invalid"/>
- </td>
- </tr>
- <tr>
- <th style="text-align: right;">
- <h:outputLabel for="email" value="Email:"/>
- </th>
- <td>
- <h:inputText id="email" value="#{helloWorld.email}"/>
- <h:message for="email" errorClass="invalid"/>
- </td>
- </tr>
- </table>
- <p>
- <h:commandButton id="check" value="Check values"/>
- <h:outputText value=" All clear!" rendered="#{facesContext.postback and empty facesContext.messageList}" style="color: green;"/>
- </p>
- </h:form>
- </ui:define>
-</ui:composition>
Added: archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.jsf
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.jsf (rev 0)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.jsf 2010-10-21 03:36:39 UTC (rev 7038)
@@ -0,0 +1,8 @@
+The contents of this file will not be displayed!
+
+Having this file is a trick to get JBoss AS to redirect to the path index.jsf
+when the root application URL is requested (or any subdirectory).
+
+See https://jira.jboss.org/browse/JBAS-8224
+
+If you are using other containers, such as Glassfish, this file will be ignored and you may delete at will.
Deleted: archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.jsp
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.jsp 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.jsp 2010-10-21 03:36:39 UTC (rev 7038)
@@ -1 +0,0 @@
-<% response.sendRedirect("home.jsf"); %>
Added: archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.xhtml
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.xhtml (rev 0)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/index.xhtml 2010-10-21 03:36:39 UTC (rev 7038)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="/WEB-INF/templates/default.xhtml">
+ <ui:define name="content">
+ <h1>Hello World!</h1>
+ <p>Your CDI bean <code>HelloWorld</code> says <span style="color: blue;">#{helloWorld.text}</span> using the Unified EL.</p>
+
+ <h:form id="bv">
+ <h2>Bean Validation examples</h2>
+ <p>Enforces annotation-based constraints defined on the model class.</p>
+ <table>
+ <tr>
+ <th style="text-align: right;">
+ <h:outputLabel for="letters" value="Letters:"/>
+ </th>
+ <td>
+ <h:inputText id="letters" value="#{helloWorld.letters}"/>
+ <h:message for="letters" errorClass="invalid"/>
+ </td>
+ </tr>
+ <tr>
+ <th style="text-align: right;">
+ <h:outputLabel for="numbers" value="Numbers:"/>
+ </th>
+ <td>
+ <h:inputText id="numbers" value="#{helloWorld.numbers}"/>
+ <h:message for="numbers" errorClass="invalid"/>
+ </td>
+ </tr>
+ <tr>
+ <th style="text-align: right;">
+ <h:outputLabel for="email" value="Email:"/>
+ </th>
+ <td>
+ <h:inputText id="email" value="#{helloWorld.email}"/>
+ <h:message for="email" errorClass="invalid"/>
+ </td>
+ </tr>
+ </table>
+ <p>
+ <h:commandButton id="check" value="Check values"/>
+ <h:outputText value=" All clear!" rendered="#{facesContext.postback and empty facesContext.messageList}" style="color: green;"/>
+ </p>
+ </h:form>
+ </ui:define>
+</ui:composition>
Modified: archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/resources/css/screen.css
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/resources/css/screen.css 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/main/webapp/resources/css/screen.css 2010-10-21 03:36:39 UTC (rev 7038)
@@ -29,6 +29,7 @@
text-align: center;
color: #666666;
font-size: 0.85em;
+ padding: 3em 0 0 0;
}
code {
font-size: 1.1em;
@@ -36,4 +37,4 @@
span.invalid {
padding-left: 3px;
color: red;
-}
\ No newline at end of file
+}
Modified: archetypes/jsf-weld-servlet-webapp/trunk/src/test/java/com/mycompany/BeanManagerTest.java
===================================================================
--- archetypes/jsf-weld-servlet-webapp/trunk/src/test/java/com/mycompany/BeanManagerTest.java 2010-10-21 03:31:26 UTC (rev 7037)
+++ archetypes/jsf-weld-servlet-webapp/trunk/src/test/java/com/mycompany/BeanManagerTest.java 2010-10-21 03:36:39 UTC (rev 7038)
@@ -7,7 +7,7 @@
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -16,10 +16,11 @@
public class BeanManagerTest
{
@Deployment
- public static Archive<?> createTestArchive() {
- return ShrinkWrap.create("test.jar", JavaArchive.class)
+ public static Archive<?> createTestArchive()
+ {
+ return ShrinkWrap.create(JavaArchive.class)
.addClass(HelloWorld.class)
- .addManifestResource(new ByteArrayAsset(new byte[0]), "beans.xml");
+ .addManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Inject BeanManager beanManager;
More information about the weld-commits
mailing list