ant 學習筆記11

2021-04-13 11:02:26 字數 528 閱讀 6255

我的專案目錄結構:

test--

---src

---webroot

---build.xml

build.xml檔案:

<?xml version="1.0"?>

執行build.xml的方法:

ant使用當前目錄下的build.xml執行ant,執行預設的target。

ant -buildfile test.xml

使用當前目錄下的test.xml執行ant,執行預設的target。

ant -buildfile test.xml dist

使用當前目錄下的test.xml執行ant,執行乙個叫做dist的target。

ant -buildfile test.xml -dbuild=build/classes dist

使用當前目錄下的test.xml執行ant,執行乙個叫做dist的target,並設定build屬性的值為build/classes。

獲得ant幫助的方法:

ant -help

ant學習筆記

這樣我們在dos當前目錄下輸入這樣ant命令就完成了拷貝檔案的工作 五.如何編寫buildfile 1.project.每個buildfile含有乙個project 2.project有下面的屬性 name 專案名稱.default 當沒有指定target時使用的預設target yes based...

ant學習筆記 taskdef

1 宣告task jar包中指定的task classname com.oopsconsultancy.xmltask.ant.xmltask classpath xmltask.jar 然後,就可以使用當前目錄下,xmltask.jar包中,提供的com.oopsconsultancy.xmlta...

學習筆記 Eclispe執行ant

eclipse 內建的 ant 支援可讓外掛程式依程式的方式執行 ant 建置檔。透過併入在.eclipse.ant.core外掛程式中的 antrunner 類別來完成 import eclipse.ant.core.antrunner import eclipse.core.runtime.ip...