You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pp...@apache.org on 2010/05/18 23:34:31 UTC
svn commit: r945900 - /openjpa/trunk/openjpa-examples/openbooks/index.html
Author: ppoddar
Date: Tue May 18 21:34:31 2010
New Revision: 945900
URL: http://svn.apache.org/viewvc?rev=945900&view=rev
Log:
Update instructions to build
Modified:
openjpa/trunk/openjpa-examples/openbooks/index.html
Modified: openjpa/trunk/openjpa-examples/openbooks/index.html
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/index.html?rev=945900&r1=945899&r2=945900&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/openbooks/index.html (original)
+++ openjpa/trunk/openjpa-examples/openbooks/index.html Tue May 18 21:34:31 2010
@@ -19,19 +19,49 @@ under the License.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
+<head>
+<meta name="keywords" content="JPA, OpenJPA, OpenBooks, Sample, Criteria, MetaModel">
+<style type="text/css">
+body {
+background-color:#FFFFFF;
+}
+h1 {
+color:black;
+text-align:center;
+}
+h2 {
+color:blue;
+text-align:left;
+}
+
+p{
+font-family:"Times New Roman";
+font-size:20px;
+}
+</style>
+</head>
+
<body>
<h1>OpenBooks: A sample JPA 2.0 Application</h1>
<hr>
OpenBooks is a sample (and perhaps simple) application to demonstrate some of the new features of
- version 2.0 of <A HREF="http://jcp.org/en/jsr/detail?id=317">Java Persistence API</A> (JPA) specification.
+ version 2.0 of <A HREF="http://jcp.org/en/jsr/detail?id=317">Java Persistence API</A> (JPA) specification, such as
<br>
+ <LI>Creating dynamic Criteria Query from an input form
+ <LI>Using compound, derived identity and orphan delete for modeling composite relationship
+ <LI>Browsing Persistent Domain Model via MetaModel API
+ <br>
+
OpenBooks runs with <A HREF="http://openjpa.apache.org">OpenJPA</A> as its JPA provider.
<hr>
-<h1>Instructions to run OpenBooks Demo</h1>
+<h2>Instructions to download and run OpenBooks Demo</h2>
+ OpenBooks comes with complete source code, build scripts to demonstrate how to build a typical OpenJPA application
+ and scripts to run OpenBooks in on your local database installation. Follow the simple instructions below:
+
<OL>
<LI><A href="#Download">Download OpenBooks distribution</A>.
- <LI><A href="#Install">Install OpenBooks distribution</A>
- <LI><A href="#Configure">Edit for your local environment</A>
+ <LI><A href="#Build">Build OpenBooks from source</A>
+ <LI><A href="#Configure">Edit for your local environment to run</A>
<LI><A href="#Load">Populate a Database</A>
<LI><A href="#Run">Run OpenBooks</A>
</OL>
@@ -39,8 +69,12 @@ under the License.
<h2 A name="Download">Download Instructions</A></h2>
OpenBooks is distributed under <A HREF="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</A>
<br>
- OpenBooks can be downloaded from <A HREF="openbooks.zip">here</A>.
+ OpenBooks can be checked out from OpenJPA repository.
+ <br>
+ <code>$ svn co https://svn.apache.org/repos/asf/openjpa/trunk/openjpa-examples/openbooks</code>.
<p>
+ will check out the source code and build scripts of OpenBooks in current directory.
+
OpenBooks require following software environment to run:
<OL>
<LI> Java Runtime version 6.0 or higher
@@ -49,30 +83,26 @@ under the License.
<LI> Any JDBC complaint database supported by OpenJPA.
See <A href="http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_dbsetup_dbsupport">OpenJPA documentation</A> for a list of supported databases.
</OL>
-
-<h2><A name="Install">Install OpenBooks distribution</A></h2>
- Unzip <code>openbooks.zip</code> to a directory. Following instructions assume this directory as
- your current directory.<br>
- The files included in this distribution are:
- <LI>index.html : the file you are reading
- <LI>openbooks.jar : OpenBooks class library
- <LI>run.xml : Ant script to run OpenBooks
- <LI>run.properties : The configuration for your execution environment used by Ant script
- <LI>load.properties : The configuration for loading initial data into OpenBooks.
- <LI>demo.properties: Properties to configure the demonstation GUI.
- <LI>META-INF/persistence.xml: The configuration for OpenJPA runtime
- <LI>slides/: Directory containing the default presentation accompanying this demonstration.
- <LI>source/: Directory containing the source code for OpenBooks
- <LI>LICENSE.txt: Apache License
- <LI>NOTICE.txt: Copyright Notice
- <br>
- <p>
<hr>
-<h2><A name="Configure">Configure OpenBooks for your local environment</A></h2>
+
+
+<h2><A name="Build">Build OpenBooks from source</h2>
+ OpenBooks builds with Ant. Before you run a build, configure the build environment by editing
+ <A HREF="build.properties"><code>build.properties</code></A>. Essentially you need to point to OpenJPA class library.
+ The file is commented on what is to be edited. Once you have edited <code>build.properties</code>, simply issue
+ <br>
+ <code>$ ant package deploy</code>
+ <br>
+ This will compile the source code, generate metamodel classes, enhance the persistence domain model, package
+ the application and copy it to a <code>target/openbooks</code> directory.
+ <hr>
+
+<h2><A name="Configure">Edit for your local environment to run</A></h2>
+ Now go to the <em>deploy</em> directory i.e. <code>target/openbooks</code> directory
<OL>
- <LI>Edit <code>run.properties</code> to specify location of OpenJPA class libraries and JDBC Driver
- <LI>Edit <code>META-INF/persistence.xml</code> to specify database properties
- <LI>Edit <code>load.properties</code> to specify load parameters such as number of Books etc.
+ <LI>Edit <A HREF="run.properties"><code>run.properties</code></A> to specify location of OpenJPA class libraries and JDBC Driver
+ <LI>Edit <A HREF="META-INF/persistence.xml"><code>META-INF/persistence.xml</code></A> to specify database properties
+ <LI>Edit <A HREF="load.properties"><code>load.properties</code></A> to specify load parameters such as number of Books etc.
This example file has some typical values. If you are satisfied with it, you can leave them as it is.
</OL>
<hr>
@@ -80,6 +110,7 @@ under the License.
Invoke the Ant script to populate the database.<br>
<code>$ ant -f run.xml load</code>
<hr>
+
<h2><A name="Run">Run OpenBooks</A></h2>
Invoke the Ant script to run OpenBooks<br>
<code>$ ant -f run.xml run</code>