Ant????Java??????1?
???????????? ???????[ 2014/5/19 13:17:03 ] ????????java Ant????
????Ant??????????javac??java??jar???????????java????????????????????????Java?????????????????????????
????1.project???
????project?????Ant??????????????Ant?????????????e??????project????????????????????project????£?????????target????????????????????project??????????
????1??name????
???????????project?????????
????2??default????
???????????project???????????е?target???????
????3??basedir????
?????????????·????λ?á???????????????????Ant???????????????????????
????2.target???
???????Ant???????е????????????????????????????????target???????????????????????????????
????1??name????
???????target?????????????????????project??????????????????????target????????????????target??
????2??depends????
????????????target???????????????????target???????????????????“??”????Ant??????depends??????target??????????????????target??????????target??????С?
????3??if????
???????????????????????????????????????target????????С?
????4??unless????
????????????????if??????????????????????????????????????????????????????target??????С?
????5??description????
???????????????target??????????????????
????3.property???
????????????????????????????壬project????????????property??????趨???????Ant????趨???????????????????????build.properties???????????????????????????<property file=” build.properties”/>
????property????????task???????????task???????????????????“${”??“}”?????????task???????λ?????????
????Ant?????Щ??????????????????????????б???Java?????System.getPropertis()?????????????????
????????Ant???????Щ???????????????????£?
????basedir??project??????·???????????????project???????????????????????
????ant.file??buildfile??·?????????????????У?ant.file????E:"build.xml??
????ant.version??Ant??汾????????У???1.7.0??
????ant.project.name??????????project?????????????????project??name????????
????ant.java.version??Ant?????JDK??汾???????????н???п?????1.5??
??????????????????????
????1.????Ant??javac??????????java????
????????build.xml???????????£?
<?xml version="1.0"?>
<project name="javacTest" default="compile" basedir=".">
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes"/>
</target>
</project>
|
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11