notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2627 - development/laboratory/spells/derbyant/demo
- From: peter AT neubauer.se
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2627 - development/laboratory/spells/derbyant/demo
- Date: Thu, 19 May 2005 13:11:04 +0000
Author: peter AT neubauer.se
Date: Thu May 19 13:09:52 2005
New Revision: 2627
Added:
development/laboratory/spells/derbyant/demo/
development/laboratory/spells/derbyant/demo/build.xml
Log:
adding the demo project
Added: development/laboratory/spells/derbyant/demo/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/spells/derbyant/demo/build.xml Thu May 19
13:09:52 2005
@@ -0,0 +1,54 @@
+<project name="dpml-derbyant-demo" default="demo"
+ xmlns:transit="antlib:net.dpml.transit"
+ xmlns:derby="plugin:dpml/derbyant/dpml-derbyant#SNAPSHOT"
+ xmlns:x="plugin:dpml/magic/dpml-magic-core">
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="demo" depends="init">
+ <property name="DBURL" value="jdbc:derby:my/test;create=true" />
+ <property name="DRIVER" value="org.apache.derby.jdbc.EmbeddedDriver" />
+ <property name="USERID" value="" />
+ <property name="PASSWORD" value="" />
+ <property name="TEST" value="testing" />
+
+ <derby:startDerby />
+
+ <!-- This is the default Ant sql task -->
+ <sql driver="${DRIVER}"
+ url="${DBURL}"
+ userid="${USERID}"
+ password="${PASSWORD}"
+ autocommit="yes"
+ onerror="continue"
+ caching="yes">
+ DROP TABLE TEST;
+ CREATE TABLE TEST (pkey int not null generated always as
+ identity (start with 1, increment by 1), firstfield char(10),
+ secondfield int);
+ INSERT INTO TEST (firstfield, secondfield) VALUES ('${TEST}', 10);
+ SELECT * FROM TEST;
+ </sql>
+
+ <!-- The SQL Command will leave the Derby database is a started state.
+ To protect the integrity of the database, we should explicitly
+ stop the database -->
+ <derby:stopDatabase url="${DBURL}" />
+
+ <!-- Use the dblook tool to generate DDL for the tables -->
+ <!--ddlExport url="${DBURL}" dest="tables.sql" verbose="yes" /-->
+
+ <!-- Package the DB up for read-only distribution -->
+ <jar destfile="db.jar" >
+ <fileset dir=".">
+ <include name="my/**/*" />
+ </fileset>
+ </jar>
+
+ <!-- Shutdown Derby properly. This should be done every time,
+ but only when you're absolutely done using Derby -->
+ <derby:stopDerby />
+
+ </target>
+
+</project>
- svn commit: r2627 - development/laboratory/spells/derbyant/demo, peter, 05/19/2005
Archive powered by MHonArc 2.6.24.