国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

Apache Ant 初步體驗(小記)

2019-11-18 11:34:48
字體:
來源:轉載
供稿:網友

很早就聽說了apache 的這個開源工具,聽人說配置繁瑣,功能一般,一直沒愛好嘗試,因為現在著迷Eclipse IDE,里面內置了ant,愛屋及烏吧,我想以Eclipse的名氣和品質,ant也是很好用的吧

1,先下載一個ant1.6,不會Http://ant.apache.org最近上不去了,可以到網上找一下本地下載

2 apache-ant-1.6.2-bin.zip解壓 有一個Bib目錄 把windows下的path指到這里

3.cmd進入控制臺,輸入ant -h   回車 看到幫助信息

4.在當前目錄下建一個test.java文件

5 建一個build.xml文件

<PRoject name="MyProject" default="dist" basedir=".">

<!-- set global properties for this build -->
<property name="src" value="."/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>

<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build Directory strUCture used by compile -->
<mkdir dir="${build}"/>
</target>

<target name="compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>

<target name="dist" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
</target>

<target name="clean">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>

</project>


6.然后 ant  回車,成功了

從編譯到打成jar包,一氣合成,真爽!

然后進入Eclipse ,對以前的項目小用了一下,真方便,再也不用修改文件后每次打開WinRAR,ctrL+C Ctrl+V了

那個build.xml文件是看別人的,里面有些門道,繼續研究中。。。

參考文章:

http://www.matrix.org.cn/resource/article/0/518.Html



發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 娄烦县| 荆门市| 襄樊市| 蛟河市| 余江县| 台湾省| 汉源县| 环江| 崇义县| 桂林市| 盖州市| 体育| 合肥市| 逊克县| 温州市| 南城县| 乌海市| 建瓯市| 中超| 榕江县| 平乡县| 信阳市| 阿巴嘎旗| 崇阳县| 宜丰县| 汨罗市| 镇宁| 榆树市| 洮南市| 浑源县| 清徐县| 五家渠市| 万载县| 长乐市| 武平县| 广安市| 容城县| 临安市| 商南县| 手游| 天峨县|