[weld-commits] Weld SVN: r4723 - in examples/trunk/jsf/permalink: src and 11 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Sat Nov 7 01:50:51 EST 2009


Author: dan.j.allen
Date: 2009-11-07 01:50:51 -0500 (Sat, 07 Nov 2009)
New Revision: 4723

Added:
   examples/trunk/jsf/permalink/src/log/
   examples/trunk/jsf/permalink/src/log/resources/
   examples/trunk/jsf/permalink/src/log/resources/log4j.xml
   examples/trunk/jsf/permalink/src/main/webapp-jetty/
   examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/
   examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/jetty-env.xml
   examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/override-web.xml
   examples/trunk/jsf/permalink/src/main/webapp-tomcat/
   examples/trunk/jsf/permalink/src/main/webapp-tomcat/META-INF/
   examples/trunk/jsf/permalink/src/main/webapp-tomcat/META-INF/context.xml
   examples/trunk/jsf/permalink/src/main/webapp-tomcat/WEB-INF/
   examples/trunk/jsf/permalink/src/main/webapp-tomcat/WEB-INF/web.xml
Removed:
   examples/trunk/jsf/permalink/src/main/resources/log4j.xml
   examples/trunk/jsf/permalink/src/main/webapp/META-INF/
   examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/jetty-env.xml
Modified:
   examples/trunk/jsf/permalink/pom.xml
   examples/trunk/jsf/permalink/readme.txt
   examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/web.xml
Log:
reorg to eliminate need for war:inplace
embedded Tomcat currently not working


Modified: examples/trunk/jsf/permalink/pom.xml
===================================================================
--- examples/trunk/jsf/permalink/pom.xml	2009-11-07 06:11:34 UTC (rev 4722)
+++ examples/trunk/jsf/permalink/pom.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -50,6 +50,7 @@
       <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>jsr250-api</artifactId>
+         <scope>provided</scope>
       </dependency>
 
       <dependency>
@@ -61,21 +62,10 @@
       <dependency>
          <groupId>javax.faces</groupId>
          <artifactId>jsf-api</artifactId>
+         <scope>provided</scope>
       </dependency>
 
       <dependency>
-         <groupId>javax.faces</groupId>
-         <artifactId>jsf-impl</artifactId>
-         <scope>runtime</scope>
-      </dependency>
-
-      <dependency>
-         <groupId>javax.servlet</groupId>
-         <artifactId>jstl</artifactId>
-         <scope>runtime</scope>
-      </dependency>
-
-      <dependency>
          <!-- needed for reference by maven-eclipse-plugin -->
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
@@ -85,69 +75,20 @@
       <dependency>
          <groupId>javax.transaction</groupId>
          <artifactId>jta</artifactId>
+         <scope>provided</scope>
       </dependency>
 
       <dependency>
          <groupId>javax.validation</groupId>
          <artifactId>validation-api</artifactId>
+         <scope>provided</scope>
       </dependency>
 
-      <dependency>
-         <groupId>log4j</groupId>
-         <artifactId>log4j</artifactId>
-         <scope>runtime</scope>
-      </dependency>
-
-      <dependency>
-         <groupId>org.hibernate</groupId>
-         <artifactId>hibernate-validator</artifactId>
-         <version>4.0.0.GA</version>
-         <scope>runtime</scope>
-         <exclusions>
-            <exclusion>
-               <groupId>javax.xml.bind</groupId>
-               <artifactId>jaxb-api</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>com.sun.xml.bind</groupId>
-               <artifactId>jaxb-impl</artifactId>
-            </exclusion>
-         </exclusions>
-      </dependency>
-
-      <dependency>
-         <groupId>org.slf4j</groupId>
-         <artifactId>slf4j-log4j12</artifactId>
-         <version>1.5.6</version>
-         <scope>runtime</scope>
-      </dependency>
-
-      <dependency>
-         <groupId>org.jboss.weld.servlet</groupId>
-         <artifactId>weld-servlet</artifactId>
-         <scope>runtime</scope>
-      </dependency>
-
-      <dependency>
-         <groupId>org.glassfish.web</groupId>
-         <artifactId>el-impl</artifactId>
-         <scope>runtime</scope>
-         <exclusions>
-            <exclusion>
-               <groupId>javax.el</groupId>
-               <artifactId>el-api</artifactId>
-            </exclusion>
-         </exclusions>
-      </dependency>
-
    </dependencies>
 
    <build>
       <defaultGoal>package</defaultGoal>
