[weld-commits] Weld SVN: r7184 - in archetypes/javaee6-webapp/trunk: eclipse-dot-files and 5 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Jan 19 17:32:00 EST 2011


Author: dan.j.allen
Date: 2011-01-19 17:31:59 -0500 (Wed, 19 Jan 2011)
New Revision: 7184

Added:
   archetypes/javaee6-webapp/trunk/archetype-excludes.txt
   archetypes/javaee6-webapp/trunk/create-archetype.sh
   archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/application-ds.xml
Removed:
   archetypes/javaee6-webapp/trunk/build.sh
   archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/default-ds.xml
Modified:
   archetypes/javaee6-webapp/trunk/archetype-pom.xml
   archetypes/javaee6-webapp/trunk/archetype.properties
   archetypes/javaee6-webapp/trunk/eclipse-dot-files/.factorypath
   archetypes/javaee6-webapp/trunk/pom.xml
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/controller/MemberRegistration.java
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/data/MemberListProducer.java
   archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/data/SeedDataImporter.java
   archetypes/javaee6-webapp/trunk/src/main/webapp/WEB-INF/templates/default.xhtml
   archetypes/javaee6-webapp/trunk/src/test/java/com/mycompany/test/MavenArtifactResolver.java
   archetypes/javaee6-webapp/trunk/src/test/java/com/mycompany/test/MemberRegistrationTest.java
Log:
migrate to Seam Solder; build improvements

- rename build script to create-archetype.sh
- use an excludes file when copying archetype sources
- upgrade to JBoss AS 6.0.0.Final and related artifacts
- upgrade Hibernate JPA model gen; remove unnecessary Maven plugin config


Added: archetypes/javaee6-webapp/trunk/archetype-excludes.txt
===================================================================
--- archetypes/javaee6-webapp/trunk/archetype-excludes.txt	                        (rev 0)
+++ archetypes/javaee6-webapp/trunk/archetype-excludes.txt	2011-01-19 22:31:59 UTC (rev 7184)
@@ -0,0 +1,11 @@
+*.swp
+.classpath
+.git
+.gitignore
+.project
+.settings
+.svn
+archetype-pom.xml
+archetype-excludes.txt
+WORKLOG
+eclipse-dot-files

Modified: archetypes/javaee6-webapp/trunk/archetype-pom.xml
===================================================================
--- archetypes/javaee6-webapp/trunk/archetype-pom.xml	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/archetype-pom.xml	2011-01-19 22:31:59 UTC (rev 7184)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.jboss.weld</groupId>
     <artifactId>weld-parent</artifactId>
-    <version>12</version>
+    <version>17</version>
   </parent>
 
   <groupId>org.jboss.weld.archetypes</groupId>

Modified: archetypes/javaee6-webapp/trunk/archetype.properties
===================================================================
--- archetypes/javaee6-webapp/trunk/archetype.properties	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/archetype.properties	2011-01-19 22:31:59 UTC (rev 7184)
@@ -4,6 +4,6 @@
 # Java package of the source files; will be replaced with the ${package} expression
 archetype.package=com.mycompany
 archetype.languages=java
-# value of <artifactId> is converted to ${artifactId} expression in filtered files
+# value of <artifactId> element in POM is converted to ${artifactId} expression in filtered files
 archetype.filteredExtensions=java,txt,html
 name=Java EE 6 webapp project

