[weld-commits] Weld SVN: r7221 - in archetypes/javaee6-webapp/tags: 1.0.1.CR1 and 34 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Thu Mar 31 19:08:54 EDT 2011


Author: dan.j.allen
Date: 2011-03-31 19:08:54 -0400 (Thu, 31 Mar 2011)
New Revision: 7221

Added:
   archetypes/javaee6-webapp/tags/1.0.1.CR1/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/pom.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/META-INF/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/META-INF/maven/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/META-INF/maven/archetype-metadata.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.factorypath
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.settings/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.apt.core.prefs
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/pom.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/readme.html
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/readme.txt
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/controller/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/controller/MemberRegistration.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberListProducer.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberRepository.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberRepositoryProducer.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/SeedDataImporter.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/model/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/model/Member.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/JaxRsActivator.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/MemberResourceRESTService.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources-jbossas/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources-jbossas/default-ds.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/META-INF/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/import.sql
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/templates/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/templates/default.xhtml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/index.jsf
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/css/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/css/screen.css
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/gfx/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/gfx/banner.png
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/gfx/weld.png
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/MavenArtifactResolver.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/MemberRegistrationTest.java
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/sun-resources.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/test-persistence.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-jbossas/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-jbossas/test-persistence.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources/arquillian.xml
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/projects/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/projects/basic/
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/projects/basic/archetype.properties
   archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/projects/basic/goal.txt
