You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by to...@apache.org on 2006/01/30 00:03:54 UTC

svn commit: r373381 - /db/ddlutils/trunk/dump-metadata.xml

Author: tomdz
Date: Sun Jan 29 15:03:46 2006
New Revision: 373381

URL: http://svn.apache.org/viewcvs?rev=373381&view=rev
Log:
Added sample Ant 'build' file for using the dump metadata task

Added:
    db/ddlutils/trunk/dump-metadata.xml

Added: db/ddlutils/trunk/dump-metadata.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/dump-metadata.xml?rev=373381&view=auto
==============================================================================
--- db/ddlutils/trunk/dump-metadata.xml (added)
+++ db/ddlutils/trunk/dump-metadata.xml Sun Jan 29 15:03:46 2006
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/* Copyright 2002-2004 Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+-->
+
+<project default="dump-metadata"
+	     name="DdlUtils"
+	     basedir=".">
+  <!-- Allow values set at the commandline or in the environment to override the defaults -->
+  <property environment="env"/>
+  <!-- Load the jdbc properties as specified by the jdbc.properties.file variable-->
+  <property file="${jdbc.properties.file}"/>
+  <!-- Load the build properties -->
+  <property file="build.properties"/>
+
+  <!-- These properties can be overriden on the commandline using -D --> 
+  <property name="outputfile" value="metadata.xml"/>
+  <property name="tabletypes" value="TABLE"/>
+  <property name="catalogpattern" value=""/>
+  <property name="schemapattern" value=""/>
+  <property name="tablepattern" value=""/>
+  <property name="columnpattern" value=""/>
+  <property name="procedurepattern" value=""/>
+  <property name="dumptables" value="true"/>
+  <property name="dumpprocedures" value="true"/>
+  
+  <!-- The classpath used for running the dump task -->
+  <path id="project-classpath">
+    <fileset dir="${lib.dir}">
+        <include name="**/*.jar"/>
+        <include name="**/*.zip"/>
+    </fileset>
+    <pathelement path="${build.java.dir}"/>
+  </path>
+
+  <taskdef classname="org.apache.ddlutils.task.DumpMetadataTask"
+           name="dumpMetadata"
+           classpathref="project-classpath" />
+	
+  <target name="dump-metadata"
+          description="Dumps the metadata using the connection properties from the file specified via the jdbc.properties.file environment variable">
+    <dumpMetadata outputfile="${outputfile}"
+                  tabletypes="${tabletypes}"
+                  catalogpattern="${catalogpattern}"
+                  schemapattern="${schemapattern}"
+                  tablepattern="${tablepattern}"
+                  columnpattern="${columnpattern}"
+                  procedurepattern="${procedurepattern}"
+                  dumptables="${dumptables}"
+                  dumpprocedures="${dumpprocedures}">
+      <database driverclassname="${datasource.driverClassName}"
+                url="${datasource.url}"
+                username="${datasource.username}"
+                password="${datasource.password}"/> 
+    </dumpMetadata> 
+  </target> 
+</project>