Deleted: archetypes/javaee6-webapp/trunk/build.sh
===================================================================
--- archetypes/javaee6-webapp/trunk/build.sh	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/build.sh	2011-01-19 22:31:59 UTC (rev 7184)
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-# This script generates an archetype into target/archetype from the source project.
-#
-# Two optional commands can be provided (in the order listed):
-#
-# install - which will automatically install the generated archetype in the local repository
-# generate - generate a project from the archetype into target/generated-project
-#
-
-ARCHETYPE_BUILD_DIR=target/generated-sources/archetype
-ARCHETYPE_DIR=target/archetype
-ARCHETYPE_RESOURCES_DIR=$ARCHETYPE_DIR/src/main/resources/archetype-resources
-
-echo Generating archetype from project into $ARCHETYPE_BUILD_DIR...
-txt2html -pb 1 -p 2 readme.txt > readme.html
-mvn clean archetype:create-from-project -Darchetype.properties=archetype.properties
-echo Relocating generated archetype project to $ARCHETYPE_DIR...
-rsync -az --exclude `basename $0` --exclude archetype-pom.xml --exclude eclipse-dot-files $ARCHETYPE_BUILD_DIR/src $ARCHETYPE_DIR/
-rsync -az --exclude .svn eclipse-dot-files/ $ARCHETYPE_RESOURCES_DIR/
-cp -f archetype-pom.xml $ARCHETYPE_DIR/pom.xml
-mvn -f $ARCHETYPE_DIR/pom.xml clean
-echo Patching generated archetype...
-# could also use col -b
-sed -i 's;
-;;' $ARCHETYPE_RESOURCES_DIR/pom.xml
-sed -i 's;
-;;' $ARCHETYPE_RESOURCES_DIR/readme.txt
-sed -i 's;<name>jboss-javaee6-webapp-src</name>;<name>${name}</name>;' $ARCHETYPE_RESOURCES_DIR/pom.xml
-sed -i 's;eclipse-dot-files/\?;;' $ARCHETYPE_DIR/src/main/resources/META-INF/maven/archetype-metadata.xml
-# remove local file that NetBeans add to source project
-rm -f $ARCHETYPE_RESOURCES_DIR/src/main/webapp/WEB-INF/sun-web.xml
-rm -f readme.html
-# could set the release version at this point, if specified
-if [ ! -z $1 ] && [ "$1" = "install" ]; then
-   echo Installing archetype...
-   shift
-   mvn -f $ARCHETYPE_DIR/pom.xml install
-fi
-
-if [ ! -z $1 ] && [ "$1" = "generate" ]; then
-   echo Generating project from archetype...
-   cd target
-   mvn archetype:generate -B -DarchetypeCatalog=local \
-      -DarchetypeArtifactId=jboss-javaee6-webapp -DarchetypeGroupId=org.jboss.weld.archetypes -DarchetypeVersion=1.0.1-SNAPSHOT \
-      -DartifactId=generated-project -DgroupId=com.acme -Dversion=1.0.0-SNAPSHOT -Dname="Java EE 6 webapp project"
-fi

