|
| 1 | +<project xmlns:ivy="antlib:org.apache.ivy.ant"> |
| 2 | + |
| 3 | + <property name="hibernate-tools.version" value="7.0.0.CR1"/> |
| 4 | + <property name="jdbc-driver.org" value="com.h2database"/> |
| 5 | + <property name="jdbc-driver.module" value="h2"/> |
| 6 | + <property name="jdbc-driver.version" value="2.3.232"/> |
| 7 | + |
| 8 | + <ivy:cachepath |
| 9 | + organisation="org.hibernate.tool" |
| 10 | + module="hibernate-tools-ant" |
| 11 | + revision="${hibernate-tools.version}" |
| 12 | + pathid="hibernate-tools.path" |
| 13 | + inline="true"/> |
| 14 | + <ivy:cachepath |
| 15 | + organisation="${jdbc-driver.org}" |
| 16 | + module="${jdbc-driver.module}" |
| 17 | + revision="${jdbc-driver.version}" |
| 18 | + pathid="jdbc-driver.path" |
| 19 | + inline="true"/> |
| 20 | + |
| 21 | + <path id="classpath"> |
| 22 | + <path refid="hibernate-tools.path"/> |
| 23 | + <path refid="jdbc-driver.path"/> |
| 24 | + </path> |
| 25 | + |
| 26 | + <taskdef |
| 27 | + name="hibernatetool" |
| 28 | + classname="org.hibernate.tool.ant.HibernateToolTask" |
| 29 | + classpathref="classpath" /> |
| 30 | + |
| 31 | + <target name="clean"> |
| 32 | + <delete dir="additional/classes"/> |
| 33 | + </target> |
| 34 | + |
| 35 | + <target name="compile" depends="clean"> |
| 36 | + <!-- Create the target folder 'additional/classes' --> |
| 37 | + <mkdir dir="additional/classes"/> |
| 38 | + <!-- Compile the custom exporter 'HelloExporter' --> |
| 39 | + <javac |
| 40 | + srcdir="additional/src" |
| 41 | + destdir="additional/classes" |
| 42 | + classpathref="classpath"/> |
| 43 | + </target> |
| 44 | + |
| 45 | + <target name="reveng" depends="compile"> |
| 46 | + <hibernatetool destdir="generated-sources"> |
| 47 | + <!-- The classpath to be used by the 'hibernatetool' task |
| 48 | + to look up additional classes or resources --> |
| 49 | + <classpath> |
| 50 | + <pathelement location="additional/classes"/> |
| 51 | + </classpath> |
| 52 | + <!-- Dummy configuration, as it is needed for any 'hibernatetool' task --> |
| 53 | + <configuration /> |
| 54 | + <!-- Custom exporter of class 'HelloExporter' to be found on the specified classpath --> |
| 55 | + <hbmtemplate exporterclass="HelloExporter"/> |
| 56 | + </hibernatetool> |
| 57 | + </target> |
| 58 | + |
| 59 | +</project> |
| 60 | + |
0 commit comments