ANT编译打包
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <project basedir="." default="JAR_COMMONS_DREAM_LANG" name="commons-dream-lang"> <property name="COMMONS-DREAM-LANG-SRC.DIR" value="src" /> <property name="COMMONS-DREAM-LANG-CLASSES.DIR" value="build/classes" /> <property name="LIB_PATH" value="${basedir}/WebContent/WEB-INF/LIB" /> <property name="DEBUGLEVEL" value="source,lines,vars" /> <property name="TARGET" value="1.6" /> <property name="SOURCE" value="1.6" /> <property name="JAR_FILE" value="commons-dream-lang.jar" /> <property name="JAR_SRC_FILE" value="commons-dream-lang-src.jar" /> <path id="COMMONS-DREAM-LANG.CLASSPATH"> <fileset dir="${LIB_PATH}"> <include name="/**/*.jar" /> </fileset> </path> <target name="init"> <delete dir="${COMMONS-DREAM-LANG-CLASSES.DIR}" /> <delete file="${JAR_FILE}" /> <delete file="${JAR_SRC_FILE}" /> <mkdir dir="${COMMONS-DREAM-LANG-CLASSES.DIR}" /> </target> <target name="compile" depends="init"> <javac debuglevel="${DEBUGLEVEL}" destdir="${COMMONS-DREAM-LANG-CLASSES.DIR}" source="${SOURCE}" target="${TARGET}" includeantruntime="false" debug="true"> <compilerarg value="-Xlint:unchecked" /> <src path="${COMMONS-DREAM-LANG-SRC.DIR}" /> <classpath refid="COMMONS-DREAM-LANG.CLASSPATH" /> </javac> </target> <target name="jar" depends="compile"> <jar destfile="${JAR_FILE}" basedir="${COMMONS-DREAM-LANG-CLASSES.DIR}"> <manifest> <attribute name="Class-Path" value="${COMMONS-DREAM-LANG.CLASSPATH}" /> </manifest> </jar> </target> <target name="clean" depends="compile"> <delete dir="${COMMONS-DREAM-LANG-CLASSES.DIR}" /> </target> <target name="jar_src" depends="compile"> <jar destfile="${JAR_SRC_FILE}" basedir="${COMMONS-DREAM-LANG-SRC.DIR}" /> </target> <target name="JAR_COMMONS_DREAM_LANG" depends="init,compile,jar,jar_src,clean" /> </project>
相关推荐
EdwardSiCong 2020-11-23
yungpheng 2020-10-19
jipengx 2020-11-12
橄榄 2020-11-03
lyqdanang 2020-11-02
wservices 2020-10-30
onepiecedn 2020-10-29
数据人 2020-10-26
dfphoto 2020-10-16
hackerlpy 2020-09-07
tianyayi 2020-08-16
Dullonjiang 2020-08-15
fengling 2020-08-15
wordmhg 2020-08-06
guotiaotiao 2020-08-06
zhangsyi 2020-07-28
千锋 2020-07-27
ahnjwj 2020-07-28