答案:<project name="gis" default="compile" basedir="..">
<description>
for tt
</description>
<!-- set global properties for this build -->
<property name="src" location="${basedir}/src"/>
<property name="build" location="${basedir}/build"/>
<property name="classes" location="${build}/classes"/>
<property name="lib" location="${basedir}/lib"/>
<property name="preverified" location="${build}/preverified"/>
<property name="bin" location="${basedir}/bin"/>
<property name="dist" location="${build}/dist"/>
<property name="javadoc" location="${basedir}/javadoc"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<mkdir dir="${classes}"/>
</target>
<target name="compile" depends="init" description="compile the source " >
<javac srcdir="${src}"
destdir="${classes}"
bootclasspath="${lib}"
target="1.1"
/>
</target>
<target name="preverify" depends="compile">
<mkdir dir="${preverified}"/>
<exec executable="${bin}/preverify">
<arg line="-classpath ${lib}"/>
<arg line="-d ${preverified}"/>
<arg line="${classes}"/>
</exec>
</target>
<target name="dist" depends="preverify">
<mkdir dir="${dist}"/>
<jar basedir="${preverified}"
jarfile="${dist}/GoldGIS.jar"
manifest="${build}/MANIFEST.MF"
>
<fileset dir="res"/>
</jar>
<!--
<copy file="${basedir}/GoldGIS.jad"
tofile="${dist}/GoldGIS.jad"/>
-->
</target>
<target name="run" depends="dist">
<exec executable="${bin}/midp">
<arg line="-classpath ${dist}/GoldGIS.jar"/>
<arg line="com.gistt.GisMIDlet" />
</exec>
</target>
<target name="doc" depends="dist">
<mkdir dir="${javadoc}"/>
<javadoc
destdir="${javadoc}"
windowtitle="GoldGIS API"
Bootclasspath = "${lib}"
classpath = "${classes}"
Private = "true"
>
<fileset dir="${src}" defaultexcludes="yes">
<include name="**/*.java" />
</fileset>
<doctitle><![CDATA][<h1>GoldGIS</h1>]]></doctitle>
<bottom><![CDATA][<i>Copyright © 2002 jigsaw. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
<target name="clean" description="clean up" >
<delete dir="${classes}"/>
<delete dir="${preverified}"/>
<delete dir="${dist}"/>
<delete dir="${javadoc}" />
</target>
</project>
上一个:Java的封装功能
下一个:正确地封装Java类