强机制
新建build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="hibernatelazy" default="instrument" basedir=".">
<property name="lib.dir" value="./lib"/>
<property name="classes.dir" value="./classes"/>
<path id="lib.class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="instrument">
<taskdef name="instrument"
classname="org.hibernate.tool.instrument.InstrumentTask">
<classpath path="${classes.dir}"/>
<classpath refid="lib.class.path"/>
</taskdef>
<instrument verbose="true">
<fileset dir="${classes.dir}/com/derek/known/hbm">
<include name="Knownquestions.class"/>
</fileset>
</instrument>
</target>
</project>
注意:
<property name="lib.dir" value="./lib"/>所需的JAR文件路径
<property name="classes.dir" value="./classes"/>编译输出路径
本文出自 “我的java” 博客,请务必保留此出处http://lin646274404.blog.51cto.com/9553393/1636358
原文地址:http://lin646274404.blog.51cto.com/9553393/1636358