Author: dwoods
Date: Fri May 14 16:53:06 2010
New Revision: 944341

URL: http://svn.apache.org/viewvc?rev=944341&view=rev
Log:
combine build.properties and run.properties into one file, add missing ASL2 
header to index.html, use .m2 for java2html and mysql dependencies.

Added:
    openjpa/trunk/openjpa-examples/openbooks/openbook.properties   (with props)
Removed:
    openjpa/trunk/openjpa-examples/openbooks/build.properties
    openjpa/trunk/openjpa-examples/openbooks/lib/
    openjpa/trunk/openjpa-examples/openbooks/run.properties
Modified:
    openjpa/trunk/openjpa-examples/openbooks/build.xml
    openjpa/trunk/openjpa-examples/openbooks/index.html
    openjpa/trunk/openjpa-examples/openbooks/run.xml

Modified: openjpa/trunk/openjpa-examples/openbooks/build.xml
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/build.xml?rev=944341&r1=944340&r2=944341&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/build.xml (original)
+++ openjpa/trunk/openjpa-examples/openbooks/build.xml Fri May 14 16:53:06 2010
@@ -1,154 +1,160 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.   
--->
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--               Ant build script for OpenBooks                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-                    
-<project name="OpenBooks" default="info">
-       
-       <property file="build.properties" />
-       
-       <property name="jpa.provider" value="openjpa" />
-       <property name="src.dir"      value="${basedir}/src/main/java"/>
-       <property name="rsrc.dir"     value="${basedir}/src/main/resources"/>
-       <property name="classes.dir"  value="${basedir}/target/classes"/>
-       <property name="generated.src.dir"  value="${rsrc.dir}/source"/>
-
-       <property name="jpa.properties"  
value="META-INF/persistence.xml#OpenBooks" />
-
-       <path id="compile.classpath" description="compilation requires OpenJPA 
specific library">
-               <pathelement location="${src.dir}" />
-               <pathelement location="${classes.dir}" />
-               <pathelement location="${rsrc.dir}" />
-               <fileset dir="${openjpa.lib}">
-                       <include name="*.jar" />
-               </fileset>
-       </path>
-       
-       <path id="java2html.classpath">
-               <pathelement location="${rsrc.dir}" />
-               <pathelement location="lib/java2html.jar" />
-       </path>
-
-       
-       <fileset id="canonical.metamodel" dir="${src.dir}" 
-               description="Set of *.java files generated for static, 
cannonical domain model">
-               <include name="**/*_.java"/>
-       </fileset>
-       
-       <target name="clean" description="Removes all *.class and generated 
metamodel source files">
-               <delete dir="${classes.dir}" failonerror="false"/>
-               <delete>
-                       <fileset refid="canonical.metamodel"/>
-               </delete>
-       </target>
-
-       <target name="info" depends="check-env">
-               <echo>
-                       Builds OpenBooks demo application.
-                       OpenJPA Library: ${openjpa.lib}
-               </echo>
-       </target>
-       
-       <target name="check-env" description="Checks if OpenJPA library exists">
-               <available file="${openjpa.lib}" property="openjpa.exists"/>
-               <fail unless="openjpa.exists">*** Error:
-                  The directory for OpenJPA libraries can not be located at 
${openjpa.lib}. 
-                  Make sure openjpa.lib property value is correct in 
build.properties file.    
-            </fail>
-       </target>
-       
-       <target name="compile" depends="check-env,clean"
-               description="Compilation will also generate canonical 
meta-model classes.">
-               <mkdir dir="${classes.dir}" />
-               <javac srcdir="${src.dir}" destdir="${classes.dir}" 
debug="true">
-                       <classpath refid="compile.classpath" />
-                       <include name="openbook/domain/*.java"/>
-                       <compilerarg value="-Aopenjpa.metamodel=true" />
-                       <compilerarg value="-Aopenjpa.log=TRACE" />
-                       <compilerarg value="-s"/>
-                       <compilerarg value="${src.dir}" />
-               </javac>
-               <javac srcdir="${src.dir}" destdir="${classes.dir}" 
debug="true">
-                       <classpath refid="compile.classpath" />
-               </javac>
-               <java classname="org.apache.openjpa.enhance.PCEnhancer" 
fork="true">
-                       <arg value="-properties" />
-                       <arg value="${jpa.properties}" />
-                       <classpath refid="compile.classpath" />
-               </java>
-       </target>
-       
-       <target name="package" depends="clean,compile,generate-html-source"
-               description="Generates HTML version of source code and creates 
distribution layout">
-               <delete file="openbooks.jar" failonerror="false"/>
-               <delete file="openbooks.zip" failonerror="false"/>
-               
-               <jar destfile="openbooks.jar" basedir="${classes.dir}">
-                       <exclude name="junit/**" />
-               </jar>
-               <jar destfile="openbooks.jar"
-                    basedir="${rsrc.dir}"
-                    update="true">
-                       <include name="images/*" />
-               </jar>
-               <zip destfile="openbooks.zip" basedir="${basedir}">
-                       <include name="openbooks.jar" />
-                       <include name="run.properties" />
-                       <include name="run.xml" />
-                       <include name="index.html" />
-                       <include name="NOTICE.txt"/>
-                       <include name="LICENSE.txt"/>
-               </zip>
-               <zip destfile="openbooks.zip" basedir="${rsrc.dir}" 
update="true">
-                       <include name="load.properties" />
-                       <include name="demo.properties" />
-                       <include name="META-INF/persistence.xml" />
-                       <include name="slides/**" />
-                       <include name="source/**" />
-               </zip>
-               
-       </target>
-       
-       <target name="deploy" description="Transfers the distribution packge to 
a deploy directory">
-               <mkdir dir="${deploy.dir}"/>
-               <unzip dest="${deploy.dir}" src="openbooks.zip" 
overwrite="true">
-               </unzip>
-       </target>
-       
-       <target name="generate-html-source" 
-               description="Generates HTML Source Code using Java2HTML 
utility">
-               <mkdir dir="${generated.src.dir}"/>
-               <java classname="de.java2html.Java2Html" fork="true">
-                       <classpath refid="java2html.classpath"/>
-                       <arg value="-srcdir"/>
-                       <arg value="${src.dir}"/>
-                       <arg value="-targetdir"/>
-                       <arg value="${generated.src.dir}"/>
-                       <arg value="-style"/>
-                       <arg value="Eclipse"/>
-               </java>
-               <replace dir="${generated.src.dir}" token="10pt" value="14pt">
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.   
+-->
+<!-- ====================================================================== -->
+<!--                                                                        -->
+<!--               Ant build script for OpenBooks                           -->
+<!--                                                                        -->
+<!-- ====================================================================== -->
+                    
+<project name="OpenBooks" default="info">
+       
+       <property file="openbook.properties" />
+       
+       <property name="jpa.provider" value="openjpa" />
+       <property name="src.dir"      value="${basedir}/src/main/java"/>
+       <property name="rsrc.dir"     value="${basedir}/src/main/resources"/>
+       <property name="classes.dir"  value="${basedir}/target/classes"/>
+       <property name="generated.src.dir"  value="${rsrc.dir}/source"/>
+
+       <property name="jpa.properties"  
value="META-INF/persistence.xml#OpenBooks" />
+
+       <path id="compile.classpath" description="compilation requires OpenJPA 
specific library">
+               <pathelement location="${src.dir}" />
+               <pathelement location="${classes.dir}" />
+               <pathelement location="${rsrc.dir}" />
+               <fileset dir="${openjpa.lib}">
+                       <include name="*.jar" />
+               </fileset>
+       </path>
+       
+       <path id="java2html.classpath">
+               <pathelement location="${rsrc.dir}" />
+               <fileset dir="${java2html.lib}">
+                       <include name="*.jar" />
+               </fileset>
+       </path>
+
+       
+       <fileset id="canonical.metamodel" dir="${src.dir}" 
+               description="Set of *.java files generated for static, 
cannonical domain model">
+               <include name="**/*_.java"/>
+       </fileset>
+       
+       <target name="clean" description="Removes all *.class and generated 
metamodel source files">
+               <delete dir="${classes.dir}" failonerror="false"/>
+               <delete>
+                       <fileset refid="canonical.metamodel"/>
+               </delete>
+       </target>
+
+       <target name="info" depends="check-env">
+               <echo>
+                       Builds OpenBooks demo application.
+                       OpenJPA Library: ${openjpa.lib}
+               </echo>
+       </target>
+       
+       <target name="check-env" description="Checks if required libraries 
exist">
+               <available file="${openjpa.lib}" property="openjpa.exists"/>
+               <fail unless="openjpa.exists">*** Error:
+                  The directory for OpenJPA libraries can not be located at 
${openjpa.lib}. 
+                  Make sure openjpa.lib property value is correct in 
openbooks.properties file.        
+               </fail>
+               <available file="${java2html.lib}" property="java2html.exists"/>
+               <fail unless="java2html.exists">*** Error:
+                  The directory for Java2HTML libraries can not be located at 
${java2html.lib}. 
+                  Make sure java2html.lib property value is correct in 
openbooks.properties file.      
+               </fail>
+       </target>
+       
+       <target name="compile" depends="check-env,clean"
+               description="Compilation will also generate canonical 
meta-model classes.">
+               <mkdir dir="${classes.dir}" />
+               <javac srcdir="${src.dir}" destdir="${classes.dir}" 
debug="true">
+                       <classpath refid="compile.classpath" />
+                       <include name="openbook/domain/*.java"/>
+                       <compilerarg value="-Aopenjpa.metamodel=true" />
+                       <compilerarg value="-Aopenjpa.log=TRACE" />
+                       <compilerarg value="-s"/>
+                       <compilerarg value="${src.dir}" />
+               </javac>
+               <javac srcdir="${src.dir}" destdir="${classes.dir}" 
debug="true">
+                       <classpath refid="compile.classpath" />
+               </javac>
+               <java classname="org.apache.openjpa.enhance.PCEnhancer" 
fork="true">
+                       <arg value="-properties" />
+                       <arg value="${jpa.properties}" />
+                       <classpath refid="compile.classpath" />
+               </java>
+       </target>
+       
+       <target name="package" depends="clean,compile,generate-html-source"
+               description="Generates HTML version of source code and creates 
distribution layout">
+               <delete file="openbooks.jar" failonerror="false"/>
+               <delete file="openbooks.zip" failonerror="false"/>
+               
+               <jar destfile="openbooks.jar" basedir="${classes.dir}">
+                       <exclude name="junit/**" />
+               </jar>
+               <jar destfile="openbooks.jar"
+                    basedir="${rsrc.dir}"
+                    update="true">
+                       <include name="images/*" />
+               </jar>
+               <zip destfile="openbooks.zip" basedir="${basedir}">
+                       <include name="openbooks.jar" />
+                       <include name="openbooks.properties" />
+                       <include name="run.xml" />
+                       <include name="index.html" />
+                       <include name="NOTICE.txt"/>
+                       <include name="LICENSE.txt"/>
+               </zip>
+               <zip destfile="openbooks.zip" basedir="${rsrc.dir}" 
update="true">
+                       <include name="load.properties" />
+                       <include name="demo.properties" />
+                       <include name="META-INF/persistence.xml" />
+                       <include name="slides/**" />
+                       <include name="source/**" />
+               </zip>
+       </target>
+       
+       <target name="deploy" description="Transfers the distribution packge to 
a deploy directory">
+               <mkdir dir="${deploy.dir}"/>
+               <unzip dest="${deploy.dir}" src="openbooks.zip" 
overwrite="true">
+               </unzip>
+       </target>
+       
+       <target name="generate-html-source" 
+               description="Generates HTML Source Code using Java2HTML 
utility">
+               <mkdir dir="${generated.src.dir}"/>
+               <java classname="de.java2html.Java2Html" fork="true">
+                       <classpath refid="java2html.classpath"/>
+                       <arg value="-srcdir"/>
+                       <arg value="${src.dir}"/>
+                       <arg value="-targetdir"/>
+                       <arg value="${generated.src.dir}"/>
+                       <arg value="-style"/>
+                       <arg value="Eclipse"/>
+               </java>
+               <replace dir="${generated.src.dir}" token="10pt" value="14pt">
            </replace>
