blob: 60053c0f9c8f0c57c43300dc9e80bd7be4a03848 [file] [log] [blame]
<?xml version="1.0"?>
<project default="default">
<property name="source.dir" location="../../plugins/org.eclipse.app4mc.amalthea.model" />
<property name="target.dir" location="help-model" />
<property name="ecore.dir" value="${target.dir}/ecore" />
<property name="xcore.dir" value="${target.dir}/xcore" />
<property name="ecore.archive" value="${target.dir}/ecore-definitions.zip" />
<property name="xml.dir" value="${target.dir}/xml" />
<property name="xml-xsd.dir" value="${target.dir}/xml-schema" />
<property name="xml-xsd-xmi.dir" value="${target.dir}/xml-schema-xmi" />
<property name="xml.archive" value="${target.dir}/xml-definitions.zip" />
<target name="default">
<antcall target="deleteModelDir" />
<antcall target="createModelDir" />
<antcall target="copyModelEcore" />
<antcall target="copyModelXML" />
<antcall target="zip" />
</target>
<target name="deleteModelDir">
<delete dir="${target.dir}"/>
</target>
<target name="createModelDir">
<mkdir dir="${target.dir}"/>
<mkdir dir="${ecore.dir}"/>
<mkdir dir="${xcore.dir}"/>
<mkdir dir="${xml.dir}"/>
<mkdir dir="${xml-xsd.dir}"/>
<mkdir dir="${xml-xsd-xmi.dir}"/>
</target>
<target name="copyModelEcore">
<!-- Copy the xcore files -->
<copy todir="${xcore.dir}" flatten="true">
<fileset dir = "${source.dir}/model" includes="*.xcore"/>
<!-- Rename to preclude some stupid xcore builders to start -->
<globmapper from="*" to="*.bak"/>
</copy>
<!-- Copy the ecore files -->
<copy todir="${ecore.dir}" flatten="true">
<fileset dir = "${source.dir}/model-gen" includes="ecore/*"/>
</copy>
</target>
<target name="copyModelXML">
<!-- Copy xml and xsd files -->
<copy todir="${xml.dir}" flatten="true">
<fileset dir = "${source.dir}/model-gen" includes="xml/*.xml"/>
</copy>
<copy todir="${xml-xsd.dir}" flatten="true">
<fileset dir = "${source.dir}/model-gen" includes="xml-schema/*.xsd"/>
</copy>
<copy todir="${xml-xsd-xmi.dir}" flatten="true">
<fileset dir = "${source.dir}/model-gen" includes="xml-schema-xmi/*.xsd"/>
</copy>
</target>
<target name="zip">
<zip destfile="${ecore.archive}" basedir="${target.dir}" includes="ecore/*, xcore/*"/>
<zip destfile="${xml.archive}" basedir="${target.dir}" includes="xml/*, xml-schema/*, xml-schema-xmi/*"/>
</target>
</project>