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-12-25 19:29:08 +08:00
|
|
|
<property name="src-conf.dir" location="src-conf"/>
|
|
|
|
|
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-15 21:01:47 +08:00
|
|
|
<property name="module.service.xml" value="21cuba-core-service.xml"/>
|
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"/>
|
2009-01-19 21:03:18 +08:00
|
|
|
<fileset refid="jboss-embedded-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"/>
|
2009-01-11 14:24:30 +08:00
|
|
|
<fileset refid="chile-jars"/>
|
2008-11-05 19:04:44 +08:00
|
|
|
<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"/>
|
2009-01-11 14:24:30 +08:00
|
|
|
<!--<jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"/>-->
|
2008-11-05 19:04:44 +08:00
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2008-11-05 22:50:10 +08:00
|
|
|
<target name="build-module" depends="compile-module">
|
|
|
|
<echo>==> building ${project.dir} ${module.name}</echo>
|
2008-12-25 19:29:08 +08:00
|
|
|
|
2008-11-05 22:50:10 +08:00
|
|
|
<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-12-25 19:29:08 +08:00
|
|
|
|
2008-12-15 21:01:47 +08:00
|
|
|
<copy file="src-serv/${module.service.xml}" todir="${build.dir}"/>
|
|
|
|
<copy file="src-serv/${module.ds.xml}" todir="${build.dir}"/>
|
2008-12-25 19:29:08 +08:00
|
|
|
|
|
|
|
<mkdir dir="${build.dir}/conf"/>
|
|
|
|
<copy todir="${build.dir}/conf">
|
|
|
|
<fileset dir="src-conf" includes="**/*"/>
|
|
|
|
</copy>
|
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-15 21:01:47 +08:00
|
|
|
<copy file="${build.dir}/${module.service.xml}" todir="${jboss.deploy.dir}"/>
|
2008-12-04 23:26:53 +08:00
|
|
|
<copy file="${src-serv.dir}/${module.ds.xml}" todir="${jboss.deploy.dir}"/>
|
2008-12-25 19:29:08 +08:00
|
|
|
<copy todir="${jboss.dir}/server/default/conf">
|
|
|
|
<fileset dir="${build.dir}/conf" includes="**/*"/>
|
|
|
|
</copy>
|
2008-11-05 22:50:10 +08:00
|
|
|
</target>
|
|
|
|
|
2009-01-19 21:03:18 +08:00
|
|
|
<target name="deploy4test-module" depends="base-mod.deploy4test-module">
|
|
|
|
<copy file="${build.dir}/${module.global.jar}" todir="${jboss-embedded.deploy.dir}"/>
|
|
|
|
<copy file="${build.dir}/${module.service.xml}" todir="${jboss-embedded.deploy.dir}"/>
|
|
|
|
<copy file="${src-serv.dir}/${module.ds.xml}" todir="${jboss-embedded.deploy.dir}"/>
|
|
|
|
<copy todir="${jboss-embedded.dir}/bootstrap/conf">
|
|
|
|
<fileset dir="${build.dir}/conf" includes="**/*"/>
|
|
|
|
</copy>
|
|
|
|
</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-12-15 21:01:47 +08:00
|
|
|
<delete file="${jboss.dir}/server/default/deploy/${module.service.xml}"/>
|
2008-11-05 22:50:10 +08:00
|
|
|
</target>
|
|
|
|
|
2008-10-29 19:01:37 +08:00
|
|
|
</project>
|