You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/10/18 17:28:57 UTC

svn commit: r1023849 - in /tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store: README build.xml store-db/build.xml store-eu/build.xml store-supplier/build.xml

Author: nash
Date: Mon Oct 18 15:28:57 2010
New Revision: 1023849

URL: http://svn.apache.org/viewvc?rev=1023849&view=rev
Log:
TUSCANY-3730: Add "ant setup" command to create database files needed by store tutorial

Modified:
    tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/README
    tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/build.xml
    tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-db/build.xml
    tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-eu/build.xml
    tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-supplier/build.xml

Modified: tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/README
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/README?rev=1023849&r1=1023848&r2=1023849&view=diff
==============================================================================
--- tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/README (original)
+++ tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/README Mon Oct 18 15:28:57 2010
@@ -2,7 +2,7 @@ Store Tutorial
 ==============
 
 This tutorial that shows how to use SCA and Tuscany to build multiple
-variations of an online Store application. The variations demostrate the
+variations of an online Store application. The variations demonstrate the
 evolution of the Store as it goes through the following stages:
 
 1 - Initial online fruit store
@@ -17,7 +17,18 @@ For diagrams of the scenarios covered he
 Running The Tutorial Application
 --------------------------------
 
-First start the SCA Domain Manager:
+If you're running the Store tutorial application for the first time since
+downloading the Tuscany SCA Java binary distribution, you need to start by
+running a setup step from the top-level store directory:
+
+   cd store
+   ant setup
+
+You only need to do this once. It creates some database files that are used
+by the tutorial application. If you forget to do it, you'll get errors when
+running some of the scenarios.
+
+Next, start the SCA Domain Manager:
 
    cd domain
    ant run
@@ -160,6 +171,9 @@ The store itself can be found at 
 
    http://localhost:8102/ui/
 
+If you see an error at this stage, this probably means you haven't done the
+database setup mentioned in the section "Running The Tutorial Application".
+
 This looks the same as the scenario 2 store but this time a database is used
 for storing items put into the shopping cart. When you add items you 
 will see messages on the console indicating that items are added to the
@@ -315,8 +329,11 @@ Building the Store Tutorial Using Ant
 With the binary distribution the complete store tutorial can be built using Ant
 as follows:
 
-cd store
-ant compile
+   cd store
+   ant compile
+
+This also creates the database files that were mentioned in the section
+"Running The Tutorial Application".
 
 
 Building the Store Tutorial Using Maven 
@@ -324,5 +341,8 @@ Building the Store Tutorial Using Maven 
 With either the binary or source distribution the complete store tutorial can
 be built using Maven as follows:
 
-cd store
-mvn
+   cd store
+   mvn
+
+This also creates the database files that were mentioned in the section
+"Running The Tutorial Application".

Modified: tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/build.xml?rev=1023849&r1=1023848&r2=1023849&view=diff
==============================================================================
--- tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/build.xml (original)
+++ tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/build.xml Mon Oct 18 15:28:57 2010
@@ -31,6 +31,12 @@
         </antcall>
     </target>
 
+    <target name="setup">
+        <ant dir="store-db" target="create-db"/>
+        <ant dir="store-eu" target="create-db"/>
+        <ant dir="store-supplier" target="create-db"/>
+    </target>
+
     <target name="allsubdirs">
         <ant dir="domain" target="${target}"/>
         <ant dir="assets" target="${target}"/>

Modified: tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-db/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-db/build.xml?rev=1023849&r1=1023848&r2=1023849&view=diff
==============================================================================
--- tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-db/build.xml (original)
+++ tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-db/build.xml Mon Oct 18 15:28:57 2010
@@ -28,7 +28,10 @@
             <manifest>
             </manifest>
         </jar>
+        <antcall target="create-db"/>
+    </target>
 
+    <target name="create-db">
         <!--
            Create the example database.
         -->

Modified: tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-eu/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-eu/build.xml?rev=1023849&r1=1023848&r2=1023849&view=diff
==============================================================================
--- tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-eu/build.xml (original)
+++ tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-eu/build.xml Mon Oct 18 15:28:57 2010
@@ -28,7 +28,10 @@
             <manifest>
             </manifest>
         </jar>
+        <antcall target="create-db"/>
+    </target>
 
+    <target name="create-db">
         <!--
            Create the example database.
         -->

Modified: tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-supplier/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-supplier/build.xml?rev=1023849&r1=1023848&r2=1023849&view=diff
==============================================================================
--- tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-supplier/build.xml (original)
+++ tuscany/sca-java-1.x/branches/sca-java-1.6.1/tutorials/store/store-supplier/build.xml Mon Oct 18 15:28:57 2010
@@ -28,7 +28,10 @@
             <manifest>
             </manifest>
         </jar>
+        <antcall target="create-db"/>
+    </target>
 
+    <target name="create-db">
         <!--
            Create the example database.  This database is needed by the unit test
            in ../store-test.