Author: bryanche
Date: Mon Mar  7 14:44:58 2005
New Revision: 156461

URL: http://svn.apache.org/viewcvs?view=rev&rev=156461
Log:
This adds ant targets for generating jar files containing
xmlbeans-compiled schemas.  Developers using IDEs that don't support
XMLBeans can use these targets to generate jar files for adding to their
IDE classpath in order to work on Beehive.

This addresses http://issues.apache.org/jira/browse/BEEHIVE-147


Added:
    incubator/beehive/trunk/netui/ant/build-schema.xml   (with props)
    incubator/beehive/trunk/wsm/build-schema.xml   (with props)

Added: incubator/beehive/trunk/netui/ant/build-schema.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/ant/build-schema.xml?view=auto&rev=156461
==============================================================================
--- incubator/beehive/trunk/netui/ant/build-schema.xml (added)
+++ incubator/beehive/trunk/netui/ant/build-schema.xml Mon Mar  7 14:44:58 2005
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+
+<project name="Beehive/NetUI/Schema Build" default="build" basedir=".">
+    <import file="../../beehive-imports.xml"/>
+    <property file="netui.properties"/>
+
+    <property name="netui.ant.dir" location="${beehive.home}/netui/ant"/>
+    <property name="netui.src.dir" location="${beehive.home}/netui/src"/>
+    <property name="schema.jar" 
location="${beehive.home}/netui/netui-schema.jar"/>
+    <property name="schema.build.dir" 
location="${beehive.home}/netui/build-schema"/>
+
+    <target name="build" depends="build-schemas, make-jar" />
+
+    <target name="build-schemas">
+        <!-- the compiler module has schemas in two locations -->
+        <antcall target="build-schema">
+            <param name="module.name" value="compiler"/>
+            <param name="module.schema.dir" 
value="${netui.src.dir}/compiler/schema/struts-config"/>
+        </antcall>
+        <antcall target="build-schema">
+            <param name="module.name" value="compiler"/>
+            <param name="module.schema.dir" 
value="${netui.src.dir}/compiler/schema/struts-validator"/>
+        </antcall>
+
+        <antcall target="build-schema">
+            <param name="module.name" value="util"/>
+            <param name="module.schema.dir" 
value="${netui.src.dir}/util/schema"/>
+        </antcall>
+
+        <antcall target="build-schema">
+            <param name="module.name" value="util"/>
+            <param name="module.schema.dir" 
value="${netui.src.dir}/pageflow/schema"/>
+        </antcall>
+
+        <antcall target="build-schema">
+            <param name="module.name" value="testRecorder"/>
+            <param name="module.schema.dir" 
value="${netui.src.dir}/testRecorder/schema"/>
+        </antcall>
+    </target>
+
+    <target name="build-schema">
+        <echo>compile module: ${module.name}</echo>
+        <echo>compile schema dir: ${module.schema.dir}</echo>
+
+        <mkdir dir="${schema.build.dir}"/>
+
+        <!-- run the XMLBean compiler for the webapp schema -->
+        <ant antfile="${netui.ant.dir}/xmlBean.xml">
+            <property name="xsd.root.dir" value="${module.schema.dir}"/>
+            <property name="class.output.dir" value="${schema.build.dir}"/>
+            <property name="xbean.inputs" 
value="${netui.src.dir}/${module}/schema/*.xsd*"/>
+            <property name="xbean.output" value="${schema.jar}"/>
+        </ant>
+    </target>
+
+   <target name="make-jar">
+        <jar jarfile="${schema.jar}" basedir="${schema.build.dir}"/>
+   </target>
+
+    <target name="clean">
+        <delete dir="${schema.build.dir}"/>
+        <delete file="${schema.jar}"/>
+    </target>
+
+</project>
+
+
+

Propchange: incubator/beehive/trunk/netui/ant/build-schema.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/wsm/build-schema.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/build-schema.xml?view=auto&rev=156461
==============================================================================
--- incubator/beehive/trunk/wsm/build-schema.xml (added)
+++ incubator/beehive/trunk/wsm/build-schema.xml Mon Mar  7 14:44:58 2005
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<project name="Beehive/WSM/Schema Build" default="build" basedir=".">
+    <import file="../beehive-imports.xml"/>
+
+    <property name="xsd.schema.dir" location="src/runtime/schema" />
+    <property name="schema.jar" location="${beehive.home}/wsm/wsm-schema.jar"/>
+    <property name="schema.build.dir" 
location="${beehive.home}/wsm/build-schema"/>
+
+
+    <target name="build" depends="build-schema, make-jar" />
+
+    <target name="build-schema">
+        <echo message="generate"/>
+        <build-xbean schemaDir="${xsd.schema.dir}" 
classgenDir="${schema.build.dir}"/>
+    </target>
+
+   <target name="make-jar">
+        <jar jarfile="${schema.jar}" basedir="${schema.build.dir}"/>
+   </target>
+
+    <target name="clean">
+        <delete dir="${schema.build.dir}"/>
+        <delete file="${schema.jar}"/>
+    </target>
+
+</project>
+
+
+

Propchange: incubator/beehive/trunk/wsm/build-schema.xml
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to