Copied: archetypes/javaee6-webapp/trunk/create-archetype.sh (from rev 7090, archetypes/javaee6-webapp/trunk/build.sh)
===================================================================
--- archetypes/javaee6-webapp/trunk/create-archetype.sh	                        (rev 0)
+++ archetypes/javaee6-webapp/trunk/create-archetype.sh	2011-01-19 22:31:59 UTC (rev 7184)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# This script generates an archetype into target/archetype from the source project.
+#
+# Two optional commands can be provided (in the order listed):
+#
+# install - which will automatically install the generated archetype in the local repository
+# generate - generate a project from the archetype into target/generated-project
+#
+
+ARCHETYPE_BUILD_DIR=target/generated-sources/archetype
+ARCHETYPE_DIR=target/archetype
+ARCHETYPE_RESOURCES_DIR=$ARCHETYPE_DIR/src/main/resources/archetype-resources
+
+echo Generating archetype from project into $ARCHETYPE_BUILD_DIR...
+if [ ! -z `which txt2html` ]; then
+   txt2html -pb 1 -p 2 readme.txt > readme.html
+else
+   echo txt2html cannot be found, skipping generation of readme.html
+fi
+mvn clean archetype:create-from-project -Darchetype.properties=archetype.properties
+echo Relocating generated archetype project to $ARCHETYPE_DIR...
+rsync -az --exclude `basename $0` --exclude-from=archetype-excludes.txt $ARCHETYPE_BUILD_DIR/src $ARCHETYPE_DIR/
+cp -f archetype-pom.xml $ARCHETYPE_DIR/pom.xml
+mvn -f $ARCHETYPE_DIR/pom.xml clean
+echo Patching generated archetype...
+# could also use col -b
+sed -i 's;
+;;' $ARCHETYPE_RESOURCES_DIR/pom.xml
+sed -i 's;
+;;' $ARCHETYPE_RESOURCES_DIR/readme.txt
+sed -i 's;<name>jboss-javaee6-webapp-src</name>;<name>${name}</name>;' $ARCHETYPE_RESOURCES_DIR/pom.xml
+sed -i 's;eclipse-dot-files/\?;;' $ARCHETYPE_DIR/src/main/resources/META-INF/maven/archetype-metadata.xml
+#sed -i 's;\(<jndi-name>\)[^<]\+\(</jndi-name>\);\1jdbc/${artifactId}\2;' $ARCHETYPE_RESOURCES_DIR/src/main/resources-jbossas/application-ds.xml
+#sed -i 's;\(<jta-data-source>\)[^<]\+\(</jta-data-source>\);\1jdbc/${artifactId}\2;' $ARCHETYPE_RESOURCES_DIR/src/main/resources/META-INF/persistence.xml
+mv $ARCHETYPE_RESOURCES_DIR/src/main/resources-jbossas/application-ds.xml $ARCHETYPE_RESOURCES_DIR/src/main/resources-jbossas/__artifactId__-ds.xml
+rsync -az eclipse-dot-files/ $ARCHETYPE_RESOURCES_DIR/
+# fix the archetype plugin being an idiot
+find $ARCHETYPE_RESOURCES_DIR -type f -exec sed -i 's;packageInPathFormat;package;g' {} \;
+# remove local file that NetBeans add to source project
+rm -f $ARCHETYPE_RESOURCES_DIR/src/main/webapp/WEB-INF/sun-web.xml
+rm -f readme.html
+# could set the release version at this point, if specified
+if [ ! -z $1 ] && [ "$1" = "install" ]; then
+   echo Installing archetype...
+   shift
+   mvn -f $ARCHETYPE_DIR/pom.xml install
+fi
+
+if [ ! -z $1 ] && [ "$1" = "generate" ]; then
+   echo Generating project from archetype...
+   cd target
+   mvn archetype:generate -B -DarchetypeCatalog=local \
+      -DarchetypeArtifactId=jboss-javaee6-webapp -DarchetypeGroupId=org.jboss.weld.archetypes -DarchetypeVersion=1.0.1-SNAPSHOT \
+      -DartifactId=test-project -DgroupId=com.acme -Dpackage=com.acme.test -Dversion=1.0.0-SNAPSHOT -Dname="Java EE 6 webapp project"
+fi

Modified: archetypes/javaee6-webapp/trunk/eclipse-dot-files/.factorypath
===================================================================
--- archetypes/javaee6-webapp/trunk/eclipse-dot-files/.factorypath	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/eclipse-dot-files/.factorypath	2011-01-19 22:31:59 UTC (rev 7184)
@@ -1,5 +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.0.0.Final/hibernate-jpamodelgen-1.0.0.Final.jar" 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>

Modified: archetypes/javaee6-webapp/trunk/pom.xml
===================================================================
--- archetypes/javaee6-webapp/trunk/pom.xml	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/pom.xml	2011-01-19 22:31:59 UTC (rev 7184)
@@ -22,7 +22,7 @@
       <jboss.home>${env.JBOSS_HOME}</jboss.home>
       <jboss.domain>default</jboss.domain>
       <arquillian.version>1.0.0.Alpha4</arquillian.version>
-      <jboss-javaee6-spec.version>1.0.0.CR1</jboss-javaee6-spec.version>
+      <jboss-javaee6-spec.version>1.0.0.Final</jboss-javaee6-spec.version>
    </properties>
 
    <repositories>
@@ -32,14 +32,12 @@
       <repository>
          <id>jboss-public-repository</id>
          <name>JBoss Repository</name>
-         <url>https://repository.jboss.org/nexus/content/groups/public</url>
+         <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>
-            <enabled>true</enabled>
             <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
-            <enabled>true</enabled>
             <updatePolicy>daily</updatePolicy>
          </snapshots>
       </repository>
@@ -49,15 +47,13 @@
       <pluginRepository>
          <id>jboss-public-repository</id>
          <name>JBoss Repository</name>
-         <url>https://repository.jboss.org/nexus/content/groups/public</url>
+         <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>
-            <enabled>true</enabled>
             <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 -->
