You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ra...@apache.org on 2007/04/25 06:10:36 UTC

svn commit: r532183 - in /xmlbeans/trunk/samples/vxsdb: DdlUtils-1.0-RC1.jar build.xml external/ external/DdlUtils-1.0-RC1.jar run.xml src/java/org/apache/xmlbeans/samples/vxsdb/VelocityXmlBeansDB.java

Author: radup
Date: Tue Apr 24 21:10:35 2007
New Revision: 532183

URL: http://svn.apache.org/viewvc?view=rev&rev=532183
Log:
One more fix for the Velocity sample.

Added:
    xmlbeans/trunk/samples/vxsdb/external/
    xmlbeans/trunk/samples/vxsdb/external/DdlUtils-1.0-RC1.jar
      - copied unchanged from r532163, xmlbeans/trunk/samples/vxsdb/DdlUtils-1.0-RC1.jar
Removed:
    xmlbeans/trunk/samples/vxsdb/DdlUtils-1.0-RC1.jar
Modified:
    xmlbeans/trunk/samples/vxsdb/build.xml
    xmlbeans/trunk/samples/vxsdb/run.xml
    xmlbeans/trunk/samples/vxsdb/src/java/org/apache/xmlbeans/samples/vxsdb/VelocityXmlBeansDB.java

Modified: xmlbeans/trunk/samples/vxsdb/build.xml
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/samples/vxsdb/build.xml?view=diff&rev=532183&r1=532182&r2=532183
==============================================================================
--- xmlbeans/trunk/samples/vxsdb/build.xml (original)
+++ xmlbeans/trunk/samples/vxsdb/build.xml Tue Apr 24 21:10:35 2007
@@ -37,7 +37,7 @@
     </target>
 
     <target name="getdeps" unless="deps.exist" description="Download dependencies">
-        <get dest="lib/ant-1.6.2.jar" src="http://www.ibiblio.org/maven/ant/jars/ant-1.6.2.jar" verbose="true" usetimestamp="true" />
+        <!--get dest="lib/ant-1.6.2.jar" src="http://www.ibiblio.org/maven/ant/jars/ant-1.6.2.jar" verbose="true" usetimestamp="true" /-->
         <get dest="lib/commons-beanutils-1.7.0.jar" src="http://www.ibiblio.org/maven/commons-beanutils/jars/commons-beanutils-1.7.0.jar" verbose="true" usetimestamp="true" />
         <get dest="lib/commons-betwixt-0.8.jar" src="http://www.ibiblio.org/maven/commons-betwixt/jars/commons-betwixt-0.8.jar" verbose="true" usetimestamp="true" />
         <get dest="lib/commons-collections-3.1.jar" src="http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-3.1.jar" verbose="true" usetimestamp="true" />
@@ -48,7 +48,7 @@
         <get dest="lib/commons-lang-2.1.jar" src="http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-2.1.jar" verbose="true" usetimestamp="true" />
         <!-- Update this, using a alternative location because it does not exist on ibiblio
         <get dest="lib/DdlUtils-1.0-dev.jar" src="http://www.ibiblio.org/maven/ddlutils/jars/DdlUtils-1.0-dev.jar" verbose="true" usetimestamp="true" /> -->
-        <copy todir="lib" file="DdlUtils-1.0-RC1.jar" />
+        <copy todir="lib" file="external/DdlUtils-1.0-RC1.jar" />
         <get dest="lib/derby-10.1.1.0.jar" src="http://www.ibiblio.org/maven/org.apache.derby/jars/derby-10.1.1.0.jar" verbose="true" usetimestamp="true" />
         <get dest="lib/dom4j-1.4.jar" src="http://www.ibiblio.org/maven/dom4j/jars/dom4j-1.4.jar" verbose="true" usetimestamp="true" />
         <get dest="lib/log4j-1.2.8.jar" src="http://www.ibiblio.org/maven/log4j/jars/log4j-1.2.8.jar" verbose="true" usetimestamp="true" />

Modified: xmlbeans/trunk/samples/vxsdb/run.xml
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/samples/vxsdb/run.xml?view=diff&rev=532183&r1=532182&r2=532183
==============================================================================
--- xmlbeans/trunk/samples/vxsdb/run.xml (original)
+++ xmlbeans/trunk/samples/vxsdb/run.xml Tue Apr 24 21:10:35 2007
@@ -30,7 +30,6 @@
 
     <path id="vxsdb.runtime.classpath">
         <pathelement path="build" />
-        <pathelement location="lib/ant-1.6.2.jar" />
         <pathelement location="lib/commons-collections-3.1.jar" />
         <pathelement location="lib/commons-lang-2.1.jar" />
         <pathelement location="lib/commons-logging-1.0.3.jar" />
@@ -61,16 +60,7 @@
         <vxsdb schema="${schema}" template="${template}" output="${output}" />
     </target>
 
-    <target name="runjava" depends="init" description="Run the sample code">
-        <!-- VelocityXmlBeans Task -->
-        <java classname="org.apache.xmlbeans.samples.vxsdb.VelocityXmlBeansDB" fork="yes" failonerror="yes" classpathref="vxsdb.runtime.classpath">
-            <arg value="${template}" />
-            <arg value="${output}" />
-            <arg value="${schema}" />
-        </java>
-    </target>
-
-    <target name="create-db-sql" depends="runjava" description="Create an sql script (DDL) from the xml datamodel">
+    <target name="create-db-sql" depends="run" description="Create an sql script (DDL) from the xml datamodel">
         <!-- DDLUtils Task-->
         <taskdef name="ddl" classname="org.apache.ddlutils.task.DdlToDatabaseTask" description="The task used to create a ddl from the datamodel xml." classpathref="commons-sql.runtime.classpath" />
         <ddl schemaFile="${output}" databaseType="${targetDatabase}">

Modified: xmlbeans/trunk/samples/vxsdb/src/java/org/apache/xmlbeans/samples/vxsdb/VelocityXmlBeansDB.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/samples/vxsdb/src/java/org/apache/xmlbeans/samples/vxsdb/VelocityXmlBeansDB.java?view=diff&rev=532183&r1=532182&r2=532183
==============================================================================
--- xmlbeans/trunk/samples/vxsdb/src/java/org/apache/xmlbeans/samples/vxsdb/VelocityXmlBeansDB.java (original)
+++ xmlbeans/trunk/samples/vxsdb/src/java/org/apache/xmlbeans/samples/vxsdb/VelocityXmlBeansDB.java Tue Apr 24 21:10:35 2007
@@ -103,8 +103,9 @@
             // Create Schema Type System
             log.info("Using the xml schema, " + this.schema);
             schemaTypeSystem = XmlBeans.compileXsd(
-                    new XmlObject[] { XmlObject.Factory.parse(new File(
-                            this.schema)) }, XmlBeans.getBuiltinTypeSystem(),
+                    new XmlObject[] { XmlBeans.typeLoaderForClassLoader(this.getClass().getClassLoader()).
+                            parse(new File(this.schema), null, null) },
+					XmlBeans.getBuiltinTypeSystem(),
                     null);
 
             // Place SchemaTypeSystem in the Velocity Context



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org