Author: ppoddar
Date: Tue Aug 24 18:50:11 2010
New Revision: 988659

URL: http://svn.apache.org/viewvc?rev=988659&view=rev
Log:
Add ASL header

Added:
    openjpa/trunk/openjpa-examples/opentrader/build.properties   (with props)
    openjpa/trunk/openjpa-examples/opentrader/build.xml

Added: openjpa/trunk/openjpa-examples/opentrader/build.properties
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/opentrader/build.properties?rev=988659&view=auto
==============================================================================
--- openjpa/trunk/openjpa-examples/opentrader/build.properties (added)
+++ openjpa/trunk/openjpa-examples/opentrader/build.properties Tue Aug 24 
18:50:11 2010
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+# -----------------------------------------------------------------------------
+# Environment-dependent paths to resources used to build OpenTrader application
+#
+#    OpenTrader essentially depends on three major frameworks
+#        Google Web Toolkit
+#        a JEE Application server
+#        OpenJPA
+# -----------------------------------------------------------------------------
+#   OpenJPA as persistence provider and a JDBC Driver resources
+# -----------------------------------------------------------------------------
+maven.repos=C:/Documents and Settings/Administrator/.m2/repository
+jpa.jar=${maven.repos}/org/apache/geronimo/specs/geronimo-jpa_2.0_spec/1.1/geronimo-jpa_2.0_spec-1.1.jar
+openjpa.version=2.1.0-SNAPSHOT
+openjpa.jar=${maven.repos}/org/apache/openjpa/openjpa-all/${openjpa.version}/openjpa-all-${openjpa.version}.jar
+openjpa.src.jar=${maven.repos}/org/apache/openjpa/openjpa-all/${openjpa.version}/openjpa-all-${openjpa.version}-sources.jar
+
+# -----------------------------------------------------------------------------
+#    Google Web Toolkit specific resources
+# -----------------------------------------------------------------------------
+gwt.sdk=C:/gwt-2.0.4
+# -----------------------------------------------------------------------------
+#    JDBC specific resources
+# -----------------------------------------------------------------------------
+jdbc.jar=C:/mysql/mysql-connector-java-5.1.6/mysql-connector-java-5.1.6-bin.jar
+
+# -----------------------------------------------------------------------------
+# Application Server specific paths
+# -----------------------------------------------------------------------------
+appserver.root=C:/apache-tomcat-6.0.29
+auto.deploy.dir=${appserver.root}/webapps
+
+# The root directory of the application server 
+#appserver.root=C:/glassfishv3/glassfish
+appserver.root=C:/apache-tomcat-6.0.29
+# The root directory of the deployed application domains
+domain.root=${appserver.root}
+# Name of the domain
+#domain.name=domain1
+domain.name=
+# The root directory of the domain in which this application will be deployed
+base.domain=${domain.root}/${domain.name}
+# The directory for automatic deployment
+#auto.deploy.dir=${base.domain}/autodeploy
+#auto.deploy.dir=${base.domain}/autodeploy
+# The directory for libraries the application depends on
+deploy.app.lib=${base.domain}/lib
+# The directory for common libraries many application depends on, e.g. JDBC 
driver
+deploy.common.lib=${base.domain}/lib/ext
+
+gxt.sdk=C:/gxt-2.2.0
\ No newline at end of file

