123 lines
4.7 KiB
XML
123 lines
4.7 KiB
XML
<!-- $Id: build.xml 15105 2008-08-18 19:20:37Z hardy.ferentschik $ -->
|
|
<!--
|
|
Hibernate Entity Manager ANT build script.
|
|
-->
|
|
|
|
<project name="HibernateEntityManager" basedir=".">
|
|
|
|
<target name="generate-metamodel" depends="uptodate.check" unless="metamodel.build.notRequired">
|
|
<echo>Processing JPA annotations for metamodel generation</echo>
|
|
<mkdir dir="${target.dir}"/>
|
|
<javac srcdir="${src.dir}"
|
|
destdir="${target.dir}"
|
|
failonerror="false"
|
|
fork="true"
|
|
executable="${jdk16_home}/bin/javac"
|
|
target="1.5"
|
|
classpath="${classpath}">
|
|
<compilerarg value="-proc:only"/>
|
|
</javac>
|
|
<touch file="${target.dir}/.staleflag"/>
|
|
</target>
|
|
|
|
<target name="uptodate.check">
|
|
<uptodate property="metamodel.build.notRequired" targetfile="${target.dir}/.staleflag">
|
|
<srcfiles dir="${src.dir}" includes="**/*.java"/>
|
|
</uptodate>
|
|
</target>
|
|
|
|
<target name="packjar">
|
|
<property name="extension" value="jar"/>
|
|
<property name="packagename" value="${jarname}"/>
|
|
<property name="headerdirectory" value="."/>
|
|
<mkdir dir="${package.dir}"/>
|
|
<mkdir dir="${package.tmp.dir}/${headerdirectory}"/>
|
|
<copy todir="${package.tmp.dir}/${headerdirectory}">
|
|
<fileset dir="${classes.dir}">
|
|
<include name="**/test/pack/${packagename}/**.*"/>
|
|
</fileset>
|
|
</copy>
|
|
<jar destfile="${package.dir}/${jarname}.${extension}">
|
|
<fileset dir="${package.tmp.dir}">
|
|
<include name="**/*.*"/>
|
|
</fileset>
|
|
<fileset dir="${testresources.dir}/${jarname}">
|
|
<include name="**/*.*"/>
|
|
</fileset>
|
|
</jar>
|
|
<delete dir="${package.tmp.dir}"/>
|
|
</target>
|
|
|
|
<target name="packexploded">
|
|
<property name="extension" value="jar"/>
|
|
<mkdir dir="${package.dir}/${jarname}.${extension}"/>
|
|
<copy todir="${package.dir}/${jarname}.${extension}">
|
|
<fileset dir="${classes.dir}">
|
|
<include name="**/test/pack/${jarname}/**.*"/>
|
|
</fileset>
|
|
<fileset dir="${testresources.dir}/${jarname}">
|
|
<include name="**/*.*"/>
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="package" description="Prepare all needed jars and pars">
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="par"/>
|
|
<param name="jarname" value="defaultpar"/>
|
|
</antcall>
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="par"/>
|
|
<param name="jarname" value="defaultpar_1_0"/>
|
|
</antcall>
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="par"/>
|
|
<param name="jarname" value="space par"/>
|
|
<param name="packagename" value="spacepar"/>
|
|
</antcall>
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="par"/>
|
|
<param name="jarname" value="explicitpar"/>
|
|
</antcall>
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="par"/>
|
|
<param name="jarname" value="excludehbmpar"/>
|
|
</antcall>
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="jar"/>
|
|
<param name="jarname" value="externaljar"/>
|
|
</antcall>
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="par"/>
|
|
<param name="jarname" value="cfgxmlpar"/>
|
|
</antcall>
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="jar"/>
|
|
<param name="jarname" value="overridenpar"/>
|
|
</antcall>
|
|
|
|
<!-- nested jar -->
|
|
<jar destfile="${package.dir}/nestedjar.ear">
|
|
<fileset dir="${package.dir}">
|
|
<include name="defaultpar.par"/>
|
|
</fileset>
|
|
</jar>
|
|
<copy todir="${package.dir}/nesteddir.ear">
|
|
<fileset dir="${package.dir}">
|
|
<include name="defaultpar.par"/>
|
|
</fileset>
|
|
</copy>
|
|
|
|
<antcall target="packjar" inheritall="true">
|
|
<param name="extension" value="war"/>
|
|
<param name="jarname" value="war"/>
|
|
<param name="headerdirectory" value="WEB-INF/classes"/>
|
|
</antcall>
|
|
|
|
<antcall target="packexploded" inheritall="true">
|
|
<param name="extension" value="par"/>
|
|
<param name="jarname" value="explodedpar"/>
|
|
</antcall>
|
|
</target>
|
|
</project>
|