build.xml generate自动生成代码 build 文件 ibatis 3.0

<project default="genfiles" basedir=".">
<property name="generated.source.dir" value="${basedir}" />

<!-- =================================
          target: init             
         ================================= -->
    <target name="init">
        <mkdir dir="${generated.source.dir}/src/com/zte/iag/report/persistence"/>
    </target>

<!-- =================================
          target: clear             
         ================================= -->
    <target name="clear">
        <delete dir="src/com" />
    </target>


<target name="genfiles" depends="clear,init" description="Generate the files">
<taskdef name="mbgenerator" classname="org.mybatis.generator.ant.GeneratorAntTask" classpath="lib/mybatis-generator-core-1.3.1.jar" />
<mbgenerator overwrite="true" configfile="generatorConfig.xml" verbose="false">
<propertyset>
<propertyref name="generated.source.dir" />
</propertyset>
</mbgenerator>
</target>
</project>

你可能感兴趣的:(build.xml)