-	  <!--
       <finalName>${project.artifactId}</finalName>
-	  -->
-      <finalName>weld-permalink</finalName>
       <plugins>
 
          <plugin>
@@ -216,58 +157,19 @@
          </plugin>
 
          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>tomcat-maven-plugin</artifactId>
-            <configuration>
-               <path>/${project.build.finalName}</path>
-               <!-- uncomment to use server configuration override; see readme.txt for details -->
-               <!--<server>tomcatserver</server>-->
-               <url>http://localhost:${tomcat.http.port}/manager</url>
-               <port>${embedded-tomcat.http.port}</port> <!-- port for embedded Tomcat only (putting this configuration in the execution for the run goal doesn't work) -->
-               <!-- if you don't want to use war:inplace, uncomment this setting -->
-               <!--
-               <warSourceDirectory>${project.build.directory}/${project.build.finalName}</warSourceDirectory>
-               -->
-            </configuration>
-         </plugin>
-
-         <plugin>
-            <groupId>org.mortbay.jetty</groupId>
-            <artifactId>maven-jetty-plugin</artifactId>
-            <configuration>
-               <connectors>
-                  <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
-                     <port>${jetty.http.port}</port>
-                     <maxIdleTime>3600000</maxIdleTime>
-                  </connector>
-               </connectors>
-               <daemon>${jetty.daemon}</daemon>
-               <stopPort>${jetty.stop.port}</stopPort>
-               <stopKey>HASTA_LA_VISTA</stopKey>
-               <scanIntervalSeconds>10</scanIntervalSeconds>
-               <webAppConfig>
-                  <contextPath>/${project.build.finalName}</contextPath>
-               </webAppConfig>
-               <!-- if you don't want to use war:inplace, uncomment this setting -->
-               <!--
-               <webAppSourceDirectory>${project.build.directory}/${project.build.finalName}</webAppSourceDirectory>
-               -->
-            </configuration>
-         </plugin>
-
-         <plugin>
             <groupId>org.twdata.maven</groupId>
             <artifactId>maven-cli-plugin</artifactId>
             <configuration>
                <prompt>${project.artifactId}</prompt>
                <!-- userAliases are for cli:execute-phase -->
                <userAliases>
-                  <runjetty>compile org.apache.maven.plugins:maven-war-plugin:inplace org.mortbay.jetty:maven-jetty-plugin:run</runjetty>
+                  <runjetty>compile org.mortbay.jetty:maven-jetty-plugin:run</runjetty>
                   <stopjetty>org.mortbay.jetty:maven-jetty-plugin:stop</stopjetty>
                   <runtomcat>compile org.apache.maven.plugins:maven-war-plugin:inplace org.codehaus.mojo:tomcat-maven-plugin:run</runtomcat>
-                  <explode>compile org.apache.maven.plugins:maven-war-plugin:inplace -o</explode>
+                  <explode>compile -o</explode>
+                  <!-- tomcat requires use of war:inplace -->
+                  <tcexplode>compile org.apache.maven.plugins:maven-war-plugin:inplace -o</tcexplode>
                   <restart>org.apache.maven.plugins:maven-antrun-plugin:run -Prestart-embedded</restart>
-                  <!--<restart>validate -Prestart-embedded -o</restart>-->
                   <profiles>org.apache.maven.plugins:maven-help-plugin:active-profiles -o</profiles>
                   <pom>org.apache.maven.plugins:maven-help-plugin:effective-pom -o</pom>
                </userAliases>
@@ -282,6 +184,248 @@
 
    <profiles>
       <profile>
+         <id>tomcat</id>
+
+         <dependencies>
+
+            <dependency>
+               <groupId>javax.annotation</groupId>
+               <artifactId>jsr250-api</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-impl</artifactId>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.servlet</groupId>
+               <artifactId>jstl</artifactId>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.transaction</groupId>
+               <artifactId>jta</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.validation</groupId>
+               <artifactId>validation-api</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>log4j</groupId>
+               <artifactId>log4j</artifactId>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>org.hibernate</groupId>
+               <artifactId>hibernate-validator</artifactId>
+               <version>4.0.0.GA</version>
+               <scope>runtime</scope>
+               <exclusions>
+                  <exclusion>
+                     <groupId>javax.xml.bind</groupId>
+                     <artifactId>jaxb-api</artifactId>
+                  </exclusion>
+                  <exclusion>
+                     <groupId>com.sun.xml.bind</groupId>
+                     <artifactId>jaxb-impl</artifactId>
+                  </exclusion>
+               </exclusions>
+            </dependency>
+
+            <dependency>
+               <groupId>org.slf4j</groupId>
+               <artifactId>slf4j-log4j12</artifactId>
+               <version>1.5.6</version>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>org.jboss.weld.servlet</groupId>
+               <artifactId>weld-servlet</artifactId>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>org.glassfish.web</groupId>
+               <artifactId>el-impl</artifactId>
+               <scope>runtime</scope>
+               <exclusions>
+                  <exclusion>
+                     <groupId>javax.el</groupId>
+                     <artifactId>el-api</artifactId>
+                  </exclusion>
+               </exclusions>
+            </dependency>
+
+         </dependencies>
+
+         <build>
+            <resources>
+               <resource>
+                  <directory>src/log/resources</directory>
+               </resource>
+            </resources>
+            <plugins>
+
+               <plugin>
+                  <groupId>org.apache.maven.plugins</groupId>
+                  <artifactId>maven-war-plugin</artifactId>
+                  <configuration>
+                     <webResources>
+                        <resource>
+                           <directory>src/main/webapp-tomcat</directory>
+                           <filtering>false</filtering>
+                        </resource>
+                     </webResources>
+                  </configuration>
+               </plugin>
+
+               <plugin>
+                  <groupId>org.codehaus.mojo</groupId>
+                  <artifactId>tomcat-maven-plugin</artifactId>
+                  <configuration>
+                     <path>/${project.build.finalName}</path>
+                     <!-- uncomment to use server configuration override; see readme.txt for details -->
+                     <!--<server>tomcatserver</server>-->
+                     <url>http://localhost:${tomcat.http.port}/manager</url>
+                     <port>${embedded-tomcat.http.port}</port> <!-- port for embedded Tomcat only (putting this configuration in the execution for the run goal doesn't work) -->
+                     <!-- this isn't useful to us because we also need an web.xml override -->
+                     <!--
+                     <contextFile>src/main/webapp-tomcat/META-INF/context.xml</contextFile>
+                     -->
+                  </configuration>
+               </plugin>
+
+            </plugins>
+         </build>
+
+      </profile>
+
+      <profile>
+         <id>jetty</id>
+
+         <dependencies>
+            <!-- (same dependencies as tomcat except for javax.servlet:jstl) -->
+
+            <dependency>
+               <groupId>javax.annotation</groupId>
+               <artifactId>jsr250-api</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-api</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.faces</groupId>
+               <artifactId>jsf-impl</artifactId>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.transaction</groupId>
+               <artifactId>jta</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>javax.validation</groupId>
+               <artifactId>validation-api</artifactId>
+            </dependency>
+
+            <dependency>
+               <groupId>log4j</groupId>
+               <artifactId>log4j</artifactId>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>org.hibernate</groupId>
+               <artifactId>hibernate-validator</artifactId>
+               <version>4.0.0.GA</version>
+               <scope>runtime</scope>
+               <exclusions>
+                  <exclusion>
+                     <groupId>javax.xml.bind</groupId>
+                     <artifactId>jaxb-api</artifactId>
+                  </exclusion>
+                  <exclusion>
+                     <groupId>com.sun.xml.bind</groupId>
+                     <artifactId>jaxb-impl</artifactId>
+                  </exclusion>
+               </exclusions>
+            </dependency>
+
+            <dependency>
+               <groupId>org.slf4j</groupId>
+               <artifactId>slf4j-log4j12</artifactId>
+               <version>1.5.6</version>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>org.jboss.weld.servlet</groupId>
+               <artifactId>weld-servlet</artifactId>
+               <scope>runtime</scope>
+            </dependency>
+
+            <dependency>
+               <groupId>org.glassfish.web</groupId>
+               <artifactId>el-impl</artifactId>
+               <scope>runtime</scope>
+               <exclusions>
+                  <exclusion>
+                     <groupId>javax.el</groupId>
+                     <artifactId>el-api</artifactId>
+                  </exclusion>
+               </exclusions>
+            </dependency>
+
+         </dependencies>
+
+         <build>
+            <resources>
+               <resource>
+                  <directory>src/log/resources</directory>
+               </resource>
+            </resources>
+            <plugins>
+               <plugin>
+                  <groupId>org.mortbay.jetty</groupId>
+                  <artifactId>maven-jetty-plugin</artifactId>
+                  <configuration>
+                     <connectors>
+                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+                           <port>${jetty.http.port}</port>
+                           <maxIdleTime>3600000</maxIdleTime>
+                        </connector>
+                     </connectors>
+                     <daemon>${jetty.daemon}</daemon>
+                     <stopPort>${jetty.stop.port}</stopPort>
+                     <stopKey>HASTA_LA_VISTA</stopKey>
+                     <scanIntervalSeconds>10</scanIntervalSeconds>
+                     <contextPath>/${project.build.finalName}</contextPath>
+                     <overrideWebXml>src/main/webapp-jetty/WEB-INF/override-web.xml</overrideWebXml>
+                     <jettyEnvXml>src/main/webapp-jetty/WEB-INF/jetty-env.xml</jettyEnvXml>
+                  </configuration>
+               </plugin>
+            </plugins>
+         </build>
+
+      </profile>
+
+      <profile>
          <id>restart-embedded</id>
          <build>
             <plugins>

Modified: examples/trunk/jsf/permalink/readme.txt
===================================================================
--- examples/trunk/jsf/permalink/readme.txt	2009-11-07 06:11:34 UTC (rev 4722)
+++ examples/trunk/jsf/permalink/readme.txt	2009-11-07 06:50:51 UTC (rev 4723)
@@ -19,26 +19,30 @@
 
 Run this command to execute the application in an embedded Jetty 6 container:
 
- mvn war:inplace jetty:run
+ mvn jetty:run -Pjetty
 
 You can also execute the application in an embedded Tomcat 6 container:
 
- mvn war:inplace tomcat:run
+ mvn war:inplace tomcat:run -Ptomcat
 
 In both cases, any changes to assets in src/main/webapp take effect immediately.
 If a change to a webapp configuration file is made, the application may
 automatically redeploy. The redeploy behavior can be fine-tuned in the plugin
 configuration (at least for Jetty). If you make a change to a classpath
-resource, you need to execute a build:
+resource, you need to execute a build. For Jetty:
 
- mvn compile war:inplace
+ mvn compile
 
-Note that war:inplace copies the compiled classes and JARs inside WebContent,
-under WEB-INF/classes and WEB-INF/lib, respectively, mixing source and compiled
-files. However, the build does work around these temporary files by excluding
-them from the packaged WAR and cleaning them during the Maven clean phase.
-These folders are also ignored by SVN.
+and for Tomcat:
 
+ mvn compile war:inplace -Ptomcat
+
+Note that war:inplace copies the compiled classes and JARs inside
+src/main/webapp, under WEB-INF/classes and WEB-INF/lib, respectively, mixing
+source and compiled files. However, the build does work around these temporary
+files by excluding them from the packaged WAR and cleaning them during the Maven
+clean phase.  These folders are also ignored by SVN.
+
 == Deploying to standalone Tomcat
 
 If you want to run the application on a standalone Tomcat 6, first download and
@@ -56,7 +60,7 @@
 
 You can deploy the packaged archive to Tomcat via HTTP PUT using this command:
 
- mvn package tomcat:deploy
+ mvn package tomcat:deploy -Ptomcat
 
 Then you use this command to undeploy the application:
 
@@ -65,7 +69,7 @@
 Instead of packaging the WAR, you can deploy it as an exploded archive
 immediately after the war goal is finished assembling the exploded structure:
 
- mvn compile war:exploded tomcat:exploded
+ mvn compile war:exploded tomcat:exploded -Ptomcat
 
 Once the application is deployed, you can redeploy it using the following command:
 
@@ -73,9 +77,9 @@
 
 But likely you want to run one or more build goals first before you redeploy:
 
- mvn compile tomcat:redeploy
- mvn war:exploded tomcat:redeploy
- mvn compile war:exploded tomcat:redeploy
+ mvn compile tomcat:redeploy -Ptomcat
+ mvn war:exploded tomcat:redeploy -Ptomcat
+ mvn compile war:exploded tomcat:redeploy -Ptomcat
 
 = Importing the project into Eclipse
 

Copied: examples/trunk/jsf/permalink/src/log/resources/log4j.xml (from rev 4634, examples/trunk/jsf/permalink/src/main/resources/log4j.xml)
===================================================================
--- examples/trunk/jsf/permalink/src/log/resources/log4j.xml	                        (rev 0)
+++ examples/trunk/jsf/permalink/src/log/resources/log4j.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <param name="Target" value="System.out"/>
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{2}] %m%n"/>
+      </layout>
+   </appender>
+
+   <root>
+      <priority value="INFO"/>
+      <appender-ref ref="CONSOLE"/>
+   </root>
+
+</log4j:configuration>

Deleted: examples/trunk/jsf/permalink/src/main/resources/log4j.xml
===================================================================
--- examples/trunk/jsf/permalink/src/main/resources/log4j.xml	2009-11-07 06:11:34 UTC (rev 4722)
+++ examples/trunk/jsf/permalink/src/main/resources/log4j.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-      <param name="Target" value="System.out"/>
-      <layout class="org.apache.log4j.PatternLayout">
-         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{2}] %m%n"/>
-      </layout>
-   </appender>
-
-   <root>
-      <priority value="INFO"/>
-      <appender-ref ref="CONSOLE"/>
-   </root>
-
-</log4j:configuration>

