使用Ant編譯Hadoop eclipse外掛程式

2021-09-01 09:38:16 字數 1523 閱讀 4498

將ant解壓至硬碟上,比如d:\ant

設定環境變數

ant_home = d:\ant

將%ant_home%\bin加入到path當中。

解壓hadoop的release。

進入%hadoop_home%\src\contrib\

編輯build-contrib.xml

加入將%hadoop_home%下的jar包拷到eclipse所在目錄的plugins目錄下,比如hadoop-core-*.jar

進入%hadoop_home%\src\contrib\eclipse-plugin

編輯build.xml在

中加入將compile模組中

deprecation="$

去掉。開啟cmd在%hadoop_home%\src\contrib\eclipse-plugin下使用ant

這時開始編譯。

jar: 

[echo] version:1.0.3 

[copy] copying 1 file to d:\hadoop-1.0.3\build\contrib\eclipse-plugin\lib 

[copy] copying d:\hadoop-1.0.3\build\ivy\lib\hadoop\common\commons-cli-1.2. 

jar to d:\hadoop-1.0.3\build\contrib\eclipse-plugin\lib\commons-cli-1.2.jar 

[jar] building jar: d:\hadoop-1.0.3\build\contrib\eclipse-plugin\hadoop-ec 

lipse-plugin-1.0.3.jar 

build successful 

total time: 2 seconds 

注意,在編譯的過程中可能會報錯,主要出在jar時的copy問題上,把commons-cli-1.2.

jar與拷到 %hadoop_home%\build\ivy\lib\hadoop\common\下,將hadoop-core-1.0.3.jar拷到%hadoop_home%\build下即可。

編譯成功後,會在 %hadoop_home%\build\contrib\eclipse-plugin\下生成hadoop-eclipse-plugin-1.0.3.jar。將其拷到eclipse所在目錄的plugins目錄下。重新開啟eclipse

選擇window-open perspective-other,會看到

選擇map/reduce

選擇window-show view-other

選擇map/reduce locaions

到這eclipse的hadoop外掛程式就編譯成功了。

使用ant編譯生成apk

使用eclipse建立的專案完成之後,可以使用ant自動編譯,但是使用ant debug的時候提示缺少檔案,此時可以參考android最新幫助文件使用命令來建立第乙個專案,建立之後就會生成乙個簡單的專案,然後將裡面所需要的檔案複製到自己的專案中之後再次進行編譯自己所要編譯的專案,就會得到編譯後的ap...

使用Ant來編譯Flex應用

在ant工程中,可以使用3種ant任務來編譯flex 使用ant來編譯flex應用,需要使用到flextasks.jar檔案,這個檔案在flex sdk的ant目錄中可以找到。使用ant編譯,需要把編譯的行為用xml檔案來描述,ant目錄中有乙個build.xml檔案可以參考。建立乙個資料夾test...

利器ant 2 ant 編譯 sipdroid

本篇部落格會繼續使用ant編譯android開源專案 sipdroid 1.sipdroid 專案介紹 2.編譯 修改sipdroid read only為sipdroid cd home mark workspace mpro android update project p sipdroid t...