[weld-commits] Weld SVN: r6668 - archetypes/javaee6-webapp/trunk.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Fri Jul 16 19:06:50 EDT 2010


Author: dan.j.allen
Date: 2010-07-16 19:06:49 -0400 (Fri, 16 Jul 2010)
New Revision: 6668

Modified:
   archetypes/javaee6-webapp/trunk/pom.xml
   archetypes/javaee6-webapp/trunk/readme.txt
Log:
add slf4j api and impl
notes about arquillian profiles
more information about deploying app
more information about importing app into IDE


Modified: archetypes/javaee6-webapp/trunk/pom.xml
===================================================================
--- archetypes/javaee6-webapp/trunk/pom.xml	2010-07-16 23:05:45 UTC (rev 6667)
+++ archetypes/javaee6-webapp/trunk/pom.xml	2010-07-16 23:06:49 UTC (rev 6668)
@@ -86,14 +86,22 @@
       </dependency>
 
       <!-- Need to use the injectable logger in Weld Extensions -->
-      <!-- Both JBoss AS and GlassFish provide this API -->
+      <!-- Switch scope to provided if server provides slf4j; JBoss AS provides it; GlassFish provides it if you have the Hibernate JPA provider installed -->
       <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
          <version>1.5.10</version>
-         <scope>provided</scope>
+         <scope>compile</scope>
       </dependency>
 
+      <!-- Remove if server provides slf4j; JBoss AS provides it; GlassFish provides it if you have the Hibernate JPA provider installed -->
+      <dependency>
+         <groupId>org.slf4j</groupId>
+         <artifactId>slf4j-simple</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 -->
@@ -141,6 +149,12 @@
                   <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>
@@ -172,14 +186,14 @@
 
    <profiles>
       <profile>
-         <!-- The default profile skips all tests, though you can tune it to run just unit tests -->
-         <!-- Seperate profiles are provided for running all tests, including Arquillian tests, which execute in the specified container -->
+         <!-- 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 Specification POM -->
+            <!-- Java EE 6 Specification POM -->
             <!-- This one dependency imports all APIs available for a Java EE 6.0 application -->
             <dependency>
                <groupId>org.jboss.spec</groupId>
@@ -220,7 +234,7 @@
       </profile>
 
       <profile>
-         <!-- An Arquillian testing profile that executes tests in GlassFish Embedded -->
+         <!-- An optional Arquillian testing profile that executes tests in GlassFish Embedded -->
          <!-- Run with 'mvn test -Pglassfish-embedded-3' -->
          <id>glassfish-embedded-3</id>
          <dependencies>
@@ -269,7 +283,7 @@
          </build>
       </profile>
       <profile>
-         <!-- An Arquillian testing profile that executes tests in a remote JBoss AS instance -->
+         <!-- An optional Arquillian testing profile that executes tests in a remote JBoss AS instance -->
          <!-- Run with 'mvn test -Pjbossas-remote-6' -->
          <id>jbossas-remote-6</id>
          <dependencies>
@@ -279,7 +293,7 @@
                <version>${arquillian.version}</version>
                <scope>test</scope>
             </dependency>
-            <!-- Java EE Specification POM -->
+            <!-- Java EE 6 Specification POM -->
             <!-- This one dependency imports all APIs available for a Java EE 6.0 application -->
             <dependency>
                <groupId>org.jboss.spec</groupId>

Modified: archetypes/javaee6-webapp/trunk/readme.txt
===================================================================
--- archetypes/javaee6-webapp/trunk/readme.txt	2010-07-16 23:05:45 UTC (rev 6667)
+++ archetypes/javaee6-webapp/trunk/readme.txt	2010-07-16 23:06:49 UTC (rev 6668)
@@ -9,10 +9,10 @@
  This is your project! It's a sample, deployable Maven 2 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 and JPA 2.0) that can run on a certified application server (Complete
- 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. 
+ EJB 3.1, JPA 2.0 and Bean Validation 1.0) that can run on a certified
+ application server (Complete 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
  ===================
@@ -30,9 +30,13 @@
  Deploying the application
  =========================
 
- To deploy the application to JBoss AS (standalone), first make sure that the
- JBOSS_HOME environment variable points to a JBoss AS 6.0 installation.
+ To deploy the application, first produce the archive to deploy:
 
+  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.0 installation.
+
  Alternatively, you can set the location of JBoss AS using the following
  profile defintion in the .m2/settings.xml file in your home directory:
 
@@ -62,7 +66,8 @@
   mvn package jboss:hard-deploy
 
  This will deploy two artifacts, target/jboss-javaee6-webapp-src.war and
- default-ds.xml. The latter installs a data source named jdbc/__default.
+ default-ds.xml. The latter installs a data source named jdbc/__default,
+ so both JBoss AS and GlassFish have a data source with the same name.
 
  You can also set jboss.home on the commandline:
 
@@ -80,26 +85,28 @@
 
   mvn jboss:hard-undeploy
 
- If you want to deploy to GlassFish, first produce the archive to deploy:
-
-  mvn package
- 
  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.
+ deploys the application. NetBeans then provides incremental deployment of web
+ resources.
 
  You can also start GlassFish from the commandline. Change to the glassfish/bin
- directory in the GlassFish install root and run these three commands:
+ directory in the GlassFish install root and run these three commands (leading
+ ./ not required on Windows):
 
-  asadmin start-database
-  asadmin start-domain domain1
+  ./asadmin start-database
+  ./asadmin start-domain domain1
 
  Now you can either deploy the target/jboss-javaee6-webapp-src.war through the
  web-based GlassFish admininstration console, or you can again use asadmin:
 
-  asadmin /path/to/project/target/jboss-javaee6-webapp-src.war
+  ./asadmin deploy /path/to/project/target/jboss-javaee6-webapp-src.war
 
+ To undeploy the application, run:
+
+ ./asadmin undeploy jboss-javaee6-webapp-src
+
  Running the Arquillian tests
  ============================
 
@@ -139,15 +146,22 @@
 
  To import into Eclipse, you first need to install the m2eclipse plugin. To get
  started, add the m2eclipse update site (http://m2eclipse.sonatype.org/update/)
- to Eclipse and install the m2eclipse plugin and required dependencies. Once
- that is installed, you'll be ready to import the project into Eclipse.
+ to Eclipse (or use the Help > Eclipse Marketplace...) and install the
+ m2eclipse plugin and required dependencies. Once that's installed, you'll be
+ ready to import the project into Eclipse.
 
- Select File > Import... and select "Import... > Maven Projects" and select
- your project directory. m2eclipse should take it from there.
+ Select File > Import... and select "Existing Maven Projects" and navigate to
+ your project directory. Click Finish and m2eclipse will take it from there.
 
  Once in the IDE, you can execute the Maven commands through the IDE controls
  to deploy the application to a container.
 
+ NOTE: If the project shows a compile error after import, it's likely that the
+ generated sources are not on the Eclipse project classpath. Right click the
+ project and select:
+
+ Maven > Update Project Configuration
+
  Downloading the sources and Javadocs
  ====================================
 



More information about the weld-commits mailing list