Log:
prepare 1.0.1.CR1 release


Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/pom.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/pom.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/pom.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -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/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.jboss.weld</groupId>
+        <artifactId>weld-parent</artifactId>
+        <version>17</version>
+    </parent>
+
+    <groupId>org.jboss.weld.archetypes</groupId>
+    <artifactId>jboss-javaee6-webapp</artifactId>
+    <version>1.0.1.CR1</version>
+    <packaging>maven-archetype</packaging>
+
+    <name>JBoss Java EE 6 Webapp</name>
+
+    <description>An archetype that generates a starter Java EE 6 webapp project</description>
+
+    <url>http://tinyurl.com/gojavaee</url>
+
+    <developers>
+        <developer>
+            <name>Steven Boscarine</name>
+            <roles>
+                <role>Weld archetypes co-lead</role>
+            </roles>
+            <email>stevenboscarine at gmail.com</email>
+            <organization>Community Volunteer</organization>
+        </developer>
+        <developer>
+            <name>Dan Allen</name>
+            <roles>
+                <role>Weld archetypes co-lead</role>
+            </roles>
+            <email>dan.j.allen at gmail.com</email>
+            <organization>JBoss, by Red Hat</organization>
+            <organizationUrl>http://redhat.com/jboss</organizationUrl>
+            <url>http://community.jboss.org/people/dan.j.allen</url>
+        </developer>
+        <developer>
+            <name>Pete Muir</name>
+            <roles>
+                <role>Weld project lead</role>
+            </roles>
+            <email>pete.muir at jboss.org</email>
+            <organization>Red Hat Inc.</organization>
+            <organizationUrl>http://redhat.com/jboss</organizationUrl>
+            <url>http://in.relation.to/Bloggers/Pete</url>
+        </developer>
+    </developers>
+
+    <repositories>
+        <repository>
+            <id>jboss-public-repository</id>
+            <name>JBoss Repository</name>
+            <url>http://repository.jboss.org/nexus/content/groups/public</url>
+            <!-- These optional flags are designed to speed up your builds by reducing remote server calls -->
+            <releases>
+                <updatePolicy>never</updatePolicy>
+            </releases>
+            <snapshots>
+                <updatePolicy>daily</updatePolicy>
+            </snapshots>
+        </repository>
+    </repositories>
+
+    <build>
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.archetype</groupId>
+                <artifactId>archetype-packaging</artifactId>
+                <version>2.0-alpha-5</version>
+            </extension>
+        </extensions>
+
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-archetype-plugin</artifactId>
+                    <version>2.0-alpha-5</version>
+                    <extensions>true</extensions>
+                </plugin>
+                <!-- Uncomment to deploy to central -->
+                <!--
+                <plugin>
+                    <groupId>org.sonatype.plugins</groupId>
+                    <artifactId>nexus-maven-plugin</artifactId>
+                    <configuration>
+                        <nexusUrl>https://oss.sonatype.org</nexusUrl>
+                        <serverAuthId>central-releases-repository</serverAuthId>
+                    </configuration>
+                </plugin>
+                -->
+            </plugins>
+        </pluginManagement>
+    </build>
+
+    <scm>
+        <connection>scm:svn:http://anonsvn.jboss.org/repos/weld/archetypes/javaee6-webapp/trunk</connection>
+        <developerConnection>scm:svn:https://svn.jboss.org/repos/weld/archetypes/javaee6-webapp/trunk</developerConnection>
+        <url>http://fisheye.jboss.org/browse/weld/archetypes/javaee6-webapp/trunk</url>
+    </scm>
+
+    <!-- Uncomment to deploy to central -->
+    <!--
+    <distributionManagement>
+        <repository>
+            <id>central-releases-repository</id>
+            <name>Sonatype Nexus Maven Repository</name> 
+            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
+        </repository>
+    </distributionManagement>
+    -->
+</project>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/META-INF/maven/archetype-metadata.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/META-INF/maven/archetype-metadata.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="jboss-javaee6-webapp-src"
+    xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <requiredProperties>
+    <requiredProperty key="name">
+      <defaultValue>Java EE 6 webapp project</defaultValue>
+    </requiredProperty>
+  </requiredProperties>
+  <fileSets>
+    <fileSet filtered="true" packaged="true" encoding="UTF-8">
+      <directory>src/main/java</directory>
+      <includes>
+        <include>**/*.java</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>src/main/webapp</directory>
+      <includes>
+        <include>**/*.MF</include>
+        <include>**/*.png</include>
+        <include>**/*.xhtml</include>
+        <include>**/*.xml</include>
+        <include>**/*.css</include>
+        <include>**/*.jsf</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>src/main/resources</directory>
+      <includes>
+        <include>**/*.sql</include>
+        <include>**/*.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>src/main/resources-jbossas</directory>
+      <includes>
+        <include>**/*.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" packaged="true" encoding="UTF-8">
+      <directory>src/test/java</directory>
+      <includes>
+        <include>**/*.java</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>src/test/resources</directory>
+      <includes>
+        <include>**/*.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>src/test/resources-glassfish-embedded</directory>
+      <includes>
+        <include>**/*.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>src/test/resources-jbossas</directory>
+      <includes>
+        <include>**/*.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>.settings</directory>
+      <includes>
+        <include>**/*.prefs</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory></directory>
+      <includes>
+        <include>**/*.factorypath</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory>.settings</directory>
+      <includes>
+        <include>**/*.prefs</include>
+        <include>**/*.component</include>
+        <include>**/*.container</include>
+        <include>**/*.name</include>
+        <include>**/*.jsdtscope</include>
+        <include>**/*.xml</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory></directory>
+      <includes>
+        <include>archetype-excludes.txt</include>
+        <include>release-procedure.txt</include>
+        <include>readme.txt</include>
+        <include>readme.html</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory></directory>
+      <includes>
+        <include>archetype-pom.xml</include>
+        <include>create-archetype.sh</include>
+        <include>.project</include>
+        <include>.classpath</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</archetype-descriptor>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.factorypath
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.factorypath	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.factorypath	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,5 @@
+<factorypath>
+    <factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="true" runInBatchMode="false"/>
+    <factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-jpamodelgen/1.1.1.Final/hibernate-jpamodelgen-1.1.1.Final.jar" enabled="true" runInBatchMode="false"/>
+    <factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
+</factorypath>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.apt.core.prefs
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.apt.core.prefs	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.apt.core.prefs	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.apt.aptEnabled=false
+org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations
+org.eclipse.jdt.apt.reconcileEnabled=true

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/pom.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/pom.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/pom.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,320 @@
+<?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>
+    <version>${version}</version>
+    <packaging>war</packaging>
+
+    <name>${name}</name>
+    <description>A starter Java EE 6 webapp project for use on Java EE 6-compliant application servers, generated from the jboss-javaee6-webapp archetype</description>
+
+    <properties>
+        <!-- Explicitly declaring the source encoding eliminates the following message: -->
+        <!-- [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>
+        <!-- Timestamp format for the maven.build.timestamp property -->
+        <!-- You can reference property in pom.xml or filtered resources (must enable third-party plugin if using Maven < 2.1) -->
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
+        <!-- To specify the JBoss AS directory the "Maven way", set the jboss.home property in an active profile in $HOME/.m2/settings.xml -->
+        <!-- By default, we assign it to the value of the JBOSS_HOME envrionment variable -->
+        <jboss.home>${env.JBOSS_HOME}</jboss.home>
+        <jboss.domain>default</jboss.domain>
+        <arquillian.version>1.0.0.Alpha5</arquillian.version>
+        <jboss-javaee6-spec.version>1.0.0.Final</jboss-javaee6-spec.version>
+    </properties>
+
+    <repositories>
+        <!-- The JBoss Community public repository is a composite repository of several major repositories -->
+        <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
+        <!-- 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>
+            <url>http://repository.jboss.org/nexus/content/groups/public</url>
+            <!-- These optional flags are designed to speed up your builds by reducing remote server calls -->
+            <releases>
+                <updatePolicy>never</updatePolicy>
+            </releases>
+            <snapshots>
+                <updatePolicy>daily</updatePolicy>
+            </snapshots>
+        </repository>
+    </repositories>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>jboss-public-repository</id>
+            <name>JBoss Repository</name>
+            <url>http://repository.jboss.org/nexus/content/groups/public</url>
+            <!-- These optional flags are designed to speed up your builds by reducing remote server calls -->
+            <releases>
+                <updatePolicy>never</updatePolicy>
+            </releases>
+            <snapshots>
+                <!-- Set to true to fix error in which Maven cannot find org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:2.0-alpha-6-SNAPSHOT -->
+                <updatePolicy>daily</updatePolicy>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
+    <dependencies>
+        <!-- Annotation processor to generate the JPA 2.0 metamodel classes for typesafe criteria queries -->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-jpamodelgen</artifactId>
+            <version>1.1.1.Final</version>
+            <scope>provided</scope>
+            <!-- Excluded because it's provided by the Java EE 6 dependencies -->
+            <exclusions>
+                <exclusion>
+                    <groupId>org.hibernate.javax.persistence</groupId>
+                    <artifactId>hibernate-jpa-2.0-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- Seam Solder provides convenient, portable CDI extensions such as an injectable logger -->
+        <dependency>
+            <groupId>org.jboss.seam.solder</groupId>
+            <artifactId>seam-solder</artifactId>
+            <version>3.0.0.Final</version>
+        </dependency>
+
+        <!-- JSR-303 (Bean Validation) Implementation -->
+        <!-- Provides portable constraints such as @Email -->
+        <!-- Hibernate Validator is the only JSR-303 implementation at the moment, so we can assume it's provided -->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>4.1.0.Final</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Needed for running tests (you may also use TestNG) -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Optional, but highly recommended -->
+        <!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA) JPA from JUnit/TestNG -->
+        <dependency>
+            <groupId>org.jboss.arquillian</groupId>
+            <artifactId>arquillian-junit</artifactId>
+            <version>${arquillian.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <!-- Compiler plugin enforces Java 1.6 compatibility and activates annotation processors -->
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.1</version>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <!-- The default profile skips all tests, though you can tune it to run just unit tests based on a custom pattern -->
+            <!-- Seperate profiles are provided for running all tests, including Arquillian tests that execute in the specified container -->
+            <id>default</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <dependencies>
+                <!-- Java EE 6 API dependency -->
+                <!-- This one dependency imports all APIs available for a Java EE 6.0 application -->
+                <dependency>
+                    <groupId>org.jboss.spec</groupId>
+                    <artifactId>jboss-javaee-6.0</artifactId>
+                    <version>${jboss-javaee6-spec.version}</version>
+                    <type>pom</type>
+                    <scope>provided</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <version>2.4.3</version>
+                        <configuration>
+                            <skip>true</skip>
+                        </configuration>
+                    </plugin>
+                    <!-- Optional plugin deploys your war to a local JBoss AS container -->
+                    <!-- To use, set the JBOSS_HOME environment variable (or jboss.home in $HOME/.m2/settings.xml) and run:
+                         mvn package jboss:hard-deploy -->
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>jboss-maven-plugin</artifactId>
+                        <version>1.4.1</version>
+                        <configuration>
+                            <jbossHome>${jboss.home}</jbossHome>
+                            <serverName>${jboss.domain}</serverName>
+                            <fileNames>
+                                <!-- JNDI DataSource that connects to in-memory HSQLDB to demonstrate JPA -->
+                                <fileName>src/main/resources-jbossas/default-ds.xml</fileName>
+                                <!-- DataSource needs to go before the application -->
+                                <fileName>${project.build.directory}/${project.build.finalName}.war</fileName>
+                            </fileNames>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <!-- An optional Arquillian testing profile that executes tests in GlassFish Embedded -->
+            <!-- Tests are broken under Arquillian 1.0.0.Alpha5 since sun-resources.xml is not supported -->
+            <!-- Run with: mvn clean test -Parq-glassfish-embedded -->
+            <id>arq-glassfish-embedded</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.jboss.arquillian.container</groupId>
+                    <artifactId>arquillian-glassfish-embedded-3</artifactId>
+                    <version>${arquillian.version}</version>
+                    <scope>test</scope>
+                </dependency>
+                <!-- This imports the Java EE 6 runtime libraries provided by GlassFish Embedded -->
+                <dependency>
+                    <groupId>org.glassfish.extras</groupId>
+                    <artifactId>glassfish-embedded-all</artifactId>
+                    <version>3.0.1</version>
+                    <scope>provided</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <testResources>
+                    <testResource>
+                        <directory>src/test/resources</directory>
+                    </testResource>
+                    <!-- Overrides default configuration to use alternate persistence.xml with eclipselink settings and declare 
+                        a Glassfish Datasource -->
+                    <!-- Used by Arquillian -->
+                    <testResource>
+                        <directory>src/test/resources-glassfish-embedded</directory>
+                    </testResource>
+                </testResources>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <!-- don't use version 2.5 as it creates seperate test suites per class -->
+                        <version>2.4.3</version>
+                        <configuration>
+                            <systemProperties>
+                                <!-- This optional property fixes an annoyance with Glassfish that puts derby.log in the project 
+                                    root -->
+                                <property>
+                                    <name>derby.stream.error.file</name>
+                                    <!-- If you save the log in target it is less likely to get committed in your project -->
+                                    <value>target/derby.log</value>
+                                </property>
+                            </systemProperties>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <!-- An optional Arquillian testing profile that executes tests in a remote JBoss AS instance -->
+            <!-- Run with: mvn clean test -Parq-jbossas-remote -->
+            <id>arq-jbossas-remote</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.jboss.arquillian.container</groupId>
+                    <artifactId>arquillian-jbossas-remote-6</artifactId>
+                    <version>${arquillian.version}</version>
+                    <scope>test</scope>
+                </dependency>
+                <!-- Java EE 6 API dependency -->
+                <!-- This one dependency imports all APIs available for a Java EE 6.0 application -->
+                <dependency>
+                    <groupId>org.jboss.spec</groupId>
+                    <artifactId>jboss-javaee-6.0</artifactId>
+                    <version>${jboss-javaee6-spec.version}</version>
+                    <type>pom</type>
+                    <scope>provided</scope>
+                </dependency>
+                <!-- needed for org.jnp.interfaces.NamingContextFactory -->
+                <dependency>
+                    <groupId>org.jboss.jbossas</groupId>
+                    <artifactId>jboss-as-client</artifactId>
+                    <version>6.0.0.Final</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <testResources>
+                    <testResource>
+                        <directory>src/test/resources</directory>
+                    </testResource>
+                    <!-- Overrides default configuration to use alternate persistence.xml with default JBoss AS data source -->
+                    <!-- Used by Arquillian -->
+                    <testResource>
+                        <directory>src/test/resources-jbossas</directory>
+                    </testResource>
+                </testResources>
+            </build>
+        </profile>
+
+        <profile>
+            <id>arq-weld-ee-embedded</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.jboss.arquillian.container</groupId>
+                    <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
+                    <version>${arquillian.version}</version>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.jboss.spec</groupId>
+                    <artifactId>jboss-javaee-6.0</artifactId>
+                    <version>${jboss-javaee6-spec.version}</version>
+                    <type>pom</type>
+                    <scope>provided</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.jboss.weld</groupId>
+                    <artifactId>weld-core</artifactId>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.jboss.weld</groupId>
+                    <artifactId>weld-api</artifactId>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+          <dependencyManagement>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.jboss.weld</groupId>
+                        <artifactId>weld-core-bom</artifactId>
+                        <version>1.1.0.Final</version>
+                        <type>pom</type>
+                        <scope>import</scope>
+                    </dependency>
+                </dependencies>
+            </dependencyManagement>
+        </profile>
+    </profiles>
+</project>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/readme.html
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/readme.html	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/readme.html	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,233 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title></title>
+<meta name="generator" content="HTML::TextToHTML v2.51"/>
+</head>
+<body>
+<h1><a name="section_1">${artifactId}</a></h1>
+<p> <strong>Source archetype:</strong> jboss-javaee6-webapp
+</p><h2><a name="section_1_1">What is it?</a></h2>
+<p> This is your project! It's a sample, deployable Maven 3 project to help you
+ get your foot in the door developing with Java EE 6. This project is setup to
+ allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0,
+ EJB 3.1, JPA 2.0 and Bean Validation 1.0 that can run on a certified
+ application server (Full or Web Profile). It includes a persistence unit and
+ some sample persistence and transaction code to help you get your feet wet
+ with database access in enterprise Java. 
+</p><h2><a name="section_1_2">System requirements</a></h2>
+<p> All you need to build this project is Java 5.0 (Java SDK 1.5) or better, Maven
+ 3.0 or better. We strongly recommend, however, that you use Java 6.0 (Java SDK
+ 1.6).
+</p><p> The application this project produces is designed to be run on a Java EE 6
+ application server. We recommend JBoss AS 6.0.0.Final or GlassFish 3.1, though
+ it should work on any server that is Java EE 6 compliant. In order to use it
+ on GlassFish 3.1, you'll need to update Weld. See instructions below.
+ 
+</p><dl>
+  <dt>NOTE</dt>
+<dd> This project retrieves artifacts from the JBoss Community Maven repository, a
+ superset of the Maven central repository, because there are certain Java EE
+ API JARs that are not published to Maven central (for details, see the JIRA
+ <a href="https://issues.jboss.org/browse/WELD-222">https://issues.jboss.org/browse/WELD-222</a>). The integration testing
+ framework used by the project, Arquillian, is also only available in the JBoss
+ Community Maven repository.</dd></dl>
+<p> With the prerequisites out of the way, you're ready to build and deploy.
+</p><h2><a name="section_1_3">Deploying the application</a></h2>
+<p> To deploy the application, you first need to produce the archive to deploy using
+ the following Maven goal:
+</p><pre>
+  mvn package</pre>
+<p> If you want to deploy the application on JBoss AS (standalone), make sure that
+ your JBOSS_HOME environment variable points to a JBoss AS 6 installation.
+</p><p> Alternatively, you can set the location of JBoss AS using the following
+ profile definition in the .m2/settings.xml file in your home directory:
+</p><pre>
+  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
+  &lt;settings
+     xmlns="<a href="http://maven.apache.org/POM/4.0.0">http://maven.apache.org/POM/4.0.0</a>"
+     xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"
+     xsi:schemaLocation="<a href="http://maven.apache.org/POM/4.0.0">http://maven.apache.org/POM/4.0.0</a> <a href="http://maven.apache.org/xsd/settings-1.0.0.xsd">http://maven.apache.org/xsd/settings-1.0.0.xsd</a>"&gt;
+  
+     &lt;profiles&gt;
+        &lt;profile&gt;
+           &lt;id&gt;environment&lt;/id&gt;
+           &lt;activation&gt;
+              &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
+           &lt;/activation&gt;
+           &lt;properties&gt;
+              &lt;jboss.home&gt;/path/to/jboss-as-6.0.0.Final&lt;/jboss.home&gt;
+           &lt;/properties&gt;
+        &lt;/profile&gt;
+     &lt;/profiles&gt;
+     
+  &lt;/settings&gt;</pre>
+<p> Once you've set either the JBOSS_HOME environment variable or the jboss.home
+ Maven property, you can deploy to JBoss AS by executing the following command:
+</p><pre>
+  mvn package jboss:hard-deploy</pre>
+<p> This will deploy two artifacts, target/${artifactId}.war and
+ default-ds.xml.
+ 
+</p><dl>
+  <dt>IMPORTANT</dt>
+<dd> Don't forget to deploy default-ds.xml!  </dd><dt>NOTE</dt>
+<dd> The default-ds.xml file installs a data source named jdbc/__default, so that
+ both JBoss AS and GlassFish have a data source with the same name.</dd></dl>
+<p> You can also set jboss.home on the commandline:
+</p><pre>
+  mvn package jboss:hard-deploy -Djboss.home=/path/to/jboss-as-6.0.0.Final</pre>
+<p> In all, you have three options to set the path of your JBoss AS installation:
+</p><ol>
+  <li>Set the JBOSS_HOME environment variable (e.g., export JBOSS_HOME=/path/to/jboss-as)
+  </li><li>Define the jboss.home Maven property in ${symbol_dollar}HOME/.m2/settings.xml
+  </li><li>Override the jboss.home Maven property from the commandline using -Djboss.home=/path/to/jboss-as</li></ol>
+<p> Now start JBoss AS. The application will be running at the following URL:
+</p><ul>
+  <li><a href="http://localhost:8080/${artifactId}/">http://localhost:8080/${artifactId}/</a></li></ul>
+<p> To undeploy from JBoss AS, run this command:
+</p><pre>
+  mvn jboss:hard-undeploy</pre>
+<p> There are several ways to deploy the archive to GlassFish. The recommended
+ approach is to open the project in NetBeans 6.8, right-click on the project
+ and select "Run" from the context menu. That starts JavaDB, GlassFish and
+ deploys the application. NetBeans then provides incremental deployment of web
+ resources.
+</p><dl>
+  <dt>IMPORTANT</dt>
+<dd> Don't forget to upgrade Weld. See Upgrading Weld in GlassFish 3.1 for details.</dd></dl>
+<p> You can also start GlassFish from the commandline. Change to the glassfish/bin
+ directory in the GlassFish install root and run these three commands (leading
+ ./ not required on Windows):
+</p><pre>
+  ./asadmin start-database
+  ./asadmin start-domain domain1</pre>
+<dl>
+  <dt>IMPORTANT</dt>
+<dd> Don't forget to start the JavaDB database!  </dd><dt>NOTE</dt>
+<dd> NetBeans starts the database automatically when it starts up GlassFish. If you
+ have the GlassFish Tools Eclipse plug-in, you have to enable this feature.
+ Select Window &gt; Preferences &gt; GlassFish Server Preferences and check the
+ option "Start JavaDB database process when &gt; Starting GlassFish Server"</dd></dl>
+<p> Now you can either deploy the target/${artifactId}.war through the
+ web-based GlassFish admininstration console, or you can again use asadmin:
+</p><pre>
+  ./asadmin deploy target/${artifactId}.war</pre>
+<p> To undeploy the application, run:
+</p><pre>
+  ./asadmin undeploy ${artifactId}</pre>
+<h2><a name="section_1_4">Upgrading Weld in GlassFish 3.1</a></h2>
+<p> There are several known CDI visibility issues in the stock version of Weld
+ that ships with GlassFish 3.1. One of these issues affects the sample code in
+ this application. For more information, see <a href="http://sfwk.org/Seam3/Compatibility">http://sfwk.org/Seam3/Compatibility</a>.
+ 
+</p><p> You can upgrade Weld by following these steps:
+</p><ol>
+  <li>Stop GlassFish
+  </li><li>Download the most recent Weld OSGi Bundle 1.1.0-SNAPSHOT (<a href="https://repository.jboss.org/nexus/content/repositories/snapshots/org/jboss/weld/weld-osgi-bundle/1.1.0-SNAPSHOT">https://repository.jboss.org/nexus/content/repositories/snapshots/org/jboss/weld/weld-osgi-bundle/1.1.0-SNAPSHOT</a>)
+  </li><li>Copy that jar to ${symbol_dollar}GLASSFISH_HOME/glassfish/modules/weld-osgi-bundle.jar
+  </li><li>Start GlassFish</li></ol>
+<p> You can now deploy the application successfully to GlassFish 3.1.
+</p><h2><a name="section_1_5">Running the Arquillian tests</a></h2>
+<p> By default, tests are configured to be skipped. The reason is that the sample
+ test is an Arquillian test, which requires the use of a container. You can
+ activate this test by selecting one of the two container configurations
+ provided, JBoss AS 6 (remote) or GlassFish 3 (embedded).
+</p><p> To run the test in Embedded GlassFish, first make sure that you don't have a
+ GlassFish container running (to avoid port conflicts). Then run the test goal
+ with the following profile activated:
+</p><pre>
+  mvn clean test -Parq-glassfish-embedded</pre>
+<p> (The clean goal is only required when you switch between containers)
+</p><p> To run the test in JBoss AS 6, first start a JBoss AS 6 instance. Then, run the
+ test goal with the following profile activated:
+</p><pre>
+  mvn clean test -Parq-jbossas-remote</pre>
+<p> Consult the Arquillian reference documentation to register profiles for any
+ supported container.
+</p><ul>
+  <li><a href="http://docs.jboss.org/arquillian/reference/latest/en-US/html/containers.html${symbol_pound}d0e678">http://docs.jboss.org/arquillian/reference/latest/en-US/html/containers.html${symbol_pound}d0e678</a></li></ul>
+<h2><a name="section_1_6">Importing the project into an IDE</a></h2>
+<p> If you created the project using the Maven archetype wizard in your IDE
+ (Eclipse, NetBeans or IntelliJ IDEA), then there is nothing to do. You should
+ already have an IDE project.
+</p><p> If you created the project from the commandline using archetype:generate, then
+ you need to import the project into your IDE. If you are using NetBeans 6.8 or
+ IntelliJ IDEA 9, then all you have to do is open the project as an existing
+ project. Both of these IDEs recognize Maven projects natively.
+</p><p> To import the project into Eclipse, you need the m2eclipse plugins installed.
+ Installation instructions are provided on the m2eclipse project site:
+</p><ul>
+  <li><a href="http://m2eclipse.sonatype.org/installing-m2eclipse.html">http://m2eclipse.sonatype.org/installing-m2eclipse.html</a></li></ul>
+<p> Here's the quick guide:
+</p><ul>
+  <li>Select Help &gt; Install New Software...
+  </li><li>Click the Add... button
+  </li><li>Add the repository URL <a href="http://m2eclipse.sonatype.org/update">http://m2eclipse.sonatype.org/update</a>
+  </li><li>Select and install the Maven Integration for Eclipse
+  </li><li>Restart as suggested
+  </li><li>Repeat the first two steps
+  </li><li>Add the repository URL <a href="http://m2eclipse.sonatype.org/sites/m2e-extras">http://m2eclipse.sonatype.org/sites/m2e-extras</a>
+  </li><li>Select and install the Maven Integration for WTP (Optional)
+  </li><li>Restart as suggested</li></ul>
+<p> Once the m2eclipse plugins are installed, you'll be ready to import the
+ project into Eclipse and run the project on a Java EE server. We also
+ recommend that you install the JBoss Tools plugins if you plan to deploy
+ to JBoss AS - <a href="http://jboss.org/tools">http://jboss.org/tools</a>
+</p><dl>
+  <dt>NOTE</dt>
+<dd> If you are using Eclipse as your IDE, we we strongly recommend that you use
+ Eclipse 3.6 (Helios) - <a href="http://www.eclipse.org/helios">http://www.eclipse.org/helios</a></dd></dl>
+<p> Select File &gt; Import. . . and choose the Maven &gt; Existing Maven Projects option.
+ Navigate to the root directory of your project. Eclipse should recognize the
+ Maven project and preselect it in the Project box. Click Finish and m2eclipse
+ will take it from there.
+</p><dl>
+  <dt>NOTE</dt>
+<dd> You cannot use the import option General &gt; Existing Projects into Workspace
+ because Eclipse does not recognize Maven projects as Eclipse projects
+ natively. You must use the importer provided by m2eclipse as just described.</dd></dl>
+<p> Additional configuration is required to get Eclipse to generate the JPA
+ metamodel. The archetype includes the necessary Eclipse config files in your
+ project. To enable this feature, right click on the project and select:
+</p><pre>
+  Properties &gt; Java Compiler &gt; Annotation Processing</pre>
+<p> Check "Enable annotation processing" then click OK and OK again when your are
+ prompted to run a project build.
+</p><p> This configuration is described in further detail in the Hibernate JPA documentation:
+</p><ul>
+  <li><a href="http://docs.jboss.org/hibernate/stable/jpamodelgen/reference/en-US/html_single/${symbol_pound}d0e319">http://docs.jboss.org/hibernate/stable/jpamodelgen/reference/en-US/html_single/${symbol_pound}d0e319</a></li></ul>
+<p> Once the project is imported into the IDE, you can execute the Maven commands
+ through the IDE controls to deploy the application to a container.
+</p><p> To deploy to GlassFish from Eclipse, you'll need the GlassFish Tools Bundle,
+ available at the update site <a href="http://download.java.net/glassfish/eclipse/helios">http://download.java.net/glassfish/eclipse/helios</a>
+ or from the Help &gt; Eclipse Marketplace. . .
+</p><h2><a name="section_1_7">Downloading the sources and Javadocs</a></h2>
+<p> If you want to be able to debug into the source code or look at the Javadocs
+ of any library in the project, you can run either of the following two
+ commands to pull them into your local repository. The IDE should then detect
+ them.
+</p><pre>
+  mvn dependency:sources
+  mvn dependency:resolve -Dclassifier=javadoc</pre>
+<h2><a name="section_1_8">Resources</a></h2>
+<ul>
+  <li>Weld archetypes
+  <ul>
+    <li>Quickstart:         <a href="http://tinyurl.com/gojavaee">http://tinyurl.com/gojavaee</a>
+    </li><li>Issue tracker:      <a href="https://issues.jboss.org/browse/WELDRAD">https://issues.jboss.org/browse/WELDRAD</a>
+    </li><li>Source code:        <a href="http://anonsvn.jboss.org/repos/weld/archetypes">http://anonsvn.jboss.org/repos/weld/archetypes</a>
+    </li><li>Forums:             <a href="http://sfwk.org/Community/WeldUsers">http://sfwk.org/Community/WeldUsers</a>
+  </li></ul>
+  </li><li>JSR-299 overview:     <a href="http://sfwk.org/Weld">http://sfwk.org/Weld</a>
+  </li><li>JSF community site:   <a href="http://www.javaserverfaces.org">http://www.javaserverfaces.org</a>
+  </li><li>Download JBoss AS:    <a href="http://jboss.org/jbossas/downloads">http://jboss.org/jbossas/downloads</a>
+  </li><li>Download GlassFish:   <a href="http://glassfish.java.net/public/downloadsindex.html">http://glassfish.java.net/public/downloadsindex.html</a>
+</li></ul>
+
+</body>
+</html>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/readme.txt
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/readme.txt	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/readme.txt	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,275 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+ ${artifactId}
+ ++++++++++++++++++++++++
+
+ ${symbol_pound}Source archetype:${symbol_pound} jboss-javaee6-webapp
+
+ What is it?
+ ===========
+
+ This is your project! It's a sample, deployable Maven 3 project to help you
+ get your foot in the door developing with Java EE 6. This project is setup to
+ allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0,
+ EJB 3.1, JPA 2.0 and Bean Validation 1.0 that can run on a certified
+ application server (Full or Web Profile). It includes a persistence unit and
+ some sample persistence and transaction code to help you get your feet wet
+ with database access in enterprise Java. 
+
+ System requirements
+ ===================
+
+ All you need to build this project is Java 5.0 (Java SDK 1.5) or better, Maven
+ 3.0 or better. We strongly recommend, however, that you use Java 6.0 (Java SDK
+ 1.6).
+
+ The application this project produces is designed to be run on a Java EE 6
+ application server. We recommend JBoss AS 6.0.0.Final or GlassFish 3.1, though
+ it should work on any server that is Java EE 6 compliant. In order to use it
+ on GlassFish 3.1, you'll need to update Weld. See instructions below.
+ 
+ NOTE:
+ This project retrieves artifacts from the JBoss Community Maven repository, a
+ superset of the Maven central repository, because there are certain Java EE
+ API JARs that are not published to Maven central (for details, see the JIRA
+ https://issues.jboss.org/browse/WELD-222). The integration testing
+ framework used by the project, Arquillian, is also only available in the JBoss
+ Community Maven repository.
+
+ With the prerequisites out of the way, you're ready to build and deploy.
+
+ Deploying the application
+ =========================
+
+ To deploy the application, you first need to produce the archive to deploy using
+ the following Maven goal:
+
+  mvn package
+
+ If you want to deploy the application on JBoss AS (standalone), make sure that
+ your JBOSS_HOME environment variable points to a JBoss AS 6 installation.
+
+ Alternatively, you can set the location of JBoss AS using the following
+ profile definition in the .m2/settings.xml file in your home directory:
+
+  <?xml version="1.0" encoding="UTF-8"?>
+  <settings
+     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/settings-1.0.0.xsd">
+  
+     <profiles>
+        <profile>
+           <id>environment</id>
+           <activation>
+              <activeByDefault>true</activeByDefault>
+           </activation>
+           <properties>
+              <jboss.home>/path/to/jboss-as-6.0.0.Final</jboss.home>
+           </properties>
+        </profile>
+     </profiles>
+     
+  </settings>
+
+ Once you've set either the JBOSS_HOME environment variable or the jboss.home
+ Maven property, you can deploy to JBoss AS by executing the following command:
+
+  mvn package jboss:hard-deploy
+
+ This will deploy two artifacts, target/${artifactId}.war and
+ default-ds.xml.
+ 
+ IMPORTANT:
+ Don't forget to deploy default-ds.xml!
+
+ NOTE:
+ The default-ds.xml file installs a data source named jdbc/__default, so that
+ both JBoss AS and GlassFish have a data source with the same name.
+
+ You can also set jboss.home on the commandline:
+
+  mvn package jboss:hard-deploy -Djboss.home=/path/to/jboss-as-6.0.0.Final
+
+ In all, you have three options to set the path of your JBoss AS installation:
+
+ 1. Set the JBOSS_HOME environment variable (e.g., export JBOSS_HOME=/path/to/jboss-as)
+ 2. Define the jboss.home Maven property in ${symbol_dollar}HOME/.m2/settings.xml
+ 3. Override the jboss.home Maven property from the commandline using -Djboss.home=/path/to/jboss-as
+
+ Now start JBoss AS. The application will be running at the following URL:
+
+ - http://localhost:8080/${artifactId}/
+
+ To undeploy from JBoss AS, run this command:
+
+  mvn jboss:hard-undeploy
+
+ There are several ways to deploy the archive to GlassFish. The recommended
+ approach is to open the project in NetBeans 6.8, right-click on the project
+ and select "Run" from the context menu. That starts JavaDB, GlassFish and
+ deploys the application. NetBeans then provides incremental deployment of web
+ resources.
+
+ IMPORTANT:
+ Don't forget to upgrade Weld. See Upgrading Weld in GlassFish 3.1 for details.
+
+ You can also start GlassFish from the commandline. Change to the glassfish/bin
+ directory in the GlassFish install root and run these three commands (leading
+ ./ not required on Windows):
+
+  ./asadmin start-database
+  ./asadmin start-domain domain1
+
+ IMPORTANT:
+ Don't forget to start the JavaDB database!
+
+ NOTE:
+ NetBeans starts the database automatically when it starts up GlassFish. If you
+ have the GlassFish Tools Eclipse plug-in, you have to enable this feature.
+ Select Window > Preferences > GlassFish Server Preferences and check the
+ option "Start JavaDB database process when > Starting GlassFish Server"
+
+ Now you can either deploy the target/${artifactId}.war through the
+ web-based GlassFish admininstration console, or you can again use asadmin:
+
+  ./asadmin deploy target/${artifactId}.war
+
+ To undeploy the application, run:
+
+  ./asadmin undeploy ${artifactId}
+
+ Upgrading Weld in GlassFish 3.1
+ ===============================
+
+ There are several known CDI visibility issues in the stock version of Weld
+ that ships with GlassFish 3.1. One of these issues affects the sample code in
+ this application. For more information, see http://sfwk.org/Seam3/Compatibility.
+ 
+ You can upgrade Weld by following these steps:
+
+ 1. Stop GlassFish
+ 2. Download the most recent Weld OSGi Bundle 1.1.0-SNAPSHOT (https://repository.jboss.org/nexus/content/repositories/snapshots/org/jboss/weld/weld-osgi-bundle/1.1.0-SNAPSHOT)
+ 3. Copy that jar to ${symbol_dollar}GLASSFISH_HOME/glassfish/modules/weld-osgi-bundle.jar
+ 4. Start GlassFish
+
+ You can now deploy the application successfully to GlassFish 3.1.
+
+ Running the Arquillian tests
+ ============================
+
+ By default, tests are configured to be skipped. The reason is that the sample
+ test is an Arquillian test, which requires the use of a container. You can
+ activate this test by selecting one of the two container configurations
+ provided, JBoss AS 6 (remote) or GlassFish 3 (embedded).
+
+ To run the test in Embedded GlassFish, first make sure that you don't have a
+ GlassFish container running (to avoid port conflicts). Then run the test goal
+ with the following profile activated:
+
+  mvn clean test -Parq-glassfish-embedded
+
+ (The clean goal is only required when you switch between containers)
+
+ To run the test in JBoss AS 6, first start a JBoss AS 6 instance. Then, run the
+ test goal with the following profile activated:
+
+  mvn clean test -Parq-jbossas-remote
+
+ Consult the Arquillian reference documentation to register profiles for any
+ supported container.
+
+ - http://docs.jboss.org/arquillian/reference/latest/en-US/html/containers.html${symbol_pound}d0e678
+
+ Importing the project into an IDE
+ =================================
+
+ If you created the project using the Maven archetype wizard in your IDE
+ (Eclipse, NetBeans or IntelliJ IDEA), then there is nothing to do. You should
+ already have an IDE project.
+
+ If you created the project from the commandline using archetype:generate, then
+ you need to import the project into your IDE. If you are using NetBeans 6.8 or
+ IntelliJ IDEA 9, then all you have to do is open the project as an existing
+ project. Both of these IDEs recognize Maven projects natively.
+
+ To import the project into Eclipse, you need the m2eclipse plugins installed.
+ Installation instructions are provided on the m2eclipse project site:
+
+ - http://m2eclipse.sonatype.org/installing-m2eclipse.html
+
+ Here's the quick guide:
+
+ - Select Help > Install New Software...
+ - Click the Add... button
+ - Add the repository URL http://m2eclipse.sonatype.org/update
+ - Select and install the Maven Integration for Eclipse
+ - Restart as suggested
+ - Repeat the first two steps
+ - Add the repository URL http://m2eclipse.sonatype.org/sites/m2e-extras
+ - Select and install the Maven Integration for WTP (Optional)
+ - Restart as suggested
+
+ Once the m2eclipse plugins are installed, you'll be ready to import the
+ project into Eclipse and run the project on a Java EE server. We also
+ recommend that you install the JBoss Tools plugins if you plan to deploy
+ to JBoss AS - http://jboss.org/tools
+
+ NOTE:
+ If you are using Eclipse as your IDE, we we strongly recommend that you use
+ Eclipse 3.6 (Helios) - http://www.eclipse.org/helios
+
+ Select File > Import. . . and choose the Maven > Existing Maven Projects option.
+ Navigate to the root directory of your project. Eclipse should recognize the
+ Maven project and preselect it in the Project box. Click Finish and m2eclipse
+ will take it from there.
+
+ NOTE:
+ You cannot use the import option General > Existing Projects into Workspace
+ because Eclipse does not recognize Maven projects as Eclipse projects
+ natively. You must use the importer provided by m2eclipse as just described.
+
+ Additional configuration is required to get Eclipse to generate the JPA
+ metamodel. The archetype includes the necessary Eclipse config files in your
+ project. To enable this feature, right click on the project and select:
+
+  Properties > Java Compiler > Annotation Processing
+
+ Check "Enable annotation processing" then click OK and OK again when your are
+ prompted to run a project build.
+
+ This configuration is described in further detail in the Hibernate JPA documentation:
+
+ - http://docs.jboss.org/hibernate/stable/jpamodelgen/reference/en-US/html_single/${symbol_pound}d0e319
+
+ Once the project is imported into the IDE, you can execute the Maven commands
+ through the IDE controls to deploy the application to a container.
+
+ To deploy to GlassFish from Eclipse, you'll need the GlassFish Tools Bundle,
+ available at the update site http://download.java.net/glassfish/eclipse/helios
+ or from the Help > Eclipse Marketplace. . .
+
+ Downloading the sources and Javadocs
+ ====================================
+
+ If you want to be able to debug into the source code or look at the Javadocs
+ of any library in the project, you can run either of the following two
+ commands to pull them into your local repository. The IDE should then detect
+ them.
+
+  mvn dependency:sources
+  mvn dependency:resolve -Dclassifier=javadoc
+
+ Resources
+ =========
+
+ - Weld archetypes
+   - Quickstart:         http://tinyurl.com/gojavaee
+   - Issue tracker:      https://issues.jboss.org/browse/WELDRAD
+   - Source code:        http://anonsvn.jboss.org/repos/weld/archetypes
+   - Forums:             http://sfwk.org/Community/WeldUsers
+ - JSR-299 overview:     http://sfwk.org/Weld
+ - JSF community site:   http://www.javaserverfaces.org
+ - Download JBoss AS:    http://jboss.org/jbossas/downloads
+ - Download GlassFish:   http://glassfish.java.net/public/downloadsindex.html

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/controller/MemberRegistration.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/controller/MemberRegistration.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/controller/MemberRegistration.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,63 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.controller;
+
+import org.jboss.seam.solder.logging.Category;
+import ${package}.data.MemberRepository;
+import ${package}.model.Member;
+import javax.annotation.PostConstruct;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Model;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.persistence.EntityManager;
+import javax.transaction.UserTransaction;
+
+import org.jboss.logging.Logger;
+
+// Adding the @Stateful annotation eliminates need for manual transaction demarcation
+// @javax.ejb.Stateful
+// The @Model stereotype is a convenience mechanism to make this a request-scoped bean that has an EL name
+// Read more about the @Model stereotype in this FAQ: http://sfwk.org/Documentation/WhatIsThePurposeOfTheModelAnnotation
+ at Model
+public class MemberRegistration {
+    @Inject
+    @Category("${artifactId}")
+    private Logger log;
+
+    @Inject
+    @MemberRepository
+    private EntityManager em;
+
+    @Inject
+    private UserTransaction utx;
+
+    @Inject
+    private Event<Member> memberEventSrc;
+
+    private Member newMember;
+
+    @Produces
+    @Named
+    public Member getNewMember() {
+        return newMember;
+    }
+
+    public void register() throws Exception {
+        log.info("Registering " + newMember.getName());
+        // UserTransaction only needed when bean is not an EJB
+        utx.begin();
+        em.joinTransaction();
+        em.persist(newMember);
+        utx.commit();
+        memberEventSrc.fire(newMember);
+        initNewMember();
+    }
+
+    @PostConstruct
+    public void initNewMember() {
+        newMember = new Member();
+    }
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberListProducer.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberListProducer.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberListProducer.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,50 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.data;
+
+import ${package}.model.Member;
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Observes;
+import javax.enterprise.event.Reception;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Root;
+
+ at RequestScoped
+public class MemberListProducer {
+    @Inject
+    @MemberRepository
+    private EntityManager em;
+
+    private List<Member> members;
+
+    // @Named provides access the return value via the EL variable name "member" in the UI (e.g., Facelets or JSP view)
+    @Produces
+    @Named
+    public List<Member> getMembers() {
+        return members;
+    }
+
+    public void onMemberListChanged(@Observes(notifyObserver = Reception.IF_EXISTS) final Member member) {
+        retrieveAllMembersOrderedByName();
+    }
+
+    @PostConstruct
+    public void retrieveAllMembersOrderedByName() {
+        CriteriaBuilder cb = em.getCriteriaBuilder();
+        CriteriaQuery<Member> criteria = cb.createQuery(Member.class);
+        Root<Member> member = criteria.from(Member.class);
+        // Swap criteria statements if you would like to try out type-safe criteria queries, a new feature in JPA 2.0
+        // criteria.select(member).orderBy(cb.asc(member.get(Member_.name)));
+        criteria.select(member).orderBy(cb.asc(member.get("name")));
+        members = em.createQuery(criteria).getResultList();
+    }
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberRepository.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberRepository.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberRepository.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,23 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.data;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * A qualifier used to differentiate between multiple data repositories.
+ * 
+ * If you only have 1 EntityManager, this annotation is optional
+ */
+ at Qualifier
+ at Target({ ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD })
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface MemberRepository {
+    /* class body intentionally left blank */
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberRepositoryProducer.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberRepositoryProducer.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/MemberRepositoryProducer.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,30 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.data;
+
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+/**
+ * This class uses CDI to produce EntityManager instances qualified that are qualified as &${symbol_pound}064;MemberRepository.
+ * 
+ * <p>
+ * Example injection on a managed bean field:
+ * </p>
+ * 
+ * <pre>
+ * &${symbol_pound}064;Inject
+ * &${symbol_pound}064;MemberRepository
+ * private EntityManager memberRepository;
+ * </pre>
+ */
+public class MemberRepositoryProducer {
+    // use @SuppressWarnings to tell IDE to ignore warnings about field not being referenced directly
+    @SuppressWarnings("unused")
+    @Produces
+    @MemberRepository
+    @PersistenceContext
+    private EntityManager em;
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/SeedDataImporter.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/SeedDataImporter.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/data/SeedDataImporter.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,67 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.data;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+import javax.inject.Inject;
+import javax.persistence.EntityManager;
+import javax.persistence.TransactionRequiredException;
+import javax.transaction.UserTransaction;
+
+import org.jboss.logging.Logger;
+import org.jboss.seam.solder.logging.Category;
+
+import ${package}.model.Member;
+
+/**
+ * Import seed data into the database on application startup.
+ * 
+ * <p>
+ * Observes the context initialized event and loads seed data into the database using JPA.
+ * </p>
+ * 
+ * <p>
+ * As an alternative, you can perform the data loading by observing the context initialized event of a ServletContextListener
+ * </p>
+ * 
+ * @author Dan Allen
+ */
+ at Startup
+ at Singleton
+public class SeedDataImporter {
+    @Inject
+    @Category("${artifactId}")
+    private Logger log;
+
+    @Inject
+    @MemberRepository
+    private EntityManager em;
+
+    @Inject
+    private UserTransaction tx;
+
+    @PostConstruct
+    public void importData() {
+        Member member1 = new Member();
+        member1.setName("John Smith");
+        member1.setEmail("john.smith at mailinator.com");
+        member1.setPhoneNumber("2125551212");
+        try {
+            try {
+                em.persist(member1);
+            } catch (TransactionRequiredException e) {
+                // manual transaction control required in @PostConstruct method
+                // only use if enforced by JPA provider (due to bug in GlassFish)
+                tx.begin();
+                em.persist(member1);
+                tx.commit();
+            }
+            log.info("Successfully imported seed data.");
+        } catch (Exception e) {
+            log.warn("Seed data import failed.", e);
+        }
+    }
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/model/Member.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/model/Member.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/model/Member.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,77 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import javax.validation.constraints.Digits;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.hibernate.validator.constraints.Email;
+import org.hibernate.validator.constraints.NotEmpty;
+
+ at Entity
+ at XmlRootElement
+ at Table(uniqueConstraints = @UniqueConstraint(columnNames = "email"))
+public class Member implements Serializable {
+    /** Default value included to remove warning. Remove or modify at will. **/
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+    private String name;
+    private String email;
+    private String phoneNumber;
+
+    @Id
+    @GeneratedValue
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    @NotNull
+    @Size(min = 1, max = 25)
+    @Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and spaces")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @NotNull
+    @NotEmpty
+    @Email
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    @NotNull
+    @Size(min = 10, max = 12)
+    @Digits(fraction = 0, integer = 12)
+    @Column(name = "phone_number")
+    public String getPhoneNumber() {
+        return phoneNumber;
+    }
+
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+}
\ No newline at end of file

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/JaxRsActivator.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/JaxRsActivator.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/JaxRsActivator.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,20 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.rest;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+/**
+ * A class extending {@link Application} and annotated with @ApplicationPath is the Java EE 6 "no XML" approach to activating
+ * JAX-RS.
+ * 
+ * <p>
+ * Resources are served relative to the servlet path specified in the {@link ApplicationPath} annotation.
+ * </p>
+ */
+ at ApplicationPath("/rest")
+public class JaxRsActivator extends Application {
+    /* class body intentionally left blank */
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/MemberResourceRESTService.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/MemberResourceRESTService.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/java/rest/MemberResourceRESTService.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,43 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.rest;
+
+import ${package}.model.Member;
+import ${package}.data.MemberRepository;
+import java.util.List;
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.persistence.EntityManager;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+
+/**
+ * JAX-RS Example
+ * 
+ * This class produces a RESTful service to read the contents of the members table.
+ */
+ at Path("/members")
+ at RequestScoped
+public class MemberResourceRESTService {
+    @Inject
+    @MemberRepository
+    private EntityManager em;
+
+    @GET
+    public List<Member> listAllMembers() {
+        // Use @SupressWarnings to force IDE to ignore warnings about "genericizing" the results of this query
+        @SuppressWarnings("unchecked")
+        // We recommend centralizing inline queries such as this one into @NamedQuery annotations on the @Entity class
+        // as described in the named query blueprint: https://blueprints.dev.java.net/bpcatalog/ee5/persistence/namedquery.html
+        final List<Member> results = em.createQuery("select m from Member m order by m.name").getResultList();
+        return results;
+    }
+
+    @GET
+    @Path("/{id:[1-9][0-9]*}")
+    public Member lookupMemberById(@PathParam("id") long id) {
+        return em.find(Member.class, id);
+    }
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.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_2_0.xsd">
+    <persistence-unit name="primary">
+        <!-- You can force a non-default JPA provider using one of these declarations -->
+        <!--
+        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> 
+        <provider>org.hibernate.ejb.HibernatePersistence</provider>
+        -->
+
+        <!-- jdbc/__default is the default data source in GlassFish -->
+        <!-- A matching data source is added to JBoss AS by deploying the project file default-ds.xml -->
+        <jta-data-source>jdbc/__default</jta-data-source>
+        <properties>
+            <!-- Properties for Hibernate (default provider for JBoss AS) -->
+            <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+            <property name="hibernate.show_sql" value="true" />
+            <property name="hibernate.format_sql" value="false" />
+
+            <!-- Properties for EclipseLink (default provider for GlassFish) -->
+            <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+            <property name="eclipselink.logging.level" value="FINE" />
+        </properties>
+    </persistence-unit>
+</persistence>
\ No newline at end of file

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/import.sql
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/import.sql	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources/import.sql	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,2 @@
+-- If you are using Hibernate as the JPA provider, you can use this file to load seed data into the database using SQL statements
+-- The portable approach is to use a startup component (such as the @PostConstruct method of a @Startup @Singleton)
\ No newline at end of file

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources-jbossas/default-ds.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources-jbossas/default-ds.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/resources-jbossas/default-ds.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+    <!-- Installs an in-memory data source on JBoss AS having the same name as the default data source in GlassFish -->
+    <local-tx-datasource>
+        <jndi-name>jdbc/__default</jndi-name>
+        <use-java-context>false</use-java-context>
+        <connection-url>jdbc:hsqldb:.</connection-url>
+        <driver-class>org.hsqldb.jdbcDriver</driver-class>
+        <user-name>sa</user-name>
+        <password></password>
+        <min-pool-size>5</min-pool-size>
+        <max-pool-size>20</max-pool-size>
+    </local-tx-datasource>
+</datasources>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/MANIFEST.MF	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/META-INF/context.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This optional file is used by JBoss AS to get around an issue involving serialization of sessions between container restarts -->
+<!-- This file can be removed if you're using other containers, like Glassfish -->
+<Context>
+    <!-- disable storage of sessions across restarts by setting the pathname to an empty value -->
+    <Manager pathname=""/>
+</Context>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This file can be an empty text file (0 bytes) -->
+<!-- We're declaring the schema to save you time if you do have to configure this in the future -->
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="
+        http://java.sun.com/xml/ns/javaee 
+        http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+</beans>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This file is not required if you don't need any extra configuration. -->
+<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">
+
+    <!-- This descriptor activates the JSF 2.0 Servlet -->
+
+    <!-- Write your navigation rules here. You are encouraged to use CDI for creating @Named managed beans. -->
+
+</faces-config>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/templates/default.xhtml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/templates/default.xhtml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/templates/default.xhtml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:h="http://java.sun.com/jsf/html"
+    xmlns:ui="http://java.sun.com/jsf/facelets">
+    <h:head>
+        <title>Java EE 6 Starter Application</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <h:outputStylesheet name="css/screen.css"/>
+    </h:head>
+    <h:body>
+        <div id="container">
+            <div id="content">
+                <div id="sidebar">
+                    <h3>Find out more</h3>
+                    <p>
+                        Learn about the Java EE 6 platform and the component model it provides.
+                    </p>
+                    <ul>
+                        <li><a href="http://download.oracle.com/javaee/6/tutorial/doc">Java EE 6 tutorial</a></li>
+                        <li><a href="http://docs.jboss.org/cdi/spec/1.0/html">JSR-299: CDI specification</a></li>
+                        <li><a href="https://sites.google.com/site/cdipojo/get-started">CDI Source</a></li>
+                    </ul>
+                    <p>
+                        Dive into Weld, the JSR-299 reference implementation, and discover portable extensions Seam 3 offers.
+                    </p>
+                    <ul>
+                        <li><a href="http://docs.jboss.org/weld/reference/latest/en-US/html">Weld reference guide</a></li>
+                        <li><a href="http://seamframework.org/Weld">Weld project</a></li>
+                        <li><a href="http://seamframework.org/Seam3">Seam 3 project</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://issues.jboss.org/browse/WELDRAD">Archetype issue tracker</a></li>
+                    </ul>
+                    <p>
+                        Explore JavaServer Faces, the component-oriented UI framework in Java EE 6.
+                    </p>
+                    <ul>
+                        <li><a href="http://www.javaserverfaces.org">JSF community site</a></li>
+                    </ul>
+                    <p>
+                        If you have an add-on, please <a href="http://seamframework.org/Community/Forums">let us know</a> and
+                        consider <a href="http://seamframework.org/Seam3/GetInvolved">contributing</a> it back to the
+                        community!
+                    </p>
+                </div>
+                <ui:insert name="content">
+                    [Template content will be inserted here]
+                </ui:insert>
+            </div>
+            <div id="footer">
+                <h:graphicImage value="/resources/gfx/weld.png" alt="Weld logo"/>
+                <p>
+                    This project was generated from a Maven archetype maintained by the Weld team.<br/>
+                    Weld is the reference implementation of CDI, released under the Apache License, Version 2.0.<br/>
+                    <a href="http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&amp;name=java.util.logging%3Atype%3DLogging">Adjust logging levels (JBoss AS)</a>
+                </p>
+            </div>
+        </div>
+    </h:body>
+</html>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.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-app_3_0.xsd">
+
+    <!-- An optional parameter that 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>
+    
+    <!-- JSF 2.0 Servlet activates automatically when the WEB-INF/faces-config.xml descriptor is present -->
+
+    <!-- Enable this mapping to protect your view templates from direct URL access -->
+    <!--
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.xhtml</url-pattern>
+    </servlet-mapping>
+    -->
+
+    <!-- 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>
+</web-app>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/index.jsf
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/index.jsf	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/index.jsf	2011-03-31 23:08:54 UTC (rev 7221)
@@ -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://issues.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.

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/index.xhtml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/index.xhtml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/index.xhtml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,79 @@
+<?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>Welcome to Java EE 6!</h1>
+
+        <p>You have successfully deployed a Java EE 6 web application.</p>
+
+        <h:form id="reg">
+            <h2>Register (Bean Validation example)</h2>
+            <p>Enforces annotation-based constraints defined on the model class.</p>
+            <table>
+                <tr>
+                    <th style="text-align: right;">
+                        <h:outputLabel for="name" value="Name:"/>
+                    </th>
+                    <td>
+                        <h:inputText id="name" value="#{newMember.name}"/>
+                        <h:message for="name" errorClass="invalid"/>
+                    </td>
+                </tr>
+                <tr>
+                    <th style="text-align: right;">
+                        <h:outputLabel for="email" value="Email:"/>
+                    </th>
+                    <td>
+                        <h:inputText id="email" value="#{newMember.email}"/>
+                        <h:message for="email" errorClass="invalid"/>
+                    </td>
+                </tr>
+                <tr>
+                    <th style="text-align: right;">
+                        <h:outputLabel for="phoneNumber" value="Phone #:"/>
+                    </th>
+                    <td>
+                        <h:inputText id="phoneNumber" value="#{newMember.phoneNumber}"/>
+                        <h:message for="phoneNumber" errorClass="invalid"/>
+                    </td>
+                </tr>
+            </table>
+            <p>
+                <h:commandButton id="register" action="#{memberRegistration.register}" value="Register"/>
+                <h:outputText value=" Registered!" rendered="#{facesContext.postback and empty facesContext.messageList}" style="color: green;"/>
+            </p>
+        </h:form>
+        <h2>Members</h2>
+        <h:panelGroup rendered="#{empty members}">
+            <em>No registered members.</em>
+        </h:panelGroup>
+        <h:dataTable var="_member" value="#{members}" rendered="#{not empty members}">
+            <h:column>
+                <f:facet name="header">Id</f:facet>
+                #{_member.id}
+            </h:column>
+            <h:column>
+                <f:facet name="header">Name</f:facet>
+                #{_member.name}
+            </h:column>
+            <h:column>
+                <f:facet name="header">Email</f:facet>
+                #{_member.email}
+            </h:column>
+            <h:column>
+                <f:facet name="header">Phone #</f:facet>
+                #{_member.phoneNumber}
+            </h:column>
+            <h:column>
+                <f:facet name="header">REST URL</f:facet>
+                <a href="#{request.contextPath}/rest/members/#{_member.id}">/rest/members/#{_member.id}</a>
+            </h:column>
+            <f:facet name="footer">
+                REST URL for all members: <a href="#{request.contextPath}/rest/members">/rest/members</a>
+            </f:facet>
+        </h:dataTable>
+    </ui:define>
+</ui:composition>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/css/screen.css
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/css/screen.css	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/css/screen.css	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,40 @@
+body {
+    margin: 0;
+    padding: 0;
+    background-color: #EAECEE;
+    font-family: Verdana, sans-serif;
+    font-size: 0.9em;
+}
+#container {
+    margin: 0 auto;
+    padding: 0 20px 10px 20px;
+    border: 1px solid #666666;
+    width: 865px; /* subtract 40px from banner width for padding */
+    background: #FFFFFF url(#{request.contextPath}/resources/gfx/banner.png) no-repeat;
+    padding-top: 110px;
+}
+#sidebar {
+    font-size: 0.9em;
+    width: 225px;
+    float: right;
+    border: 1px solid #666666;
+    background: #EAECEE;
+    padding: 0 15px 5px 15px;
+}
+#sidebar ul {
+    padding-left: 30px;
+}
+#footer {
+    clear: both;
+    text-align: center;
+    color: #666666;
+    font-size: 0.85em;
+    padding: 3em 0 0 0;
+}
+code {
+    font-size: 1.1em;
+}
+span.invalid {
+    padding-left: 3px;
+    color: red;
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/gfx/banner.png
===================================================================
(Binary files differ)


Property changes on: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/gfx/banner.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/gfx/weld.png
===================================================================
(Binary files differ)


Property changes on: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/main/webapp/resources/gfx/weld.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/MavenArtifactResolver.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/MavenArtifactResolver.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/MavenArtifactResolver.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,84 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.test;
+
+import java.io.File;
+
+/**
+ * A temporary resolver that converts a Maven artifact reference into a {@link java.io.File} object.
+ * 
+ * <p>
+ * This approach is an interim solution for Maven projects until the open feature request to add formally add artifacts to a
+ * test (<a href="https://jira.jboss.org/browse/ARQ-66">ARQ-66</a>) is implementated.
+ * </p>
+ * 
+ * <p>
+ * The testCompile goal will resolve any test dependencies and put them in your local Maven repository. By the time the test
+ * executes, you can be sure that the JAR files you need will be in your local repository.
+ * </p>
+ * 
+ * <p>
+ * Example usage:
+ * </p>
+ * 
+ * <pre>
+ * WebArchive war = ShrinkWrap.create(&quot;test.war&quot;, WebArchive.class).addLibrary(
+ *         MavenArtifactResolver.resolve(&quot;commons-lang:commons-lang:2.5&quot;));
+ * </pre>
+ * 
+ * <p>
+ * If you are using an alternate local Maven repository, you need to pass it to the Maven surefire plugin using the following
+ * stanza in the plugin configuration element:
+ * </p>
+ * 
+ * <pre>
+ * &lt;systemProperties&gt;
+ *    &lt;property&gt;
+ *       &lt;name&gt;maven.repo.local&lt;/name&gt;
+ *       &lt;value&gt;${symbol_dollar}{maven.repo.local}&lt;/value&gt;
+ *    &lt;/property&gt;
+ * &lt;/systemProperties&gt;
+ * </pre>
+ * 
+ * <p>
+ * Another approach to pull in a library is to add packages recursively from the root library package.
+ * </p>
+ * 
+ * @author Dan Allen
+ */
+public class MavenArtifactResolver {
+    private static final String LOCAL_MAVEN_REPO = System.getProperty("maven.repo.local") != null ? System
+            .getProperty("maven.repo.local") : (System.getProperty("user.home") + File.separatorChar + ".m2"
+            + File.separatorChar + "repository");
+
+    public static File resolve(final String groupId, final String artifactId, final String version) {
+        return resolve(groupId, artifactId, version, null);
+    }
+
+    public static File resolve(final String groupId, final String artifactId, final String version, final String classifier) {
+        return new File(LOCAL_MAVEN_REPO + File.separatorChar + groupId.replace(".", File.separator) + File.separatorChar
+                + artifactId + File.separatorChar + version + File.separatorChar + artifactId + "-" + version
+                + (classifier != null ? ("-" + classifier) : "") + ".jar");
+    }
+
+    public static File resolve(final String qualifiedArtifactId) {
+        String[] segments = qualifiedArtifactId.split(":");
+        if (segments.length == 3) {
+            return resolve(segments[0], segments[1], segments[2]);
+        } else if (segments.length == 4) {
+            return resolve(segments[0], segments[1], segments[2], segments[3]);
+        }
+        throw new IllegalArgumentException("Invalid format for qualified artifactId: " + qualifiedArtifactId);
+    }
+
+    public static File[] resolveAll(final String... qualifiedArtifactIds) {
+        int n = qualifiedArtifactIds.length;
+        File[] artifacts = new File[n];
+        for (int i = 0; i < n; i++) {
+            artifacts[i] = resolve(qualifiedArtifactIds[i]);
+        }
+
+        return artifacts;
+    }
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/MemberRegistrationTest.java
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/MemberRegistrationTest.java	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/java/test/MemberRegistrationTest.java	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,59 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+package ${package}.test;
+
+import static org.junit.Assert.*;
+
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.inject.Inject;
+
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.logging.Logger;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import ${package}.controller.MemberRegistration;
+import ${package}.data.MemberRepository;
+import ${package}.data.MemberRepositoryProducer;
+import ${package}.model.Member;
+
+ at RunWith(Arquillian.class)
+public class MemberRegistrationTest {
+    @Deployment
+    public static Archive<?> createTestArchive() {
+        return ShrinkWrap.create(WebArchive.class, "test.war")
+                .addClasses(Member.class, MemberRegistration.class, MemberRepository.class, MemberRepositoryProducer.class)
+                // addAsManifestResource is incorrectly targeting /META-INF
+                .addAsResource("test-persistence.xml", "META-INF/persistence.xml")
+                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
+    }
+
+    @Inject
+    MemberRegistration memberRegistration;
+
+    @Inject
+    Logger log;
+
+    @Test
+    public void testRegister() throws Exception {
+        Member newMember = memberRegistration.getNewMember();
+        newMember.setName("Jane Doe");
+        newMember.setEmail("jane at mailinator.com");
+        newMember.setPhoneNumber("2125551234");
+        memberRegistration.register();
+        assertNotNull(newMember.getId());
+        log.info(newMember.getName() + " was persisted with id " + newMember.getId());
+    }
+
+    @Produces
+    public Logger produceLog(InjectionPoint injectionPoint) {
+        return Logger.getLogger(injectionPoint.getMember().getDeclaringClass());
+    }
+}

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources/arquillian.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources/arquillian.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources/arquillian.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns="http://jboss.com/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="
+        http://jboss.org/schema/arquillian
+        http://jboss.org/schema/arquillian/arquillian-1.0.xsd">
+
+   <!-- Uncomment to have test archives exported to the file system for inspection -->
+   <!--
+   <engine>
+       <property name="deploymentExportPath">target/</property>
+   </engine>
+   -->
+
+   <!-- Example configuration for a remote JBoss AS instance -->
+   <container qualifier="jbossas-remote" default="true">
+       <property name="httpPort">8080</property>
+   </container>
+   
+   <!-- Required configuration for an embedded GlassFish instance -->
+   <container qualifier="glassfish-embedded">
+       <property name="bindHttpPort">7070</property>
+       <property name="sunResourcesXml">src/test/resources-glassfish-embedded/sun-resources.xml</property>
+   </container>
+
+</arquillian>
\ No newline at end of file

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/sun-resources.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/sun-resources.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/sun-resources.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE resources PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Resource Definitions //EN"
+    "http://www.sun.com/software/appserver/dtds/sun-resources_1_4.dtd">
+<resources>
+    <jdbc-resource pool-name="ArquillianEmbeddedDerbyPool"
+        jndi-name="jdbc/arquillian"/>
+    <jdbc-connection-pool name="ArquillianEmbeddedDerbyPool"
+        res-type="javax.sql.DataSource"
+        datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource"
+        is-isolation-level-guaranteed="false">
+        <property name="databaseName" value="target/databases/derby"/>
+        <property name="createDatabase" value="create"/>
+    </jdbc-connection-pool>
+</resources>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/test-persistence.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/test-persistence.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-glassfish-embedded/test-persistence.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.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_2_0.xsd">
+    <persistence-unit name="primary">
+        <jta-data-source>jdbc/arquillian</jta-data-source>
+        <properties>
+            <!-- Properties for EclipseLink (default provider for GlassFish) -->
+            <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
+            <property name="eclipselink.logging.level" value="FINE"/>
+        </properties>
+    </persistence-unit>
+</persistence>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-jbossas/test-persistence.xml
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-jbossas/test-persistence.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/main/resources/archetype-resources/src/test/resources-jbossas/test-persistence.xml	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.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_2_0.xsd">
+    <persistence-unit name="primary">
+        <jta-data-source>java:/DefaultDS</jta-data-source>
+        <properties>
+            <!-- Properties for Hibernate (default provider for JBoss AS) -->
+            <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+            <property name="hibernate.show_sql" value="true" />
+            <property name="hibernate.format_sql" value="false" />
+        </properties>
+    </persistence-unit>
+</persistence>

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/projects/basic/archetype.properties
===================================================================
--- archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/projects/basic/archetype.properties	                        (rev 0)
+++ archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/projects/basic/archetype.properties	2011-03-31 23:08:54 UTC (rev 7221)
@@ -0,0 +1,5 @@
+#Thu Mar 31 19:06:49 EDT 2011
+version=0.1-SNAPSHOT
+name=Java EE 6 webapp project
+groupId=archetype.it
+artifactId=basic

Added: archetypes/javaee6-webapp/tags/1.0.1.CR1/src/test/resources/projects/basic/goal.txt
===================================================================


More information about the weld-commits mailing list