2008-10-29 19:01:37 +08:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<project xmlns:ext="http://haulmont.com/schema/ant"
|
2008-11-07 19:56:23 +08:00
|
|
|
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"/>
|
2008-12-02 20:34:25 +08:00
|
|
|
<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
|
|
|
|
2008-11-07 19:56:23 +08:00
|
|
|
<import file="${root.dir}/build-inc-mod.xml"/>
|
2008-10-29 19:01:37 +08:00
|
|
|
<property file="${root.dir}/build.properties"/>
|
|
|
|
|
2008-10-31 23:06:24 +08:00
|
|
|
<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"/>
|
2008-11-05 22:50:10 +08:00
|
|
|
<fileset refid="test-lib-fs"/>
|
2008-12-10 17:39:56 +08:00
|
|
|
<fileset refid="chile-jars"/>
|
2008-11-05 22:50:10 +08:00
|
|
|
<pathelement location="${prod.out.dir}/${module.name}"/>
|
2008-10-29 19:01:37 +08:00
|
|
|
</path>
|
|
|
|
|
2008-11-05 19:04:44 +08:00
|
|
|
<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>
|
|
|
|
|
2008-11-07 19:56:23 +08:00
|
|
|
<target name="compile-module" depends="base-mod.compile-module">
|
2008-11-05 19:04:44 +08:00
|
|
|
<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>
|
|
|
|
|
2008-11-05 22:50:10 +08:00
|
|
|
<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/*"/>
|
2008-12-02 20:34:25 +08:00
|
|
|
<exclude name="**/global/*"/>
|
2008-11-05 22:50:10 +08:00
|
|
|
</jar>
|
2008-12-02 20:34:25 +08:00
|
|
|
<jar basedir="${prod.out.dir}/${module.name}" destfile="${build.dir}/${module.global.jar}">
|
2008-11-05 22:50:10 +08:00
|
|
|
<include name="**/entity/*"/>
|
2008-12-02 20:34:25 +08:00
|
|
|
<include name="**/global/*"/>
|
2008-11-05 22:50:10 +08:00
|
|
|
</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>
|
2008-11-05 22:50:10 +08:00
|
|
|
</target>
|
|
|
|
|
2008-11-07 19:56:23 +08:00
|
|
|
<target name="deploy-module" depends="base-mod.deploy-module">
|
2008-12-02 20:34:25 +08:00
|
|
|
<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}"/>
|
2008-11-05 22:50:10 +08:00
|
|
|
</target>
|
|
|
|
|
2008-11-07 19:56:23 +08:00
|
|
|
<target name="undeploy-module" depends="base-mod.undeploy-module">
|
2008-12-02 20:34:25 +08:00
|
|
|
<delete file="${jboss.dir}/server/default/deploy/${module.global.jar}"/>
|
2008-11-05 22:50:10 +08:00
|
|
|
</target>
|
|
|
|
|
2008-10-29 19:01:37 +08:00
|
|
|
</project>
|