Build. XML source code:


      
<project name="jerryjsp" basedir="." default="build">
   <property name="src.dir" value="src"/>
   <property name="web.dir" value="WebContent"/>
   <property name="build.dir" value="${web.dir}/WEB-INF/classes"/>
   <property name="name" value="jerryjsp"/>

   <path id="master-classpath">
      <fileset dir="${web.dir}/WEB-INF/lib">
         <include name="*.jar"/>
      </fileset>
    	<fileset dir="C: / MyApp/apache tomcat -- 9.0.29 / lib">
   	         <include name="*.jar"/>
   	      </fileset>
      <pathelement path="${build.dir}"/>
   </path>

   <target name="build" description="Compile source tree java files">
      <mkdir dir="${build.dir}"/>
      <javac destdir="${build.dir}" source="1.8" target="1.8">
         <src path="${src.dir}"/>
         <classpath refid="master-classpath"/>
      </javac>
   </target>

   <target name="clean" description="Clean output directories">
      <delete>
         <fileset dir="${build.dir}">
            <include name="**/*.class"/>
         </fileset>
      </delete>
   </target>
	
	<target name = "generate-javadoc">
	   <javadoc packagenames="action.*" sourcepath="${src.dir}" 
	      destdir = "doc" version = "true" windowtitle = "Jerry Application">

	      <doctitle><! [CDATA[= Jerrt Application =]]></doctitle>

	      <bottom><! [CDATA[Copyright © 2020. JerryAll Rights Reserved.]]></bottom>

	      <group title = "action" packages = "action.*"/>
	   </javadoc>

	   <echo message = "java doc has been generated!" />
	</target>
	
</project>
Copy the code

Run ant generate-Javadoc:

The generated doc folder contains the following contents:





For more of Jerry’s original articles, please follow the public account “Wang Zixi “: