openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r801773 - in /openjpa/sandboxes/dwoods/sample: customers-ear/pom.xml customers-ejb/pom.xml customers-war/pom.xml customers-war/src/main/java/org/apache/openjpa/examples/customers/web/CompanyServlet.java
Date Thu, 06 Aug 2009 19:04:23 GMT
Author: dwoods
Date: Thu Aug  6 19:04:22 2009
New Revision: 801773

URL: http://svn.apache.org/viewvc?rev=801773&view=rev
Log:
OPENJPA-1231 fix remaining build issues before adding BV constraints

Modified:
    openjpa/sandboxes/dwoods/sample/customers-ear/pom.xml
    openjpa/sandboxes/dwoods/sample/customers-ejb/pom.xml
    openjpa/sandboxes/dwoods/sample/customers-war/pom.xml
    openjpa/sandboxes/dwoods/sample/customers-war/src/main/java/org/apache/openjpa/examples/customers/web/CompanyServlet.java

Modified: openjpa/sandboxes/dwoods/sample/customers-ear/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/sandboxes/dwoods/sample/customers-ear/pom.xml?rev=801773&r1=801772&r2=801773&view=diff
==============================================================================
--- openjpa/sandboxes/dwoods/sample/customers-ear/pom.xml (original)
+++ openjpa/sandboxes/dwoods/sample/customers-ear/pom.xml Thu Aug  6 19:04:22 2009
@@ -25,6 +25,7 @@
         <version>2.0.0-SNAPSHOT</version>
     </parent>
     
+    <groupId>org.apache.openjpa.openjpa-examples.customers</groupId>
     <artifactId>customers-ear</artifactId>
     <name>Apache OpenJPA Examples :: Customers - EAR</name>
     <packaging>ear</packaging>

Modified: openjpa/sandboxes/dwoods/sample/customers-ejb/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/sandboxes/dwoods/sample/customers-ejb/pom.xml?rev=801773&r1=801772&r2=801773&view=diff
==============================================================================
--- openjpa/sandboxes/dwoods/sample/customers-ejb/pom.xml (original)
+++ openjpa/sandboxes/dwoods/sample/customers-ejb/pom.xml Thu Aug  6 19:04:22 2009
@@ -24,6 +24,7 @@
         <version>2.0.0-SNAPSHOT</version>
     </parent>
 
+    <groupId>org.apache.openjpa.openjpa-examples.customers</groupId>
     <artifactId>customers-ejb</artifactId>
     <name>Apache OpenJPA Examples :: Customers - JAR</name>
     <packaging>ejb</packaging>

Modified: openjpa/sandboxes/dwoods/sample/customers-war/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/sandboxes/dwoods/sample/customers-war/pom.xml?rev=801773&r1=801772&r2=801773&view=diff
==============================================================================
--- openjpa/sandboxes/dwoods/sample/customers-war/pom.xml (original)
+++ openjpa/sandboxes/dwoods/sample/customers-war/pom.xml Thu Aug  6 19:04:22 2009
@@ -26,6 +26,7 @@
         <version>2.0.0-SNAPSHOT</version>
     </parent>
 
+    <groupId>org.apache.openjpa.openjpa-examples.customers</groupId>
     <artifactId>customers-war</artifactId>
     <name>Apache OpenJPA Examples :: Customers - WAR</name>
     <packaging>war</packaging>
