cuba/modules/core/build.xml

83 lines
3.2 KiB
XML
Raw Normal View History

2008-10-29 19:01:37 +08:00
<?xml version="1.0"?>
<project xmlns:ext="http://haulmont.com/schema/ant"
name="cuba-core" default="build-module" basedir=".">
2008-10-29 19:01:37 +08:00
<property name="project.dir" location="../.."/>
<property name="root.dir" location="${project.dir}/.."/>
2008-12-04 23:26:53 +08:00
<property name="src-serv.dir" location="src-serv"/>
2008-10-29 19:01:37 +08:00
<property name="module.name" value="core"/>
2008-12-04 13:28:29 +08:00
<property name="module.jar" value="20cuba-core.jar"/>
<property name="module.global.jar" value="cuba-core-global.jar"/>
2008-11-06 22:57:14 +08:00
<property name="module.test.jar" value="cuba-core-test.jar"/>
2008-12-04 23:26:53 +08:00
<property name="module.ds.xml" value="cuba-ds.xml"/>
2008-10-29 19:01:37 +08:00
<import file="${root.dir}/build-inc-mod.xml"/>
2008-10-29 19:01:37 +08:00
<property file="${root.dir}/build.properties"/>
<fileset id="chile-jars" dir="${root.dir}/chile/build">
<include name="*.jar"/>
</fileset>
2008-10-29 19:01:37 +08:00
<path id="compile-cp">
<fileset refid="common-lib-fs"/>
2008-10-31 13:26:14 +08:00
<fileset refid="server-lib-fs"/>
2008-12-10 17:39:56 +08:00
<fileset refid="chile-jars"/>
2008-10-29 19:01:37 +08:00
</path>
<path id="test-compile-cp">
<fileset refid="common-lib-fs"/>
2008-10-31 13:26:14 +08:00
<fileset refid="server-lib-fs"/>
<fileset refid="test-lib-fs"/>
2008-12-10 17:39:56 +08:00
<fileset refid="chile-jars"/>
<pathelement location="${prod.out.dir}/${module.name}"/>
2008-10-29 19:01:37 +08:00
</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>
2008-12-04 23:26:53 +08:00
<target name="clean-module" depends="base-mod.clean-module">
<delete file="${build.dir}/${module.global.jar}"/>
<delete file="${build.dir}/${module.test.jar}"/>
</target>
<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/*"/>
<exclude name="**/global/*"/>
</jar>
<jar basedir="${prod.out.dir}/${module.name}" destfile="${build.dir}/${module.global.jar}">
<include name="**/entity/*"/>
<include name="**/global/*"/>
</jar>
2008-11-06 22:57:14 +08:00
<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.global.jar}" todir="${jboss.dir}/server/default/deploy"/>
2008-12-04 23:26:53 +08:00
<copy file="${src-serv.dir}/${module.ds.xml}" todir="${jboss.deploy.dir}"/>
</target>
<target name="undeploy-module" depends="base-mod.undeploy-module">
<delete file="${jboss.dir}/server/default/deploy/${module.global.jar}"/>
</target>
2008-10-29 19:01:37 +08:00
</project>