Deleted: examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/jetty-env.xml
===================================================================
--- examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/jetty-env.xml	2009-11-07 06:11:34 UTC (rev 4722)
+++ examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/jetty-env.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
-   "http://jetty.mortbay.org/configure.dtd">
-<!--
- JBoss, Home of Professional Open Source
- Copyright 2009, Red Hat Middleware LLC, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
- 
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
- 
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- 
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
-</Configure>

Modified: examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/web.xml
===================================================================
--- examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/web.xml	2009-11-07 06:11:34 UTC (rev 4722)
+++ examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/web.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -33,11 +33,7 @@
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
    </context-param>
-   
-   <listener>
-      <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
-   </listener>
-   
+
    <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

Copied: examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/jetty-env.xml (from rev 4634, examples/trunk/jsf/permalink/src/main/webapp/WEB-INF/jetty-env.xml)
===================================================================
--- examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/jetty-env.xml	                        (rev 0)
+++ examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/jetty-env.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
+   "http://jetty.mortbay.org/configure.dtd">
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+ 
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+ 
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ 
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
+   <New id="beanManager" class="org.mortbay.jetty.plus.naming.Resource">
+      <Arg><Ref id="webAppCtx"/></Arg>
+      <Arg>BeanManager</Arg>
+      <Arg>
+         <New class="javax.naming.Reference">
+            <Arg>javax.enterprise.inject.spi.BeanManager</Arg>
+            <Arg>org.jboss.weld.resources.ManagerObjectFactory</Arg>
+            <Arg/>
+         </New>
+      </Arg>
+   </New>
+</Configure>

