Hi,
I'm trying to modify build-hbm2java.xml file, which came with middlegen-hibernate plugin, so that I can specify the output folder. Specifying output folder can be done using --output option from commandline but I would like to do the same thing using Ant. What I did so far is I've added output option for java task but I got Access denied error. Does anyone know how to solve my problem?
Code:
<target name="compile"
description="Compiles hbm files to src directory."
depends="clean">
<mkdir dir="${src.dir}"/>
<!--
<java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" fork="true" output="${src.dir}">
-->
<java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" fork="true" >
<classpath>
<fileset dir="${hibernate.lib.dir}\context">
<include name="**/*.jar" />
</fileset>
<fileset dir="${hibernate.lib.dir}\global">
<include name="**/*.jar" />
</fileset>
</classpath>
<!-- Mapping Files -->
<!--
<arg value="${mapping.files}"/>
-->
<arg value="${hbm.dir}/Flight.hbm.xml"/>
<arg value="${hbm.dir}/Reservation.hbm.xml"/>
<arg value="${hbm.dir}/Person.hbm.xml"/>
</java>
</target>