国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
ant實(shí)踐——3、運(yùn)行ANT
運(yùn)行Ant非常簡(jiǎn)單,當(dāng)你正確地安裝Ant后,只要輸入ant就可以了。

沒有指定任何參數(shù)時(shí),Ant會(huì)在當(dāng)前目錄下查詢build.xml文件。如果找到了就用該文件作為buildfile。如果你用 -find 選項(xiàng)。Ant就會(huì)在上級(jí)目錄中尋找buildfile,直至到達(dá)文件系統(tǒng)的根。要想讓Ant使用其他的buildfile,可以用參數(shù) -buildfile file,這里file指定了你想使用的buildfile。

你也可以設(shè)定一些屬性,以覆蓋buildfile中指定的屬性值(參看property task)??梢杂?-Dproperty=value 選項(xiàng),這里property是指屬性的名稱,而value則是指屬性的值。也可以用這種辦法來(lái)指定一些環(huán)境變量的值。你也可以用property task來(lái)存取環(huán)境變量。只要將 -DMYVAR=%MYVAR% (Windows)-DMYVAR=$MYVAR (Unix) 傳遞給Ant -你就可以在你的buildfile中用${MYVAR}來(lái)存取這些環(huán)境變量。

還有兩個(gè)選項(xiàng) -quite,告訴Ant運(yùn)行時(shí)只輸出少量的必要信息。而 -verbose,告訴Ant運(yùn)行時(shí)要輸出更多的信息。

可以指定執(zhí)行一個(gè)或多個(gè)target。當(dāng)省略target時(shí),Ant使用標(biāo)簽<project>的default屬性所指定的target。

如果有的話,-projecthelp 選項(xiàng)輸出項(xiàng)目的描述信息和項(xiàng)目target的列表。先列出那些有描述的,然后是沒有描述的target。

命令行選項(xiàng)總結(jié):
ant [options] [target [target2 [target3] ...]]
Options:
-help print this message
-projecthelp print project help information
-version print the version information and exit
-quiet be extra quiet
-verbose be extra verbose
-debug print debugging information
-emacs produce logging information without adornments
-logfile file use given file for log output
-logger classname the class that is to perform logging
-listener classname add an instance of class as a project listener
-buildfile file use specified buildfile
-find file search for buildfile towards the root of the filesystem and use the first one found
-Dproperty=value set property to value
例子
ant
使用當(dāng)前目錄下的build.xml運(yùn)行Ant,執(zhí)行缺省的target。
ant -buildfile test.xml
使用當(dāng)前目錄下的test.xml運(yùn)行Ant,執(zhí)行缺省的target。
ant -buildfile test.xml dist
使用當(dāng)前目錄下的test.xml運(yùn)行Ant,執(zhí)行一個(gè)叫做dist的target。
ant -buildfile test.xml -Dbuild=build/classes dist
使用當(dāng)前目錄下的test.xml運(yùn)行Ant,執(zhí)行一個(gè)叫做dist的target,并設(shè)定build屬性的值為build/classes。

文件


在Unix上,Ant的執(zhí)行腳本在做任何事之前都會(huì)source(讀并計(jì)算值)~/.antrc 文件;在Windows上,Ant的批處理文件會(huì)在開始時(shí)調(diào)用%HOME%\antrc_pre.bat,在結(jié)束時(shí)調(diào)用%HOME%\antrc_post.bat。你可以用這些文件配置或取消一些只有在運(yùn)行Ant時(shí)才需要的環(huán)境變量??聪旅娴睦?。

環(huán)境變量

包裹腳本(wrapper scripts)使用下面的環(huán)境變量(如果有的話):
  • JAVACMD Java可執(zhí)行文件的絕對(duì)路徑。用這個(gè)值可以指定一個(gè)不同于JAVA_HOME/bin/java(.exe)的JVM。
  • ANT_OPTS 傳遞給JVM的命令行變量-例如,你可以定義屬性或設(shè)定Java堆的最大值
手工運(yùn)行Ant

如果你自己動(dòng)手安裝(DIY)Ant,你可以用下面的命令啟動(dòng)Ant:
java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]
這個(gè)命令與前面的ant命令一樣。選項(xiàng)和target也和用ant命令時(shí)一樣。這個(gè)例子假定你的CLASSPATH包含:
  • ant.jar
  • jars/classes for your XML parser
  • the JDK‘s required jar/zip files
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
ant實(shí)踐
ANT介紹及安裝及配置
Java基礎(chǔ)系列之三:Apache Ant入門示例
Ant簡(jiǎn)介
Ant入門-配置和使用
Apache Ant使用指南(轉(zhuǎn)載)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服