Java2HTML改造手记(续)

来源:互联网 发布:lrtimelapse windows 编辑:程序博客网 时间:2024/04/29 10:30

刚刚才想起来Java2HTML是一个Ant扩展.

打开Java2htmltask.java添加以下方法:

public void setEncoding(String strEncoding){

    O05.setEncoding(strEncoding);

}

ant中就可以使用了.

<!--build the online java code-->

    <taskdef name="java2html" classname="com.java2html.Java2HTMLTask" />

    <target name="javacode" depends="javadoc">

        <copy todir="${temp.dir}">

       

            <fileset dir="${src.dir}"/>

       

        </copy>

        <java2html title="${project.name} Source Code Online View (${project.version})"

            simple="no"

            tabsize="4"

            marginsize="2"

            header="true"

            footer="true"

            encoding="${project.encoding}"

            destination="${web.code.dir}">

            <fileset dir="${temp.dir}">

                <include name="**/*.java" />

            </fileset>

            <javadoc localRef="${web.doc.dir}" />

        </java2html>

    </target>

版权归iBeyond(http://www.ibeyond.org)所有,转载请著名出处并保留版权信息.可以通过email和我联系(csdn@ibeyond.org)

原创粉丝点击