cuba/modules/core/build.xml
Konstantin Krivopustov 9d4f28f634 - Create DB script
- Build scripts refactored
2008-11-07 11:56:23 +00:00

72 lines
2.7 KiB
XML

<?xml version="1.0"?>
<project xmlns:ext="http://haulmont.com/schema/ant"
name="cuba-core" default="build-module" basedir=".">
<property name="project.dir" location="../.."/>
<property name="root.dir" location="${project.dir}/.."/>
<property name="module.name" value="core"/>
<property name="module.jar" value="20-cuba-core.jar"/>
<property name="module.intf.jar" value="cuba-core-intf.jar"/>
<property name="module.test.jar" value="cuba-core-test.jar"/>
<import file="${root.dir}/build-inc-mod.xml"/>
<property file="${root.dir}/build.properties"/>
<fileset id="chile-jars" dir="${root.dir}/chile/build">
<include name="*.jar"/>
</fileset>
<path id="compile-cp">
<fileset refid="common-lib-fs"/>
<fileset refid="server-lib-fs"/>
<!--<fileset refid="chile-jars"/>-->
</path>
<path id="test-compile-cp">
<fileset refid="common-lib-fs"/>
<fileset refid="server-lib-fs"/>
<fileset refid="test-lib-fs"/>
<!--<fileset refid="chile-jars"/>-->
<pathelement location="${prod.out.dir}/${module.name}"/>
</path>
<path id="enhance-cp">
<fileset refid="common-lib-fs"/>
<fileset refid="server-lib-fs"/>
<pathelement location="${prod.out.dir}/${module.name}"/>
<pathelement location="${test.out.dir}/${module.name}"/>
</path>
<target name="compile-module" depends="base-mod.compile-module">
<echo>==> enhancing ${project.dir} ${module.name}</echo>
<java classpathref="enhance-cp"
classname="org.apache.openjpa.enhance.PCEnhancer" failonerror="true">
<arg value="-properties"/>
<arg value="META-INF/cuba-persistence.xml"/>
</java>
</target>
<target name="build-module" depends="compile-module">
<echo>==> building ${project.dir} ${module.name}</echo>
<mkdir dir="${build.dir}"/>
<jar basedir="${prod.out.dir}/${module.name}" destfile="${build.dir}/${module.jar}">
<exclude name="**/entity/*"/>
</jar>
<jar basedir="${prod.out.dir}/${module.name}" destfile="${build.dir}/${module.intf.jar}">
<include name="**/entity/*"/>
</jar>
<jar basedir="${test.out.dir}/${module.name}" destfile="${build.dir}/${module.test.jar}">
<include name="**/*"/>
</jar>
</target>
<target name="deploy-module" depends="base-mod.deploy-module">
<copy file="${build.dir}/${module.intf.jar}" todir="${jboss.dir}/server/default/deploy"/>
</target>
<target name="undeploy-module" depends="base-mod.undeploy-module">
<delete file="${jboss.dir}/server/default/deploy/${module.intf.jar}"/>
</target>
</project>