Ant生成javadoc

build.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<!-- 需要修改 Begin --> 
<project name="project" default="all" basedir=".">
	<property name="project-name" value="a1"/>
	<property name="lib" value="../webroot/web-inf/lib"/> <!-- lib-->
	<property name="tomcat-root" value="D:/Program Files/Tomcat 6.0"/><!-- tomcat根目录 -->
<!-- 需要修改 End -->

	<target description="Build file usage info (default task)" name="all">
		<echo message="  Available Targets:"/>
		<echo message="-------------------------------------------------------"/>
		<echo message="  javadoc    - Generate the API HTML pages"/>
		<echo message="-------------------------------------------------------"/>
	</target>
    <!-- Generate the API HTML pages -->
    <target name="javadoc" description="Generate the Javadoc HTML pages.">
        <delete dir="../javadoc" />
        <mkdir dir="../javadoc" />
        <javadoc destdir="../javadoc" 
				 windowtitle="${project-name} Project Class Library"
                 use="yes"
                 linksource="no"
                 splitindex="yes"
				 encoding="UTF-8" docencoding="UTF-8">
			<classpath>
				<fileset dir="${lib}">
					<include name="*.jar"/>
				 </fileset>
				<fileset dir="${tomcat-root}/lib">
					<include name="*.jar"/>
				 </fileset>
			</classpath>
			<!-- 需要修改 Begin -->
            <packageset dir="../src" defaultexcludes="yes">
                <include name="com/wealth/**"/>
            </packageset>
			<!-- 需要修改 End -->
        </javadoc>
    </target>

</project>

 

 javadoc.bat

@echo off
echo ##############################################
echo #  生成 API 文档,按回车键开始               #
echo ##############################################
set /p var=
ant javadoc

 

 

你可能感兴趣的:(html,tomcat,xml,Web,ant)