Propchange: openjpa/trunk/openjpa-examples/opentrader/build.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-examples/opentrader/build.xml
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/opentrader/build.xml?rev=988659&view=auto
==============================================================================
--- openjpa/trunk/openjpa-examples/opentrader/build.xml (added)
+++ openjpa/trunk/openjpa-examples/opentrader/build.xml Tue Aug 24 18:50:11 2010
@@ -0,0 +1,205 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.   
+-->
+<!-- ====================================================================== -->
+<!-- Build script to compile, package a OpenJPA/Slice based application     -->
+<!-- with Google Web Toolkit client to be deployed in a servlet container.  -->
+<!-- ====================================================================== -->
+<project name="JavaOneGWT">
+
+       <!-- local environment paths for required libraries                     
-->
+       <property file="build.properties" />
+
+       <!-- root directory for *.java and GWT module descriptor                
-->
+       <property name="src.dir" value="src/main/java" />
+
+       <!-- root directory for web.xml, persistence.xml, cascaded stylesheets  
-->
+       <!-- images and the entry point html file                               
-->
+       <property name="rsrc.dir" value="src/main/resources" />
+
+       <!-- root directory for the deployment layout                           
-->
+       <property name="war.dir" value="war" />
+
+       <!-- root directory for compiled *.class files                          
-->
+       <!-- the directory is named according to packaging of web application   
-->
+       <property name="classes.dir" value="war/WEB-INF/classes" />
+       
+       <!-- root directory for jar files application depends on                
-->
+       <!-- the directory is named according to packaging of web application   
-->
+       <property name="lib.dir" value="war/WEB-INF/lib" />
+
+       <!-- the target web archieve created by this script                     
-->
+       <property name="target.war" value="opentrader.war" />
+
+       <!-- the name of the GWT module. The module descriptor must be placed   
-->
+       <!-- relative w.r.t. source root for GWT compiler                       
-->
+       <property name="gwt.module" 
value="org.apache.openjpa.trader.OpenTrader" />
+
+       <!-- relevant GWT class libraries. gwt-user.jar however should not be   
-->
+       <!-- deployed in a servlet container as this jar contains javax.servlet 
-->
+       <!-- classes. gwt-servlet is the right jar to deploy                    
-->
+       <!-- cobogw.jar is used for rounded panels.                             
-->
+       <path id="gwt.classpath">
+               <pathelement location="${gwt.sdk}/gwt-user.jar" />
+               <pathelement location="${gwt.sdk}/gwt-dev.jar" />
+               <pathelement location="${gwt.sdk}/gwt-servlet.jar" />
+               <pathelement location="${gwt.sdk}/cobogw-1.3.1.jar" />
+       </path>
+
+       <!-- classpath for normal java compilation                             
-->
+       <path id="java.compile.classpath">
+               <pathelement path="${openjpa.jar}" />
+               <path refid="gwt.classpath" />
+       </path>
+
+       <!-- classpath for OpenJPA bytecode enhanement requires the resource   
-->
+       <!-- root directory to locate persitence.xml descriptor                
-->
+       <path id="openjpa.compile.classpath">
+               <pathelement path="${openjpa.jar}" />
+               <pathelement path="${classes.dir}" />
+               <pathelement path="${rsrc.dir}" />
+       </path>
+
+       <!-- classpath for GWT Compiler requires the application source code  
-->
+       <!-- and standard JPA jar as well, because application domain classes 
-->
+       <!-- refer them through source code mapping annotations               
-->
+       <path id="gwt.compile.classpath">
+               <path refid="gwt.classpath" />
+               <pathelement path="${src.dir}" />
+               <pathelement path="${jpa.jar}" />
+               <pathelement path="${classes.dir}" />
+               <pathelement path="${rsrc.dir}" />
+       </path>
+
+
+       <target name="clean" description="Deletes all derived resources">
+               <delete dir="${war.dir}"/>
+               <delete dir="${target.war}" />
+       </target>
+
+       <!-- compilation proceeds in 3 phases. Compiling normal Java, bytecode  
-->
+       <!-- followed by GWT compilation.                                       
-->
+       <target name="compile" depends="clean">
+               <mkdir dir="${classes.dir}" />
+               <antcall target="compile.pojo"/>
+           <antcall target="compile.gwt"/>
+           <antcall target="compile.openjpa"/>
+       </target>
+
+       <target name="compile.pojo">
+               <javac srcdir="src"
+                      destdir="${classes.dir}"
+                      verbose="false"
+                      debug="true">
+                       <classpath refid="java.compile.classpath" />
+                       <exclude name="**/override/**" />
+               </javac>
+       </target>
+       
+       <target name="compile.gwt">
+               <java classname="com.google.gwt.dev.Compiler"
+                     failonerror="true"
+                     fork="true">
+                       <classpath refid="gwt.compile.classpath" />
+                       <arg value="-logLevel" />
+                       <arg value="WARN" />
+                       <arg value="${gwt.module}" />
+               </java>
+       </target>
+       
+       <target name="compile.openjpa">
+               <java classname="org.apache.openjpa.enhance.PCEnhancer"
+                     failonerror="true"
+                     fork="true">
+                       <classpath refid="openjpa.compile.classpath" />
+                       <arg value="-properties" />
+                       <arg value="META-INF/persistence.xml#exchange" />
+               </java>
+       </target>
+
+       <!-- packaging for development. Copies relevant files from the source   
-->
+       <!-- in a layour mimicing the web archive structure for deployment      
-->
+       <target name="devpack">
+               <copy 
file="${src.dir}/org/apache/openjpa/trader/OpenTrader.gwt.xml"
+                     
tofile="${classes.dir}/org/apache/openjpa/trader/OpenTrader.gwt.xml" />
+               <copy todir="${war.dir}">
+                       <fileset dir="${rsrc.dir}">
+                               <include name="WEB-INF/web.xml" />
+                               <include name="OpenTrader.html" />
+                               <include name="css/OpenTrader.css" />
+                       </fileset>
+               </copy>
+               <copy todir="${war.dir}">
+                       <fileset dir="${rsrc.dir}">
+                               <include name="help/*.*" />
+                       </fileset>
+               </copy>
+               <copy todir="${classes.dir}">
+                       <fileset dir="${rsrc.dir}">
+                               <include name="images/*.*" />
+                               <include name="META-INF/persistence.xml" />
+                       </fileset>
+               </copy>
+               <copy todir="${lib.dir}" file="${openjpa.jar}" />
+               <!-- do not deploy gwt-user.jar as it contains javax.servlet.*  
    -->
