GeoServer学习手记(二):代码下载及在Eclipse中加载

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等多个工程。


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/suen/archive/2009/10/25/4726733.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值