-            <enabled>true</enabled>
             <updatePolicy>daily</updatePolicy>
          </snapshots>
       </pluginRepository>
@@ -67,7 +63,7 @@
       <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-jpamodelgen</artifactId>
-         <version>1.0.0.Final</version>
+         <version>1.1.1.Final</version>
          <scope>provided</scope>
          <!-- Excluded because it's provided by the Java EE 6 dependencies -->
          <exclusions>
@@ -78,30 +74,23 @@
          </exclusions>
       </dependency>
 
-      <!-- Weld Extensions provides convenient, portable CDI extensions such as an injectable logger -->
+      <!-- Seam Solder provides convenient, portable CDI extensions such as an injectable logger -->
       <dependency>
-         <groupId>org.jboss.weld</groupId>
-         <artifactId>weld-extensions</artifactId>
-         <version>1.0.0.Alpha2</version>
+         <groupId>org.jboss.seam.solder</groupId>
+         <artifactId>seam-solder</artifactId>
+         <version>3.0.0.Beta1</version>
       </dependency>
 
-      <!-- Need to use the injectable logger in Weld Extensions -->
-      <!-- Switch scope to provided if server provides slf4j; JBoss AS provides it; GlassFish provides it if the Hibernate JPA provider is installed -->
+      <!-- Uncomment if deploying to JBoss AS (but not a requirement) -->
+      <!--
       <dependency>
-         <groupId>org.slf4j</groupId>
-         <artifactId>slf4j-api</artifactId>
-         <version>1.5.10</version>
-         <scope>compile</scope>
+         <groupId>org.jboss.logging</groupId>
+         <artifactId>jboss-logging</artifactId>
+         <version>3.0.0.Beta4</version>
+         <scope>provided</scope>
       </dependency>
+      -->
 
-      <!-- Remove if server provides slf4j; JBoss AS provides it; GlassFish provides it if the Hibernate JPA provider is installed -->
-      <dependency>
-         <groupId>org.slf4j</groupId>
-         <artifactId>slf4j-jdk14</artifactId>
-         <version>1.5.10</version>
-         <scope>runtime</scope>
-      </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 -->
@@ -133,7 +122,7 @@
    <build>
       <finalName>${project.artifactId}</finalName>
       <plugins>
-         <!-- Compiler plugin enforces Java 1.6 compatibility and controls execution of annotation processors -->
+         <!-- Compiler plugin enforces Java 1.6 compatibility and activates annotation processors -->
          <plugin>
             <artifactId>maven-compiler-plugin</artifactId>
             <version>2.3.1</version>
@@ -141,58 +130,7 @@
                <source>1.6</source>
                <target>1.6</target>
             </configuration>
-            <executions>
-               <execution>
-                  <id>annotation-processors-only</id>
-                  <phase>generate-sources</phase>
-                  <configuration>
-                     <compilerArgument>-proc:only</compilerArgument>
-                     <!-- If your app has multiple packages, use this include filter to execute the processor only on the package containing your entities -->
-                     <!--
-                     <includes>
-                        <include>**/model/*.java</include>
-                     </includes>
-                     -->
-                  </configuration>
-                  <goals>
-                     <goal>compile</goal>
-                  </goals>
-               </execution>
-               <execution>
-                  <!-- This execution gets Eclipse to include all classes in the build path -->
-                  <id>compile</id>
-                  <phase>compile</phase>
-                  <configuration>
-                     <compilerArgument>-proc:none</compilerArgument>
-                     <includes>
-                        <include>**/*.java</include>
-                     </includes>
-                  </configuration>
-                  <goals>
-                     <goal>compile</goal>
-                  </goals>
-               </execution>
-            </executions>
          </plugin>
-         <!-- Build helper plugin adds the sources generated by the JPA 2 annotation processor to the compile path -->
-         <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>build-helper-maven-plugin</artifactId>
-            <version>1.5</version>
-            <executions>
-               <execution>
-                  <phase>process-sources</phase>
-                  <configuration>
-                     <sources>
-                        <source>${project.build.directory}/generated-sources/annotations</source>
-                     </sources>
-                  </configuration>
-                  <goals>
-                     <goal>add-source</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
       </plugins>
    </build>
 
@@ -235,7 +173,7 @@
                      <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>