+               <copy todir="${lib.dir}" file="${gwt.sdk}/gwt-servlet.jar" />
+               <copy todir="${lib.dir}" file="${gwt.sdk}/cobogw-1.3.1.jar" />
+               <copy todir="${lib.dir}" file="${jdbc.jar}" />
+       </target>
+
+       <target name="package"
+               depends="devpack"
+               description="Package OpenTrader as a WAR archieve">
+               <delete file="${target.war}" />
+               <jar destfile="${target.war}"
+                    filesonly="true"
+                    duplicate="fail" update="true"
+                    basedir="${war.dir}">
+               </jar>
+       </target>
+
+       <!-- classpath for running the aplication in development mode.          
-->
+       <path id="dev.run.classpath">
+               <path refid="gwt.classpath" />
+               <pathelement path="${src.dir}" />
+               <pathelement path="${war.dir}" />
+               <pathelement path="${war.dir}/WEB-INF/classes" />
+               <pathelement path="${openjpa.jar}" />
+               <pathelement path="${jdbc.jar}" />
+       </path>
+
+       <target name="devmode" depends="devpack" description="Runs in 
development mode">
+               <java failonerror="true"
+                     fork="true"
+                     classname="com.google.gwt.dev.DevMode">
+                       <classpath refid="dev.run.classpath" />
+                       <jvmarg value="-Xmx256M" />
+                       <arg value="-startupUrl" />
+                       <arg value="OpenTrader.html" />
+                       <arg value="-logLevel" />
+                       <arg value="DEBUG" />
+                       <arg value="${gwt.module}" />
+               </java>
+       </target>
+
+       <target name="deploy" depends="package">
+               <copy file="${target.war}" todir="${auto.deploy.dir}" />
+       </target>
+
+
+</project>


Reply via email to