GeoServer學習手記(二):代碼下載及在Eclipse中載入

來源:互聯網
上載者:User

GeoServer學習手記(二):代碼下載及在Eclipse中載入

粟衛民http://www.gisdev.cn/ http://blog.csdn.net/suen/ 日期:2009-10-19

保留所有著作權。如需轉載,請聯絡作者,並在醒目位置註明出處

前面概述了GeoServer的功能(GeoServer學習手記(一):GeoServer概述,http://blog.csdn.net/suen/archive/2009/10/25/4726204.aspx),接下來我們慢慢來分析它的代碼。

分析代碼的第一步肯定是在IDE中開啟代碼,沒想到開啟GeoServer的代碼還有一點點複雜,所以先把這個介紹一下。

(1)  下載GeoServer代碼:

可以直接通過HTTP下載(http://geoserver.org/display/GEOS/Download),也可以使用SVN(svn co https://svn.codehaus.org/geoserver/branches/1.7.x geoserver_1.7.x)

(2)  使用Maven產生代碼:

cd geoserver_1.7.x/src

mvn clean install

這一步的時間比較長,因為Maven要連網下載java包,如果沒有產生成功也不用擔心,可反覆執行mvn install,它會重新下載沒有下載成功的包。

(3)  產生Eclipse工程檔案:

mvn eclipse:eclipse

(4)  在Eclipse中匯入模組:

a)    Run the Eclipse ide

b)    Open the Eclipse Preferences

c)    Navigate to Java, Build Path, Classpath Variables and click New...

 

 

d)    Create a classpath variable named “M2_REPO” and set the value to the location of the local Maven repository, and click `Ok

 

e)    Click Ok to apply the new Eclipse preferences

f)    Right-click in the Package Explorer and click Import...

 

g)    Select Existing Projects into Workspace and click Next

 

h)    Navigate to the geoserver_1.7.x/src directory

i)    Ensure all modules are selected and click Finish

 

 

(5)  在Eclipse中開啟代碼:

匯入已經存在的工作空間,使用Geoserver源碼目錄,選擇所有的模組,點擊完成即可。可看見cofig、data、geoserver-archetype-wfsoutputformat、gwc、main、ows、platform、rest、validation、wcs、wcs1_1、web、wfs、wfs11、wms等多個工程。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.