logo       

[picocontainer-scm] [picocontainer] [3178] java/nanocontainer-nanowar/trunk: msg#00093

java.picocontainer.cvs

Subject: [picocontainer-scm] [picocontainer] [3178] java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp: Fixed POM for standalone packaging.

Diff

Modified: java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/pom.xml (3177 => 3178)

--- java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/pom.xml	2006-12-28 14:10:54 UTC (rev 3177)
+++ java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/pom.xml	2006-12-28 19:28:11 UTC (rev 3178)
@@ -30,14 +30,24 @@
 		<dependency>
 			<groupId>${pom.groupId}</groupId>
 			<artifactId>nanocontainer-nanowar</artifactId>
-            <version>${pom.version}</version>
+            <version>${pom.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>${pom.groupId}</groupId>
+			<groupId>${pom.groupId}</groupId>
+			<artifactId>nanocontainer-groovy</artifactId>
+			<version>${pom.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${pom.groupId}</groupId>
 			<artifactId>nanocontainer-nanowar-example</artifactId>
-            <version>${pom.version}</version>
+            <version>${pom.version}</version>
 		</dependency>
 		<dependency>
+			<groupId>${pom.groupId}</groupId>
+			<artifactId>nanocontainer-nanowar-jsf</artifactId>
+            <version>${pom.version}</version>			
+		</dependency>
+		<dependency>
 			<groupId>org.apache.myfaces.core</groupId>
 			<artifactId>myfaces-api</artifactId>
 			<version>1.1.4</version>
@@ -63,6 +73,31 @@
 		</dependency>
 	</dependencies>
 	<build>
+		<sourceDirectory>src/main/java</sourceDirectory>
+		<testSourceDirectory>src/test/java</testSourceDirectory>
+		<resources>
+			<resource>
+				<directory>src/main/java</directory>
+				<includes>
+					<include>**/*.properties</include>
+					<include>**/*.groovy</include>
+					<include>**/*.xml</include>
+					<include>**/*.gif</include>
+					<include>**/*.png</include>
+				</includes>
+				<excludes>
+					<exclude>**/*.java</exclude>
+				</excludes>
+			</resource>
+		</resources>
+		<testResources>
+			<testResource>
+				<directory>src/test/java</directory>
+				<excludes>
+					<exclude>**/*.java</exclude>
+				</excludes>
+			</testResource>
+		</testResources>
 		<plugins>
 			<plugin>
 				<inherited>false</inherited>

Modified: java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/java/org/nanocontainer/nanowar/samples/jsf/AddCheeseController.java (3177 => 3178)

--- java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/java/org/nanocontainer/nanowar/samples/jsf/AddCheeseController.java	2006-12-28 14:10:54 UTC (rev 3177)
+++ java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/java/org/nanocontainer/nanowar/samples/jsf/AddCheeseController.java	2006-12-28 19:28:11 UTC (rev 3178)
@@ -23,19 +23,39 @@
      */
     private static final long serialVersionUID = 1L;
 
-    
+    /**
+     * Name of the cheese to add.
+     */
     private String name;
     
+    
+    /**
+     * Country of the cheese to add.
+     */
     private String country;
 
+    
+    /**
+     * CDI injected Cheese Service.
+     */
     private final CheeseService service;
     
     
+    /**
+     * Constructor for the Cheese Controller that links it
+     * with the cheese service.
+     * @param service
+     */
     public AddCheeseController(CheeseService service) {
        this.service = service;
     }
     
     
+    /**
+     * Adds a cheese via the CDI injected cheese service.
+     * @return the next action to use when considering JSF
+     * mapping.
+     */
     public String addCheese() {
         Cheese cheese = new Cheese(name,country);
         service.save(cheese);

Modified: java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/java/org/nanocontainer/nanowar/samples/jsf/ListCheeseController.java (3177 => 3178)

--- java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/java/org/nanocontainer/nanowar/samples/jsf/ListCheeseController.java	2006-12-28 14:10:54 UTC (rev 3177)
+++ java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/java/org/nanocontainer/nanowar/samples/jsf/ListCheeseController.java	2006-12-28 19:28:11 UTC (rev 3178)
@@ -25,10 +25,26 @@
  */
 public class ListCheeseController implements Serializable {
     
+    /**
+     * Serialization UID so Eclipse stops whining.
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * The Cheese Service we handle.
+     */
     private final CheeseService service;
     
+    /**
+     * The list of cheeses last loaded.
+     */
     private List cheeses;
     
+    
+    /**
+     * Data grid item that works with the data table
+     * of cheeses.
+     */
     private UIData cheeseList;
     
     
@@ -62,13 +78,20 @@
         this.cheeseList = cheeseList;
     }
     
+    /**
+     * Queries the UIData for the current row of data to get
+     * the current cheese.
+     * @return String for the cheese name.
+     * @throws NullPointerException if the rowdata returns a null
+     * Cheese.
+     */
     private String getSelectedCheeseName() {
-        Cheese project = (Cheese) cheeseList.getRowData(); //  make sure it still exists
-        if (project == null) {
-            throw new NullPointerException("Project");
+        Cheese cheese = (Cheese) cheeseList.getRowData(); //  make sure it still exists
+        if (cheese == null) {
+            throw new NullPointerException("cheese");
         }
         
-        return project.getName();
+        return cheese.getName();
     }
     
     public String removeCheese() {

Modified: java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/webapp/index.jsp (3177 => 3178)

--- java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/webapp/index.jsp	2006-12-28 14:10:54 UTC (rev 3177)
+++ java/nanocontainer-nanowar/trunk/examples/nanowar-jsf-webapp/src/main/webapp/index.jsp	2006-12-28 19:28:11 UTC (rev 3178)
@@ -8,7 +8,8 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
 <title>Cheese Sample</title>
 </head>
-<body>
+<body>
+<%-- Simply sends a redirect to the cheese jsf page --%>
     <%
         response.sendRedirect(request.getContextPath() + "/cheese.jsf");
     %>


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise