Compiling Spring Rich and the Petclinic Sample Application

Now that you have the latest source code for Spring Rich, you can build the framework by building the alljars and the sandboxjar targets (see Listing B-2).

Listing B-2: Building Spring Rich

image from book
   [ in spring-rcp-c directory ] ant alljars    [output from ant] ant sandboxjar    [output from ant]
image from book

Building these targets produces the spring-richclient.jar, the spring-richclientresources.jar, the spring-richclient-sandbox.jar, and the spring-richclient-src.zip files in the dist directory.

If you want to build the Petclinic sample application, you need to make a few changes to the samples/petclinic/build.xml [1.7] file, as shown in Listing B-3.

Listing B-3: Petclinic build.xml File

image from book
<?xml version="1.0"?> <project name="petclinic-rich" basedir="." default="usage">     <property file="build.properties" />     <property file="project.properties" />     <target name="build-standalone">         <jar jarfile="${dist.dir}/petclinic-standalone.jar">             <manifest>                 <attribute name="Main-Class"                     value=¿                        "org.springframework.richclient.samples.petclinic.¿                         PetClinicStandalone" />                 <attribute name="Class-Path"                            value="lib/acegi-security.jar      lib/aopalliance.jar lib/burlap.jar      lib/commons-codec.jar lib/commons-logging.jar lib/concurrent.jar      lib/forms.jar lib/hessian.jar lib/hsqldb.jar      lib/looks.jar lib/spring.jar lib/spring-sandbox.jar lib/spring-petclinic.jar      lib/spring-richclient.jar lib/spring-richclient-sandbox.jar      lib/spring-richclient-resources.jar" />             </manifest>         </jar>     </target> </project> 
image from book

Once the application is built, you should have the petclinic-standalone.jar and the petclinic-clientserver.jar files in the dist directory. Now run the standalone version by executing java -jar petclinic-standalone.jar in the dist directory, which starts the Petclinic sample using the HSQL database implementation. Use user name scott and password wombat to log in. Figure B-2 shows the main window of the Petclinic sample.

image from book
Figure B-2: Running the Petclinic application



Pro Spring
Pro Spring
ISBN: 1590594614
EAN: 2147483647
Year: 2006
Pages: 189

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net