+                        <fileName>src/main/resources-jbossas/${project.artifactId}-ds.xml</fileName>
                         <!-- DataSource needs to go before the application -->
                         <fileName>${project.build.directory}/${project.build.finalName}.war</fileName>
                      </fileNames>
@@ -319,7 +257,7 @@
             <dependency>
                <groupId>org.jboss.jbossas</groupId>
                <artifactId>jboss-as-client</artifactId>
-               <version>6.0.0.20101110-CR1</version>
+               <version>6.0.0.Final</version>
                <type>pom</type>
                <scope>test</scope>
             </dependency>

Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/controller/MemberRegistration.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/controller/MemberRegistration.java	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/controller/MemberRegistration.java	2011-01-19 22:31:59 UTC (rev 7184)
@@ -1,5 +1,6 @@
 package com.mycompany.controller;
 
+import org.jboss.seam.solder.log.Category;
 import com.mycompany.data.MemberRepository;
 import com.mycompany.model.Member;
 import javax.annotation.PostConstruct;
@@ -10,8 +11,9 @@
 import javax.inject.Named;
 import javax.persistence.EntityManager;
 import javax.transaction.UserTransaction;
-import org.slf4j.Logger;
 
+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
@@ -19,7 +21,7 @@
 @Model
 public class MemberRegistration
 {
-   @Inject
+   @Inject @Category("jboss-javaee6-webapp-src")
    private Logger log;
 
    @Inject

Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/data/MemberListProducer.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/data/MemberListProducer.java	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/data/MemberListProducer.java	2011-01-19 22:31:59 UTC (rev 7184)
@@ -43,7 +43,7 @@
       CriteriaBuilder cb = em.getCriteriaBuilder();
       CriteriaQuery<Member> criteria = cb.createQuery(Member.class);
       Root<Member> member = criteria.from(Member.class);
-      // Uncomment if you would like to try out typesafe criteria queries, a new feature in JPA 2.0
+      // 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();

Modified: archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/data/SeedDataImporter.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/data/SeedDataImporter.java	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/src/main/java/com/mycompany/data/SeedDataImporter.java	2011-01-19 22:31:59 UTC (rev 7184)
@@ -1,5 +1,6 @@
 package com.mycompany.data;
 
+import org.jboss.seam.solder.log.Category;
 import com.mycompany.model.Member;
 import javax.annotation.PostConstruct;
 import javax.ejb.Singleton;
@@ -8,8 +9,9 @@
 import javax.persistence.EntityManager;
 import javax.persistence.TransactionRequiredException;
 import javax.transaction.UserTransaction;
-import org.slf4j.Logger;
 
+import org.jboss.logging.Logger;
+
 /**
  * Import seed data into the database on application startup using
  * a startup singleton EJB.
@@ -22,7 +24,7 @@
 @Singleton
 public class SeedDataImporter
 {
-   @Inject
+   @Inject @Category("jboss-javaee6-webapp-src")
    private Logger log;
    
    @Inject

Copied: archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/application-ds.xml (from rev 7011, archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/default-ds.xml)
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/application-ds.xml	                        (rev 0)
+++ archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/application-ds.xml	2011-01-19 22:31:59 UTC (rev 7184)
@@ -0,0 +1,15 @@
+<?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>
+   <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>

Deleted: archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/default-ds.xml
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/default-ds.xml	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/src/main/resources-jbossas/default-ds.xml	2011-01-19 22:31:59 UTC (rev 7184)
@@ -1,15 +0,0 @@
-<?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>
-   <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>

Modified: archetypes/javaee6-webapp/trunk/src/main/webapp/WEB-INF/templates/default.xhtml
===================================================================
--- archetypes/javaee6-webapp/trunk/src/main/webapp/WEB-INF/templates/default.xhtml	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/src/main/webapp/WEB-INF/templates/default.xhtml	2011-01-19 22:31:59 UTC (rev 7184)
@@ -14,25 +14,32 @@
             <div id="sidebar">
                <h3>Find out more</h3>
                <p>
-                  Explore JavaServer Faces.
+                  Learn about the Java EE 6 platform and the component model it provides.
                </p>
                <ul>
-                  <li><a href="http://www.javaserverfaces.org">JSF community site</a></li>
+                  <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>
                </ul>
                <p>
-                  Learn more about Java EE 6 and the extensions provided by Weld and Seam.
+                  Dive into Weld, the JSR-299 reference implementation, and discover portable extensions Seam 3 offers.
                </p>
                <ul>
-                  <li><a href="http://seamframework.org/Weld">Overview</a></li>
-                  <li><a href="http://seamframework.org">Project site</a></li>
-                  <li><a href="http://seamframework.org/Documentation/SeamDocumentation#H-WeldReferenceDocumentation">Documentation</a></li>
+                  <li><a href="http://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://jira.jboss.org/browse/WELDRAD">Issue tracker</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/Community/Contribute">contributing</a> it back to the
+                  consider <a href="http://seamframework.org/Seam3/GetInvolved">contributing</a> it back to the
                   community!
                </p>
             </div>
@@ -45,6 +52,9 @@
             <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">Tune
+               logging levels (JBoss AS)</a>
             </p>
          </div>
       </div>

Modified: archetypes/javaee6-webapp/trunk/src/test/java/com/mycompany/test/MavenArtifactResolver.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/test/java/com/mycompany/test/MavenArtifactResolver.java	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/src/test/java/com/mycompany/test/MavenArtifactResolver.java	2011-01-19 22:31:59 UTC (rev 7184)
@@ -77,7 +77,7 @@
       throw new IllegalArgumentException("Invalid format for qualified artifactId: " + qualifiedArtifactId);
    }
 
-   public static File[] resolve(final String... qualifiedArtifactIds)
+   public static File[] resolveAll(final String... qualifiedArtifactIds)
    {
       int n = qualifiedArtifactIds.length;
       File[] artifacts = new File[n];

Modified: archetypes/javaee6-webapp/trunk/src/test/java/com/mycompany/test/MemberRegistrationTest.java
===================================================================
--- archetypes/javaee6-webapp/trunk/src/test/java/com/mycompany/test/MemberRegistrationTest.java	2011-01-13 15:39:22 UTC (rev 7183)
+++ archetypes/javaee6-webapp/trunk/src/test/java/com/mycompany/test/MemberRegistrationTest.java	2011-01-19 22:31:59 UTC (rev 7184)
@@ -1,24 +1,26 @@
 package com.mycompany.test;
 
-import com.mycompany.controller.MemberRegistration;
-import com.mycompany.data.MemberRepository;
-import com.mycompany.data.MemberRepositoryProducer;
-import com.mycompany.model.Member;
+import static org.junit.Assert.*;
+
 import javax.enterprise.inject.Produces;
 import javax.enterprise.inject.spi.InjectionPoint;
-import static org.junit.Assert.*;
 import javax.inject.Inject;
+
 import org.jboss.arquillian.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.logging.Logger;
 import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
+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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
+import com.mycompany.controller.MemberRegistration;
+import com.mycompany.data.MemberRepository;
+import com.mycompany.data.MemberRepositoryProducer;
+import com.mycompany.model.Member;
+
 @RunWith(Arquillian.class)
 public class MemberRegistrationTest
 {
@@ -26,11 +28,6 @@
    public static Archive<?> createTestArchive() {
       return ShrinkWrap.create(WebArchive.class, "test.war")
          .addClasses(Member.class, MemberRegistration.class, MemberRepository.class, MemberRepositoryProducer.class)
-         // SLF4J libraries required only if not available on the container classpath
-//         .addLibraries(MavenArtifactResolver.resolve(
-//            "org.slf4j:slf4j-api:1.5.10",
-//            "org.slf4j:slf4j-jdk14:1.5.10"
-//         ))
          .addManifestResource("test-persistence.xml", "persistence.xml")
          .addWebResource(EmptyAsset.INSTANCE, "beans.xml");
    }
@@ -54,6 +51,6 @@
    @Produces
    public Logger produceLog(InjectionPoint injectionPoint)
    {
-      return LoggerFactory.getLogger(injectionPoint.getMember().getDeclaringClass());
+      return Logger.getLogger(injectionPoint.getMember().getDeclaringClass());
    }
 }



More information about the weld-commits mailing list