Added: examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/override-web.xml
===================================================================
--- examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/override-web.xml	                        (rev 0)
+++ examples/trunk/jsf/permalink/src/main/webapp-jetty/WEB-INF/override-web.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+ 
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+ 
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ 
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<web-app version="2.5"
+   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_2_5.xsd">
+   
+   <listener>
+      <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
+   </listener>
+
+</web-app>

Copied: examples/trunk/jsf/permalink/src/main/webapp-tomcat/META-INF/context.xml (from rev 4634, examples/trunk/jsf/permalink/src/main/webapp/META-INF/context.xml)
===================================================================
--- examples/trunk/jsf/permalink/src/main/webapp-tomcat/META-INF/context.xml	                        (rev 0)
+++ examples/trunk/jsf/permalink/src/main/webapp-tomcat/META-INF/context.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+   <Manager pathname=""/> <!-- disables storage of sessions across restarts -->
+</Context>

Added: examples/trunk/jsf/permalink/src/main/webapp-tomcat/WEB-INF/web.xml
===================================================================
--- examples/trunk/jsf/permalink/src/main/webapp-tomcat/WEB-INF/web.xml	                        (rev 0)
+++ examples/trunk/jsf/permalink/src/main/webapp-tomcat/WEB-INF/web.xml	2009-11-07 06:50:51 UTC (rev 4723)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+ 
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+ 
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ 
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<web-app version="2.5"
+   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_2_5.xsd">
+
+   <display-name>Weld Permalink Example (Servlet Environment)</display-name>
+   
+   <context-param>
+      <param-name>facelets.DEVELOPMENT</param-name>
+      <param-value>true</param-value>
+   </context-param>
+
+   <listener>
+      <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
+   </listener>
+   
+   <servlet>
+      <servlet-name>Faces Servlet</servlet-name>
+      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+   
+   <servlet-mapping>
+      <servlet-name>Faces Servlet</servlet-name>
+      <url-pattern>*.jsf</url-pattern>
+   </servlet-mapping>
+
+   <session-config>
+      <session-timeout>10</session-timeout> 
+   </session-config>   
+   
+</web-app>



More information about the weld-commits mailing list