Weld SVN: r5244 - in archetypes/trunk/jsf: servlet-minimal/src/main/resources/archetype-resources and 1 other directory.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-09 00:15:05 -0500 (Wed, 09 Dec 2009)
New Revision: 5244
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml
Log:
escape non-evaluated expressions
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-09 05:08:16 UTC (rev 5243)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-09 05:15:05 UTC (rev 5244)
@@ -1,3 +1,5 @@
+#set( $expr_start = '${' )
+#set( $expr_end = '}' )
<?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">
@@ -15,7 +17,7 @@
-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in the Maven 2 settings.xml file -->
- <jboss.home>${env.JBOSS_HOME}</jboss.home>
+ <jboss.home>${expr_start}env.JBOSS_HOME${expr_end}</jboss.home>
<jboss.domain>default</jboss.domain>
<!-- The version of Weld extensions in use -->
<weld.extensions.version>1.0.0-CR2</weld.extensions.version>
@@ -27,7 +29,7 @@
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-extensions-bom</artifactId>
- <version>${weld.extensions.version}</version>
+ <version>${expr_start}weld.extensions.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -124,8 +126,8 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<configuration>
- <jbossHome>${jboss.home}</jbossHome>
- <serverName>${jboss.domain}</serverName>
+ <jbossHome>${expr_start}jboss.home${expr_end}</jbossHome>
+ <serverName>${expr_start}jboss.domain${expr_end}</serverName>
</configuration>
</plugin>
</plugins>
Modified: archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-09 05:08:16 UTC (rev 5243)
+++ archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-09 05:15:05 UTC (rev 5244)
@@ -1,3 +1,5 @@
+#set( $expr_start = '${' )
+#set( $expr_end = '}' )
<?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">
@@ -24,7 +26,7 @@
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-extensions-bom</artifactId>
- <version>${weld.extensions.version}</version>
+ <version>${expr_start}weld.extensions.version${expr_end}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -145,9 +147,9 @@
</connector>
</connectors>
<!-- force friendly name instead of artifact name + version -->
- <contextPath>${project.build.finalName}</contextPath>
+ <contextPath>${expr_start}project.build.finalName${expr_end}</contextPath>
<!-- Where the BeanManager is constructed. This is where you'll declare datasources. -->
- <jettyEnvXml>\${basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
+ <jettyEnvXml>${expr_start}basedir${expr_end}/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>
@@ -160,7 +162,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
- <path>/${project.build.finalName}</path>
+ <path>/${expr_start}project.build.finalName${expr_end}</path>
<!-- Embedded port -->
<port>9090</port>
<!--
14 years, 11 months
Weld SVN: r5243 - in archetypes/trunk/jsf/jee/src/main/resources/archetype-resources: src/main/java and 1 other directory.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-09 00:08:16 -0500 (Wed, 09 Dec 2009)
New Revision: 5243
Added:
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepositoryProducer.java
Removed:
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java
Modified:
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepository.java
Log:
correct property replacements
fix EntityManager producer w/ note
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-09 03:55:30 UTC (rev 5242)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-09 05:08:16 UTC (rev 5243)
@@ -1,3 +1,5 @@
+#set( $expr_start = '${' )
+#set( $expr_end = '}' )
<?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">
@@ -18,7 +20,7 @@
To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in
the Maven 2 settings.xml file
-->
- <jboss.home>${env.JBOSS_HOME}</jboss.home>
+ <jboss.home>${expr_start}env.JBOSS_HOME${expr_end}</jboss.home>
<jboss.domain>default</jboss.domain>
<!-- The version of Weld extensions in use -->
<weld.extensions.version>1.0.0-CR2</weld.extensions.version>
@@ -29,7 +31,7 @@
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-extensions-bom</artifactId>
- <version>${weld.extensions.version}</version>
+ <version>${expr_start}weld.extensions.version${expr_end}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -138,8 +140,8 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<configuration>
- <jbossHome>${jboss.home}</jbossHome>
- <serverName>${jboss.domain}</serverName>
+ <jbossHome>${expr_start}jboss.home${expr_end}</jbossHome>
+ <serverName>${expr_start}jboss.domain${expr_end}</serverName>
</configuration>
</plugin>
</plugins>
Deleted: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java 2009-12-09 03:55:30 UTC (rev 5242)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java 2009-12-09 05:08:16 UTC (rev 5243)
@@ -1,13 +0,0 @@
-package ${package};
-
-import javax.ejb.Stateless;
-import javax.enterprise.inject.Produces;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-public
-@Stateless
-class WidgetDatabaseProducer
-{
- @PersistenceContext @Produces @WidgetRepository EntityManager em;
-}
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepository.java
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepository.java 2009-12-09 03:55:30 UTC (rev 5242)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepository.java 2009-12-09 05:08:16 UTC (rev 5243)
@@ -8,6 +8,6 @@
import javax.inject.Qualifier;
@Qualifier
-(a)Target({ElementType.FIELD, ElementType.PARAMETER})
+(a)Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface WidgetRepository {}
Copied: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepositoryProducer.java (from rev 5242, archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java)
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepositoryProducer.java (rev 0)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepositoryProducer.java 2009-12-09 05:08:16 UTC (rev 5243)
@@ -0,0 +1,21 @@
+package ${package};
+
+import javax.ejb.Stateless;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.Disposes;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+public
+@Stateless
+class WidgetDatabaseProducer
+{
+ // NOTE cannot use producer field because Weld attempts to close EntityManager
+ @PersistenceContext EntityManager em;
+
+ public @Produces @WidgetRepository EntityManager retrieveEntityManager() {
+ return em;
+ }
+
+ public void disposeEntityManager(@Disposes @WidgetRepository EntityManager em) {}
+}
14 years, 11 months
Weld SVN: r5242 - in archetypes/trunk/jsf/jee/src/main/resources: archetype-resources and 5 other directories.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-08 22:55:30 -0500 (Tue, 08 Dec 2009)
New Revision: 5242
Added:
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/Widget.java
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetListProducer.java
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepository.java
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/resources/import.sql
Modified:
archetypes/trunk/jsf/jee/src/main/resources/META-INF/archetype.xml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
Log:
add persistence and some example beans
Modified: archetypes/trunk/jsf/jee/src/main/resources/META-INF/archetype.xml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/META-INF/archetype.xml 2009-12-09 03:55:05 UTC (rev 5241)
+++ archetypes/trunk/jsf/jee/src/main/resources/META-INF/archetype.xml 2009-12-09 03:55:30 UTC (rev 5242)
@@ -1,16 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
- <id>weld-archetype-servlet-quickstart</id>
+ <id>weld-archetype-jee-quickstart</id>
<resources>
+ <resource>src/main/resources/import.sql</resource>
+ <resource>src/main/resources/META-INF/beans.xml</resource>
+ <resource>src/main/resources/META-INF/persistence.xml</resource>
<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/webapp/WEB-INF/faces-config.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>
+ <source>src/main/java/Widget.java</source>
+ <source>src/main/java/WidgetListProducer.java</source>
+ <source>src/main/java/WidgetRepository.java</source>
+ <source>src/main/java/WidgetRepositoryProducer.java</source>
</sources>
<testSources />
<testResources />
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-09 03:55:05 UTC (rev 5241)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-09 03:55:30 UTC (rev 5242)
@@ -42,6 +42,13 @@
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
+ <!-- EJB -->
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-api</artifactId>
+ <scope>provided</scope>
+ <version>3.1.0</version>
+ </dependency>
<!-- Common annotations (e.g., @PostConstruct) -->
<dependency>
<groupId>javax.annotation</groupId>
@@ -69,6 +76,12 @@
<artifactId>jsf-api</artifactId>
<scope>provided</scope>
</dependency>
+ <!-- JPA -->
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
<!-- Optional, but highly recommended. -->
<dependency>
@@ -93,53 +106,6 @@
</exclusion>
</exclusions>
</dependency>
-
- <!--
- Experimental Dependencies. Still working through these. If these are incorrect, please change and notify
- someone at weld-dev(a)lists.jboss.org They will be finalized soon.
- -->
- <!-- JPA Dependencies. -->
- <!-- Should this be provided? -->
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
- <!-- Should this be provided? -->
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <version>3.2.6.ga</version>
- <!-- why? -->
- <exclusions>
- <exclusion>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- Should this be provided? -->
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>3.4.0.GA</version>
- </dependency>
- <!-- Should this be provided? -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>1.4.2</version>
- </dependency>
- <!--<dependency>-->
- <!-- <groupId>c3p0</groupId>-->
- <!-- <artifactId>c3p0</artifactId>-->
- <!-- <version>0.9.1.2</version>-->
- <!--</dependency>-->
- <!-- Hypersonic in-memory database. Replace with a driver that reflects your database. -->
- <dependency>
- <groupId>org.hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.10</version>
- </dependency>
</dependencies>
<build>
<finalName>${artifactId}</finalName>
Added: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/Widget.java
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/Widget.java (rev 0)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/Widget.java 2009-12-09 03:55:30 UTC (rev 5242)
@@ -0,0 +1,61 @@
+package ${package};
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class Widget implements Serializable
+{
+ private Long id;
+ private String partNumber;
+ private String name;
+ private String description;
+
+ @Id
+ @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ // demonstrates a column name override
+ @Column(name = "partno")
+ public String getPartNumber()
+ {
+ return partNumber;
+ }
+
+ public void setPartNumber(String partNumber)
+ {
+ this.partNumber = partNumber;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+}
Added: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java (rev 0)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetDatabaseProducer.java 2009-12-09 03:55:30 UTC (rev 5242)
@@ -0,0 +1,13 @@
+package ${package};
+
+import javax.ejb.Stateless;
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+public
+@Stateless
+class WidgetDatabaseProducer
+{
+ @PersistenceContext @Produces @WidgetRepository EntityManager em;
+}
Added: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetListProducer.java
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetListProducer.java (rev 0)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetListProducer.java 2009-12-09 03:55:30 UTC (rev 5242)
@@ -0,0 +1,22 @@
+package ${package};
+
+import java.util.List;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.persistence.EntityManager;
+
+public class WidgetListProducer
+{
+ @Inject @WidgetRepository EntityManager widgetRepository;
+
+ @Produces
+ @Named
+ @RequestScoped
+ @SuppressWarnings("unchecked")
+ List<Widget> getWidgets() {
+ return widgetRepository.createQuery("select w from Widget w order by w.name").getResultList();
+ }
+}
Added: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepository.java
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepository.java (rev 0)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/java/WidgetRepository.java 2009-12-09 03:55:30 UTC (rev 5242)
@@ -0,0 +1,13 @@
+package ${package};
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+(a)Target({ElementType.FIELD, ElementType.PARAMETER})
+(a)Retention(RetentionPolicy.RUNTIME)
+public @interface WidgetRepository {}
Added: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml (rev 0)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml 2009-12-09 03:55:30 UTC (rev 5242)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="1.0"
+ xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/persistence
+ http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+ <persistence-unit name="widgets">
+ <!-- Use this data source name for JBoss AS -->
+ <jta-data-source>java:/DefaultDS</jta-data-source>
+ <!-- Use this data source name for Glassfish -->
+ <!--
+ <jta-data-source>jdbc/__default</jta-data-source>
+ -->
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <property name="hibernate.transaction.flush_before_completion" value="true"/>
+ <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
+ </properties>
+ </persistence-unit>
+</persistence>
Added: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/resources/import.sql
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/resources/import.sql (rev 0)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/resources/import.sql 2009-12-09 03:55:30 UTC (rev 5242)
@@ -0,0 +1 @@
+insert into Widget (id, partno, name, description) values (1, 'AAA001', 'Portable Hole', 'A hole for when you need to disappear fast.')
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-12-09 03:55:05 UTC (rev 5241)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml 2009-12-09 03:55:30 UTC (rev 5242)
@@ -26,4 +26,9 @@
<param-value>true</param-value>
</context-param>
+ <persistence-unit-ref>
+ <persistence-unit-ref-name>widgets/pu</persistence-unit-ref-name>
+ <persistence-unit-name>widgets</persistence-unit-name>
+ </persistence-unit-ref>
+
</web-app>
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-09 03:55:05 UTC (rev 5241)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-09 03:55:30 UTC (rev 5242)
@@ -47,5 +47,26 @@
<h:outputText value=" All clear!" rendered="#{facesContext.postback and empty facesContext.messageList}" style="color: green;"/>
</p>
</h:form>
+
+ <h2>Widgets</h2>
+ <h:dataTable var="_widget" value="#{widgets}">
+ <h:column>
+ <f:facet name="header">Id</f:facet>
+ #{_widget.id}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Part Number</f:facet>
+ #{_widget.partNumber}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Name</f:facet>
+ #{_widget.name}
+ </h:column>
+ <h:column>
+ <f:facet name="header">Description</f:facet>
+ #{_widget.description}
+ </h:column>
+ </h:dataTable>
+
</h:body>
</html>
14 years, 11 months
Weld SVN: r5241 - archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-08 22:55:05 -0500 (Tue, 08 Dec 2009)
New Revision: 5241
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF/archetype.xml
Log:
archetype name
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF/archetype.xml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF/archetype.xml 2009-12-09 03:54:54 UTC (rev 5240)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/META-INF/archetype.xml 2009-12-09 03:55:05 UTC (rev 5241)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype>
- <id>weld-archetype-servlet-quickstart</id>
+ <id>weld-archetype-jee-minimal-quickstart</id>
<resources>
<resource>src/main/webapp/index.xhtml</resource>
<resource>src/main/webapp/index.jsp</resource>
14 years, 11 months
Weld SVN: r5240 - in archetypes/trunk: jsf/jee and 2 other directories.
by weld-commits@lists.jboss.org
Author: sboscarine
Date: 2009-12-08 22:54:54 -0500 (Tue, 08 Dec 2009)
New Revision: 5240
Modified:
archetypes/trunk/jsf/jee-minimal/pom.xml
archetypes/trunk/jsf/jee/pom.xml
archetypes/trunk/jsf/servlet-minimal/pom.xml
archetypes/trunk/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: archetypes/trunk/jsf/jee/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee/pom.xml 2009-12-09 03:54:50 UTC (rev 5239)
+++ archetypes/trunk/jsf/jee/pom.xml 2009-12-09 03:54:54 UTC (rev 5240)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>1.0.0-BETA</version>
+ <version>1.0.1-BETA-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: archetypes/trunk/jsf/jee-minimal/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/pom.xml 2009-12-09 03:54:50 UTC (rev 5239)
+++ archetypes/trunk/jsf/jee-minimal/pom.xml 2009-12-09 03:54:54 UTC (rev 5240)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>1.0.0-BETA</version>
+ <version>1.0.1-BETA-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: archetypes/trunk/jsf/servlet-minimal/pom.xml
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/pom.xml 2009-12-09 03:54:50 UTC (rev 5239)
+++ archetypes/trunk/jsf/servlet-minimal/pom.xml 2009-12-09 03:54:54 UTC (rev 5240)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>1.0.0-BETA</version>
+ <version>1.0.1-BETA-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: archetypes/trunk/pom.xml
===================================================================
--- archetypes/trunk/pom.xml 2009-12-09 03:54:50 UTC (rev 5239)
+++ archetypes/trunk/pom.xml 2009-12-09 03:54:54 UTC (rev 5240)
@@ -27,7 +27,7 @@
</repositories>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>1.0.0-BETA</version>
+ <version>1.0.1-BETA-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Weld Archetypes</name>
@@ -70,8 +70,8 @@
<!-- SCM and distribution management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/archetypes/tags/weld-archetyp...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/archetypes/tags/weld-archetype-p...</developerConnection>
- <url>http://fisheye.jboss.org/browse/weld/archetypes/tags/weld-archetype-paren...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/archetypes/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/archetypes/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/weld/archetypes/trunk</url>
</scm>
</project>
14 years, 11 months
Weld SVN: r5239 - archetypes/tags.
by weld-commits@lists.jboss.org
Author: sboscarine
Date: 2009-12-08 22:54:50 -0500 (Tue, 08 Dec 2009)
New Revision: 5239
Added:
archetypes/tags/weld-archetype-parent-1.0.0-BETA/
Log:
[maven-scm] copy for tag weld-archetype-parent-1.0.0-BETA
Copied: archetypes/tags/weld-archetype-parent-1.0.0-BETA (from rev 5238, archetypes/trunk)
14 years, 11 months
Weld SVN: r5238 - in archetypes/trunk: jsf/jee and 2 other directories.
by weld-commits@lists.jboss.org
Author: sboscarine
Date: 2009-12-08 22:54:40 -0500 (Tue, 08 Dec 2009)
New Revision: 5238
Modified:
archetypes/trunk/jsf/jee-minimal/pom.xml
archetypes/trunk/jsf/jee/pom.xml
archetypes/trunk/jsf/servlet-minimal/pom.xml
archetypes/trunk/pom.xml
Log:
[maven-release-plugin] prepare release weld-archetype-parent-1.0.0-BETA
Modified: archetypes/trunk/jsf/jee/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee/pom.xml 2009-12-08 23:11:21 UTC (rev 5237)
+++ archetypes/trunk/jsf/jee/pom.xml 2009-12-09 03:54:40 UTC (rev 5238)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>1.0.0-BETA-SNAPSHOT</version>
+ <version>1.0.0-BETA</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-jsf-jee</artifactId>
- <description>A full Java EE 6 project => JSF 2.0, CDI 1.0, EJB 3.1, JPA 2.0; uses Weld for build dependency management</description>
+ <description>A full Java EE 6 project => JSF 2.0, CDI 1.0, EJB 3.1, JPA 2.0; uses Weld for build dependency management</description>
<name>Java EE 6 Archetype</name>
<packaging>maven-archetype</packaging>
Modified: archetypes/trunk/jsf/jee-minimal/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/pom.xml 2009-12-08 23:11:21 UTC (rev 5237)
+++ archetypes/trunk/jsf/jee-minimal/pom.xml 2009-12-09 03:54:40 UTC (rev 5238)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>1.0.0-BETA-SNAPSHOT</version>
+ <version>1.0.0-BETA</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-jsf-jee-minimal</artifactId>
- <description>A minimal Java EE 6 project => JSF 2.0 and CDI 1.0, no persistence; uses Weld for build dependency management</description>
+ <description>A minimal Java EE 6 project => JSF 2.0 and CDI 1.0, no persistence; uses Weld for build dependency management</description>
<name>Minimal Java EE 6 Archteype</name>
<packaging>maven-archetype</packaging>
Modified: archetypes/trunk/jsf/servlet-minimal/pom.xml
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/pom.xml 2009-12-08 23:11:21 UTC (rev 5237)
+++ archetypes/trunk/jsf/servlet-minimal/pom.xml 2009-12-09 03:54:40 UTC (rev 5238)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>1.0.0-BETA-SNAPSHOT</version>
+ <version>1.0.0-BETA</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: archetypes/trunk/pom.xml
===================================================================
--- archetypes/trunk/pom.xml 2009-12-08 23:11:21 UTC (rev 5237)
+++ archetypes/trunk/pom.xml 2009-12-09 03:54:40 UTC (rev 5238)
@@ -27,7 +27,7 @@
</repositories>
<groupId>org.jboss.weld.archetypes</groupId>
<artifactId>weld-archetype-parent</artifactId>
- <version>1.0.0-BETA-SNAPSHOT</version>
+ <version>1.0.0-BETA</version>
<packaging>pom</packaging>
<name>Weld Archetypes</name>
@@ -70,8 +70,8 @@
<!-- SCM and distribution management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/archetypes/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/archetypes/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/weld/archetypes/trunk</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/archetypes/tags/weld-archetyp...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/archetypes/tags/weld-archetype-p...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/weld/archetypes/tags/weld-archetype-paren...</url>
</scm>
</project>
14 years, 11 months
Weld SVN: r5237 - in archetypes/trunk/jsf: jee-minimal/src/main/resources/archetype-resources and 1 other directories.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-08 18:11:21 -0500 (Tue, 08 Dec 2009)
New Revision: 5237
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml
archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml
Log:
explain why Hibernate Validator is a compile dependencies (extra constraints)
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-08 23:10:49 UTC (rev 5236)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/pom.xml 2009-12-08 23:11:21 UTC (rev 5237)
@@ -55,15 +55,14 @@
<scope>provided</scope>
</dependency>
<!-- Bean Validation Implementation -->
- <!-- In case one is not provided by your container, but it is required by Java EE 6! -->
- <!--
+ <!-- Provides portable constraints such as @NotEmpty, @Email and @Url -->
+ <!-- Hibernate Validator is the JSR-303 implementation in JBoss AS -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.0.GA</version>
- <scope>runtime</scope>
+ <scope>provided</scope>
</dependency>
- -->
<!-- JSF -->
<dependency>
<groupId>javax.faces</groupId>
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-08 23:10:49 UTC (rev 5236)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-08 23:11:21 UTC (rev 5237)
@@ -53,15 +53,14 @@
<scope>provided</scope>
</dependency>
<!-- Bean Validation Implementation -->
- <!-- In case one is not provided by your container, but it is required by Java EE 6! -->
- <!--
+ <!-- Provides portable constraints such as @NotEmpty, @Email and @Url -->
+ <!-- Hibernate Validator is the JSR-303 implementation in JBoss AS -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.0.GA</version>
- <scope>runtime</scope>
+ <scope>provided</scope>
</dependency>
- -->
<!-- JSF -->
<dependency>
<groupId>javax.faces</groupId>
Modified: archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-08 23:10:49 UTC (rev 5236)
+++ archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/pom.xml 2009-12-08 23:11:21 UTC (rev 5237)
@@ -101,6 +101,7 @@
</dependency>
<!-- Bean Validation Implementation -->
+ <!-- Provides portable constraints such as @NotEmpty, @Email and @Url -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
14 years, 11 months
Weld SVN: r5236 - in archetypes/trunk/jsf: jee-minimal/src/main/resources/archetype-resources/src/main/webapp and 1 other directories.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-12-08 18:10:49 -0500 (Tue, 08 Dec 2009)
New Revision: 5236
Modified:
archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
Log:
don't confuse users with two different EL syntaxes; in Facelets, they are one and the same
Modified: archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-08 22:27:47 UTC (rev 5235)
+++ archetypes/trunk/jsf/jee/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-08 23:10:49 UTC (rev 5236)
@@ -4,12 +4,11 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
- <title>Weld Starter Application</title>
+ <title>Java EE 6 Starter Application</title>
</h:head>
<h:body>
<h1>Hello World!</h1>
- <p>My weld-injected bean says <span style="color: blue;">#{helloWorld.text}</span> in a JSF EL dialect.</p>
- <p>You can write the same value using the Unified EL: <span style="color: green;">${helloWorld.text}</span></p>
+ <p>My CDI bean says <span style="color: blue;">#{helloWorld.text}</span> using the Unified EL.</p>
<h:form>
<h2>Bean Validation examples</h2>
Modified: archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-08 22:27:47 UTC (rev 5235)
+++ archetypes/trunk/jsf/jee-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-08 23:10:49 UTC (rev 5236)
@@ -4,12 +4,11 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
- <title>Weld Starter Application</title>
+ <title>Java EE 6 Starter Application</title>
</h:head>
<h:body>
<h1>Hello World!</h1>
- <p>My weld-injected bean says <span style="color: blue;">#{helloWorld.text}</span> in a JSF EL dialect.</p>
- <p>You can write the same value using the Unified EL: <span style="color: green;">${helloWorld.text}</span></p>
+ <p>My CDI bean says <span style="color: blue;">#{helloWorld.text}</span> using the Unified EL.</p>
<h:form>
<h2>Bean Validation examples</h2>
Modified: archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-08 22:27:47 UTC (rev 5235)
+++ archetypes/trunk/jsf/servlet-minimal/src/main/resources/archetype-resources/src/main/webapp/index.xhtml 2009-12-08 23:10:49 UTC (rev 5236)
@@ -4,12 +4,11 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
- <title>Weld Starter Application</title>
+ <title>Weld JSF/Servlet Starter Application</title>
</h:head>
<h:body>
<h1>Hello World!</h1>
- <p>My weld-injected bean says <span style="color: blue;">#{helloWorld.text}</span> in a JSF EL dialect.</p>
- <p>You can write the same value using the Unified EL: <span style="color: green;">${helloWorld.text}</span></p>
+ <p>My CDI bean says <span style="color: blue;">#{helloWorld.text}</span> using the Unified EL.</p>
<h:form>
<h2>Bean Validation examples</h2>
14 years, 11 months
Weld SVN: r5235 - core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise.
by weld-commits@lists.jboss.org
Author: nickarls
Date: 2009-12-08 17:27:47 -0500 (Tue, 08 Dec 2009)
New Revision: 5235
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java
Log:
WBRI-326
Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java 2009-12-08 22:19:27 UTC (rev 5234)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/enterprise/EnterpriseBeanTest.java 2009-12-08 22:27:47 UTC (rev 5235)
@@ -1,5 +1,7 @@
package org.jboss.weld.tests.enterprise;
+import javax.ejb.EJBException;
+
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
@@ -19,6 +21,23 @@
}
+ @Test(description="WBRI-326")
+ public void testInvocationExceptionIsUnwrapped()
+ {
+ try
+ {
+ getCurrentManager().getInstanceByType(Fedora.class).causeRuntimeException();
+ }
+ catch (Throwable t)
+ {
+ if (t instanceof EJBException && t.getCause() instanceof BowlerHatException)
+ {
+ return;
+ }
+ }
+ assert false : "Expected a BowlerHatException to be thrown";
+ }
+
@Test(description="WBRI-275")
public void testSLSBBusinessMethodThrowsRuntimeException()
{
14 years, 11 months