-    </target>
-       
-</project>
+    </target>
+       
+</project>

Modified: openjpa/trunk/openjpa-examples/openbooks/index.html
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/index.html?rev=944341&r1=944340&r2=944341&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/index.html (original)
+++ openjpa/trunk/openjpa-examples/openbooks/index.html Fri May 14 16:53:06 2010
@@ -1,3 +1,23 @@
+<!--
+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.
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
 <html>
 <body>
 <h1>OpenBooks: A sample JPA 2.0 Application</h1>
@@ -65,4 +85,4 @@
   <code>$ ant -f run.xml run</code>
  <hr>
 </body>
-</html>
\ No newline at end of file
+</html>

Added: openjpa/trunk/openjpa-examples/openbooks/openbook.properties
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/openbook.properties?rev=944341&view=auto
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/openbook.properties (added)
+++ openjpa/trunk/openjpa-examples/openbooks/openbook.properties Fri May 14 
16:53:06 2010
@@ -0,0 +1,30 @@
+# 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 variables for provider specific library to run OpenBooks
+# 
+# 
-------------------------------------------------------------------------------
+# Directory location of maven repository
+maven.repos=${user.home}/.m2/repository
+# OpenJPA runtime artifact
+openjpa.version=2.1.0-SNAPSHOT
+openjpa.lib=${maven.repos}/org/apache/openjpa/openjpa-all/${openjpa.version}
+# Other depends
+java2html.version=5.0
+java2html.lib=${maven.repos}/de/java2html/${java2html.version}
+jdbc.driver=${maven.repos}/mysql/mysql-connector-java/5.1.12/mysql-connector-java-5.1.12.jar
+

Propchange: openjpa/trunk/openjpa-examples/openbooks/openbook.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/trunk/openjpa-examples/openbooks/run.xml
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/run.xml?rev=944341&r1=944340&r2=944341&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/run.xml (original)
+++ openjpa/trunk/openjpa-examples/openbooks/run.xml Fri May 14 16:53:06 2010
@@ -23,7 +23,7 @@
 <!--                                                                        -->
 <!-- ====================================================================== -->
 <project name="OpenBooks">
-       <property file="run.properties"/>
+       <property file="openbooks.properties"/>
        <property name="jpa.provider" value="openjpa" />
        <property name="load.properties" value="load.properties" />
        <property name="demo.properties" value="demo.properties" />
@@ -62,4 +62,4 @@
                        </java>
        </target>
 </project>     
-       
\ No newline at end of file
+       


Reply via email to