mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 12:17:41 +08:00
111 lines
4.6 KiB
XML
111 lines
4.6 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="src-serv.dir" location="src-serv"/>
|
|
<property name="src-conf.dir" location="src-conf"/>
|
|
|
|
<property name="module.name" value="core"/>
|
|
<property name="module.jar" value="20cuba-core.jar"/>
|
|
<property name="module.global.jar" value="cuba-core-global.jar"/>
|
|
<property name="module.test.jar" value="cuba-core-test.jar"/>
|
|
<property name="module.service.xml" value="21cuba-core-service.xml"/>
|
|
<property name="module.ds.xml" value="cuba-ds.xml"/>
|
|
|
|
<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="jboss-embedded-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"/>
|
|
<fileset refid="chile-jars"/>
|
|
<pathelement location="${prod.out.dir}/${module.name}"/>
|
|
<pathelement location="${test.out.dir}/${module.name}"/>
|
|
</path>
|
|
|
|
<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"/>
|
|
<!--<jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"/>-->
|
|
</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>
|
|
<jar basedir="${test.out.dir}/${module.name}" destfile="${build.dir}/${module.test.jar}">
|
|
<include name="**/*"/>
|
|
</jar>
|
|
|
|
<copy file="src-serv/${module.service.xml}" todir="${build.dir}"/>
|
|
<copy file="src-serv/${module.ds.xml}" todir="${build.dir}"/>
|
|
|
|
<mkdir dir="${build.dir}/conf"/>
|
|
<copy todir="${build.dir}/conf">
|
|
<fileset dir="src-conf" includes="**/*"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="deploy-module" depends="base-mod.deploy-module">
|
|
<copy file="${build.dir}/${module.global.jar}" todir="${jboss.dir}/server/default/deploy"/>
|
|
<copy file="${build.dir}/${module.service.xml}" todir="${jboss.deploy.dir}"/>
|
|
<copy file="${src-serv.dir}/${module.ds.xml}" todir="${jboss.deploy.dir}"/>
|
|
<copy todir="${jboss.dir}/server/default/conf">
|
|
<fileset dir="${build.dir}/conf" includes="**/*"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<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>
|
|
|
|
<target name="undeploy-module" depends="base-mod.undeploy-module">
|
|
<delete file="${jboss.dir}/server/default/deploy/${module.global.jar}"/>
|
|
<delete file="${jboss.dir}/server/default/deploy/${module.service.xml}"/>
|
|
</target>
|
|
|
|
</project> |