【java】tomcat 7源碼編譯及eclipse匯入

來源:互聯網
上載者:User

http://shengxichen.iteye.com/blog/994780

1. check out源碼,svn地址為: http://svn.apache.org/repos/asf/tomcat/trunk

2. 重新命名build.properties.default為build.properties

3. 建立一個目錄(比如G:/myFile/other/tomcat_compile_lib_base_path), 用於編譯tomcat依賴所需的jar存放

修改build.properties中的base.path為剛才建立的目錄:

base.path=G:/myFile/other/tomcat_compile_lib_base_path

///////////////我的具體實踐是這裡的base.path不要去改,否則有個地方可能出錯。不修改情況下,它會自己建立需要的目錄

4. 運行命令: ant ide-eclipse

如果發現找不到依賴的jar包, 比如geronimo-spec-jaxrpc-1.1-rc4.jar找不到的話, 

開啟http://www.findjar.com/index.x 尋找geronimo-spec-jaxrpc-1.1-rc4.jar, 並替換build.properties中老的loc地址, 如下:

jaxrpc-lib.loc=${base-maven.loc}/geronimo-spec/geronimo-spec-jaxrpc/${jaxrpc-lib.version}/geronimo-spec-jaxrpc-${jaxrpc-lib.version}.jar

替換成

jaxrpc-lib.loc=http://mirrors.ibiblio.org/pub/mirrors/maven/geronimo-spec/jars/geronimo-spec-jaxrpc-1.1-rc4.jar

///////////////////這裡我沒碰到需要修改的東西,直接ant ide-eclipse   就可以了

 

 

然後就能匯入eclipse啦, 同時在output\build的目下就是可以啟動並執行tomcat了,click bin\startup.bat 就能啟動;

去爽吧  :)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.