@@ -59,8 +60,29 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-war-plugin</artifactId>
+                <version>2.1-beta-1</version>
                 <configuration>
                     <webXml>${pom.basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
+                    <archiveClasses>true</archiveClasses>
+                    <archive>
+                        <!-- Do not include META-INF/maven to avoid long file problems
on windows -->
+                        <addMavenDescriptor>false</addMavenDescriptor>
+                    </archive>
+                    <!--
+                        HACK: Include legal files explicity, otherwise they will
+                              end up in the wrong path.
+                        NOTE: targetPath is broken for webResources (as doc'ed)
+                    -->
+                    <webResources>
+                        <resource>
+                            <directory>${project.build.outputDirectory}</directory>
+                            <includes>
+                                <include>META-INF/LICENSE*</include>
+                                <include>META-INF/NOTICE*</include>
+                                <include>META-INF/DISCLAIMER*</include>
+                            </includes>
+                        </resource>
+                    </webResources>
                 </configuration>
             </plugin>
         </plugins>

Modified: openjpa/sandboxes/dwoods/sample/customers-war/src/main/java/org/apache/openjpa/examples/customers/web/CompanyServlet.java
URL: http://svn.apache.org/viewvc/openjpa/sandboxes/dwoods/sample/customers-war/src/main/java/org/apache/openjpa/examples/customers/web/CompanyServlet.java?rev=801773&r1=801772&r2=801773&view=diff
==============================================================================
--- openjpa/sandboxes/dwoods/sample/customers-war/src/main/java/org/apache/openjpa/examples/customers/web/CompanyServlet.java
(original)
+++ openjpa/sandboxes/dwoods/sample/customers-war/src/main/java/org/apache/openjpa/examples/customers/web/CompanyServlet.java
Thu Aug  6 19:04:22 2009
@@ -38,37 +38,41 @@
     @EJB
     private Company cum = null;
     
-    protected void service( HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse
) throws ServletException, IOException {
+    protected void service( HttpServletRequest httpServletRequest, 
+            HttpServletResponse httpServletResponse) 
+            throws ServletException, IOException {
     	try {
-    		String action = httpServletRequest.getParameter( "action" );
-    		if ( "add".equals( action ) ) {
+    		String action = httpServletRequest.getParameter("action");
+    		if ("add".equals(action)) {
 		    	JPACustomer customer = new JPACustomer();
-			    customer.setId( Integer.parseInt( httpServletRequest.getParameter( "clientID" ) )
);
-			    customer.setName( httpServletRequest.getParameter( "clientName" ) );
-			    customer.setSss_no( httpServletRequest.getParameter( "clientSSS" ) );
-			    customer.setAddress( httpServletRequest.getParameter( "clientAddress" ) );
-			    customer.setBirthday( new SimpleDateFormat( "MM/dd/yyyy" ).parse( httpServletRequest.getParameter(
"clientBirthdate") ) );
-			    customer.setAnnual_salary( Double.parseDouble( httpServletRequest.getParameter( "clientSalary"
) ) );
-			    customer.setLoan_amount( Double.parseDouble( httpServletRequest.getParameter( "loanAmt")
) );
+			    customer.setId(Integer.parseInt(httpServletRequest.getParameter("clientID")));
+			    customer.setName(httpServletRequest.getParameter("clientName"));
+			    customer.setSss_no(httpServletRequest.getParameter("clientSSS"));
+			    customer.setAddress(httpServletRequest.getParameter("clientAddress"));
+			    customer.setBirthday(new SimpleDateFormat("MM/dd/yyyy")
+                                .parse( httpServletRequest.getParameter("clientBirthdate")));
+			    customer.setAnnual_salary(Double.parseDouble(
+                                httpServletRequest.getParameter("clientSalary")));
+			    customer.setLoan_amount(Double.parseDouble(httpServletRequest.getParameter("loanAmt")));
 
-			    cum.addCustomer( customer );
+			    cum.addCustomer(customer);
 			    
 			    httpServletResponse.sendRedirect("company?action=list");
-    		} else if ( "list".equals( action ) ) {
+    		} else if ("list".equals(action)) {
 	            List customers = cum.getAllCustomers();
-	            System.out.println( "customer number:" + customers.size() );
+	            System.out.println("customer number:" + customers.size());
 
 	            for( int i = 0; i < customers.size(); i ++ ){
-	            	JPACustomer customer = (JPACustomer)customers.get( i );
-	            	System.out.println( "customer name:" + customer.getName() );
+	            	JPACustomer customer = (JPACustomer)customers.get(i);
+	            	System.out.println("customer name:" + customer.getName());
 	            }
 	            
-	            httpServletRequest.setAttribute( "customers", customers );
+	            httpServletRequest.setAttribute("customers", customers);
 	            
 	            ServletContext ctx = getServletConfig().getServletContext();
-	            ctx.getRequestDispatcher( "/list.jsp" ).include( httpServletRequest, httpServletResponse
);
+	            ctx.getRequestDispatcher("/list.jsp").include(httpServletRequest, httpServletResponse);
     		}
-    	} catch ( Exception e ) {
+    	} catch (Exception e) {
     		e.printStackTrace();
     	}
     }



Mime
View raw message