eclipse中建geoserver源码
概述:本文讲述的是在eclipse中如何构建geoserver源码工程,其中涉及到了jdk,github,marven等。
1、安装git
从(http://git-scm.com/download/win),获得Git-1.9.0-preview2014021 7.exe文件,直接安装即可。安装成功后,在任何处所右击鼠标,出现如下图所示:
2、从git中签出geoserver源码
点击“Git GUI”将呈现如下界面,选择“克隆已有版本”,进入源码克隆界面,输入响应的source Location(源码地点地位git://github.com/geoserver/geoserver.git) 和 Target Location(本地存储地位)。
克隆已有版本
输入参数
克隆完成后,源代码的组织如下:
3、下载并配置Maven
(http://maven.apache.org/download.cgi)选择apache-maven-3.21-bin.zip,maven是号令行法度,将获得的紧缩包解压,解压后文件组织如下:
并添加D:\software\java\web\maven\bin到path变量中。
4、通过maven构建源码
4.1 跳转路径到geoserver的src目录下
- C:\Users\Administrator>d:
- D:\>cd D:\opengis\opengis\src
- D:\opengis\opengis\src>
4.2 临时将maven的路径添加至环境变量中
执行如下命令:
- Set PATH = “maven_dir/bin”;%PATH%
4.3 构建工程
执行如下命令,构建工程:
- mvn clean install
- mvn -DskipTests clean install
注意:第一条号令在构建的同时履行测试用例测试类文件,在号令履行过程中有可能会呈现错误;第二条号令在构建时,不进行测试,不会有测试不经由过程的异常。
执行命令输出:
- [INFO] ------------------------------------------------------------------------
- [INFO] Reactor Summary:
- [INFO]
- [INFO] GeoServer ......................................... SUCCESS [ 5.916 s]
- [INFO] Core Platform Module .............................. SUCCESS [ 5.763 s]
- [INFO] Open Web Service Module ........................... SUCCESS [ 6.644 s]
- [INFO] Main Module ....................................... SUCCESS [01:15 min]
- [INFO] GeoServer Security Modules ........................ SUCCESS [ 0.607 s]
- [INFO] GeoServer JDBC Security Module .................... SUCCESS [ 8.048 s]
- [INFO] GeoServer LDAP Security Module .................... SUCCESS [ 8.002 s]
- [INFO] Web Coverage Service Module ....................... SUCCESS [ 3.605 s]
- [INFO] Web Coverage Service 1.0 Module ................... SUCCESS [ 6.524 s]
- [INFO] Web Coverage Service 1.1 Module ................... SUCCESS [ 10.715 s]
- [INFO] Web Coverage Service 2.0 Module ................... SUCCESS [ 13.674 s]
- [INFO] Web Feature Service Module ........................ SUCCESS [ 18.692 s]
- [INFO] Web Map Service Module ............................ SUCCESS [03:41 min]
- [INFO] KML support for GeoServer ......................... SUCCESS [01:17 min]
- [INFO] GeoWebCache (GWC) Module .......................... SUCCESS [03:34 min]
- [INFO] REST Support Module ............................... SUCCESS [ 3.981 s]
- [INFO] REST Configuration Service Module ................. SUCCESS [01:23 min]
- [INFO] GeoServer Web Modules ............................. SUCCESS [ 0.162 s]
- [INFO] Core UI Module .................................... SUCCESS [02:46 min]
- [INFO] WMS UI Module ..................................... SUCCESS [ 5.256 s]
- [INFO] GWC UI Module ..................................... SUCCESS [ 10.776 s]
- [INFO] WFS UI Module ..................................... SUCCESS [ 3.262 s]
- [INFO] Demoes Module ..................................... SUCCESS [01:08 min]
- [INFO] WCS UI Module ..................................... SUCCESS [ 4.632 s]
- [INFO] Security UI Modules ............................... SUCCESS [ 0.155 s]
- [INFO] Security UI Core Module ........................... SUCCESS [ 7.840 s]
- [INFO] Security UI JDBC Module ........................... SUCCESS [ 4.315 s]
- [INFO] Security UI LDAP Module ........................... SUCCESS [ 12.600 s]
- [INFO] GeoServer Web Application ......................... SUCCESS [01:42 min]
- [INFO] Community Space ................................... SUCCESS [ 7.778 s]
- [INFO] GeoServer Extensions .............................. SUCCESS [ 0.226 s]
- [INFO] ------------------------------------------------------------------------
- [INFO] BUILD SUCCESS
- [INFO] ------------------------------------------------------------------------
- [INFO] Total time: 19:21 min
- [INFO] Finished at: 2014-03-05T16:52:55+08:00
- [INFO] Final Memory: 188M/368M
- [INFO] ------------------------------------------------------------------------
4.4 通过maven创建eclipse工程文件
执行命令:
- mvn eclipse:eclipse
执行结果如下:
- [INFO] ------------------------------------------------------------------------
- [INFO] Reactor Summary:
- [INFO]
- [INFO] GeoServer ......................................... SUCCESS [ 10.022 s]
- [INFO] Core Platform Module .............................. SUCCESS [ 6.761 s]
- [INFO] Open Web Service Module ........................... SUCCESS [ 4.690 s]
- [INFO] Main Module ....................................... SUCCESS [ 8.291 s]
- [INFO] GeoServer Security Modules ........................ SUCCESS [ 0.041 s]
- [INFO] GeoServer JDBC Security Module .................... SUCCESS [ 0.759 s]
- [INFO] GeoServer LDAP Security Module .................... SUCCESS [ 1.313 s]
- [INFO] Web Coverage Service Module ....................... SUCCESS [ 0.299 s]
- [INFO] Web Coverage Service 1.0 Module ................... SUCCESS [ 1.545 s]
- [INFO] Web Coverage Service 1.1 Module ................... SUCCESS [ 4.898 s]
- [INFO] Web Coverage Service 2.0 Module ................... SUCCESS [ 0.354 s]
- [INFO] Web Feature Service Module ........................ SUCCESS [ 0.502 s]
- [INFO] Web Map Service Module ............................ SUCCESS [ 3.534 s]
- [INFO] KML support for GeoServer ......................... SUCCESS [ 1.063 s]
- [INFO] GeoWebCache (GWC) Module .......................... SUCCESS [ 9.024 s]
- [INFO] REST Support Module ............................... SUCCESS [ 0.285 s]
- [INFO] REST Configuration Service Module ................. SUCCESS [ 0.484 s]
- [INFO] GeoServer Web Modules ............................. SUCCESS [ 0.032 s]
- [INFO] Core UI Module .................................... SUCCESS [ 0.922 s]
- [INFO] WMS UI Module ..................................... SUCCESS [ 0.338 s]
- [INFO] GWC UI Module ..................................... SUCCESS [ 1.009 s]
- [INFO] WFS UI Module ..................................... SUCCESS [ 0.274 s]
- [INFO] Demoes Module ..................................... SUCCESS [ 0.408 s]
- [INFO] WCS UI Module ..................................... SUCCESS [ 0.604 s]
- [INFO] Security UI Modules ............................... SUCCESS [ 0.033 s]
- [INFO] Security UI Core Module ........................... SUCCESS [ 0.319 s]
- [INFO] Security UI JDBC Module ........................... SUCCESS [ 0.331 s]
- [INFO] Security UI LDAP Module ........................... SUCCESS [ 0.401 s]
- [INFO] GeoServer Web Application ......................... SUCCESS [ 0.595 s]
- [INFO] Community Space ................................... SUCCESS [ 0.032 s]
- [INFO] GeoServer Extensions .............................. SUCCESS [ 0.030 s]
- [INFO] ------------------------------------------------------------------------
- [INFO] BUILD SUCCESS
- [INFO] ------------------------------------------------------------------------
- [INFO] Total time: 01:09 min
- [INFO] Finished at: 2014-03-05T17:06:55+08:00
- [INFO] Final Memory: 119M/447M
- [INFO] ------------------------------------------------------------------------
- D:\Technology\Learnning\open_gis\geoserver\geoserver_dev\project\geoserver20140305\src>
5、将工程导入eclipse并运行
5.1 添加Classpath Variables
打开eclipse,选择window下的preference,在对话框中选择java->buildpath->Classpath Variables,点击“new”将本地的maven repository路径作为classpath变量添加至工作空间中。
5.2 导入工程
在eclipse中点击 “file”选择“import”将创建的eclipse导入至eclipse中。
import
存在的工程
选择geoserver/src文件夹
导入后,布局如下:
5.3 运行
运行start.java
Console中呈现如下记录:
- log4j:WARN File option not set for appender [geoserverlogfile].
- log4j:WARN Are you using FileAppender instead of ConsoleAppender?
- 三月 05, 2014 9:31:37 下午 org.geoserver.platform.GeoServerExtensions checkContext
- 警告: Extension lookup occured, but ApplicationContext is unset.
- 05 三月 21:31:37 INFO [geoserver.global] -
- ----------------------------------
- - GEOSERVER_DATA_DIR: D:\Technology\Learnning\open_gis\geoserver\geoserver_dev\project\geoserver20140305\src\web\app\src\main\webapp\data
- ----------------------------------
- 05 三月 21:31:38 INFO [org.geoserver] - Loaded style ""line""
- 05 三月 21:31:38 INFO [org.geoserver] - Loaded style ""point""
- 05 三月 21:31:38 INFO [org.geoserver] - Loaded style ""polygon""
- 05 三月 21:31:38 INFO [org.geoserver] - Loaded style ""raster""
- 05 三月 21:31:38 INFO [org.geoserver] - Loaded default workspace it.geosolutions
- 05 三月 21:31:38 INFO [org.geoserver] - Loaded workspace ""it.geosolutions""
- 05 三月 21:31:38 INFO [org.geoserver] - Loaded workspace ""topp""
- 05 三月 21:31:38 INFO [storage.DefaultStorageFinder] - ************************************************************************************************************
- 05 三月 21:31:38 INFO [storage.DefaultStorageFinder] - *** Found System environment variable TEMP set to C:\Users\smartmap\AppData
- \Local\Temp, using it as the default prefix. ***
- 05 三月 21:31:38 INFO [storage.DefaultStorageFinder] - *************************************************************************************************************
- 05 三月 21:31:38 INFO [config.XMLConfiguration] - Will look for geowebcache.xml in ""C:\Users\smartmap\AppData\Local\Temp\geowebcache""
- 05 三月 21:31:38 INFO [gwc.layer] - Initializing GWC configuration based on GeoServer""s Catalog
- 05 三月 21:31:38 INFO [gwc.layer] - GeoServer TileLayer store base directory is: D:\Technology\Learnning\open_gis\geoserver\geoserver_dev\project\geoserver20140305\src\web\app\src\main\webapp\data\gwc-layers
- 05 三月 21:31:38 INFO [gwc.layer] - Loading tile layers D:\Technology\Learnning\open_gis\geoserver\geoserver_dev\project\geoserver20140305\src\web\app\src\main\webapp\data\gwc-layers
- 05 三月 21:31:38 INFO [gwc.layer] - GWC configuration based on GeoServer""s Catalog loaded successfuly
- 05 三月 21:31:38 INFO [layer.TileLayerDispatcher] - Configuration GeoServer Catalog Configuration contained no layers.
- 05 三月 21:31:38 INFO [config.XMLConfiguration] - Found configuration file in C:\Users\smartmap\AppData\Local\Temp\geowebcache
- 05 三月 21:31:38 WARN [config.XMLConfiguration] - *******************************************************************
- 05 三月 21:31:38 WARN [config.XMLConfiguration] - *** GWC configuration validation error: cvc-elt.1: 找不到元素 ""gwcConfiguration"" 的声明。
- 05 三月 21:31:38 WARN [config.XMLConfiguration] - *** Will try to use configuration anyway. Please check the order of declared
- elements against the schema.
- 05 三月 21:31:38 WARN [config.XMLConfiguration] - ************************************************************
- 05 三月 21:31:38 INFO [config.XMLConfiguration] - Initializing GridSets C:\Users\smartmap\AppData\Local\Temp\geowebcache
- 05 三月 21:31:38 INFO [config.XMLConfiguration] - Initializing layers C:\Users\smartmap\AppData\Local\Temp\geowebcache
- 05 三月 21:31:38 INFO [layer.TileLayerDispatcher] - Configuration C:\Users\smartmap\AppData\Local\Temp\geowebcache contained no layers.
- 05 三月 21:31:39 INFO [diskquota.ConfigLoader] - DiskQuota configuration not found: C:\Users\smartmap\AppData\Local\Temp\geowebcache
- \geowebcache-diskquota.xml
- 05 三月 21:31:39 INFO [diskquota.ConfigLoader] - DiskQuota configuration not found: C:\Users\smartmap\AppData\Local\Temp\geowebcache
- \geowebcache-diskquota.xml
- 05 三月 21:31:39 INFO [diskquota.DiskQuotaMonitor] - Setting up disk quota periodic enforcement task
- 05 三月 21:31:39 INFO [diskquota.DiskQuotaMonitor] - 0 layers configured with their own quotas.
- 05 三月 21:31:39 INFO [diskquota.DiskQuotaMonitor] - 0 layers attached to global quota 500.0 MB
- 05 三月 21:31:39 INFO [diskquota.DiskQuotaMonitor] - Disk quota periodic enforcement task set up every 10 SECONDS
- 05 三月 21:31:39 INFO [org.geoserver] - Loaded service ""wfs"", enabled
- 05 三月 21:31:39 INFO [org.geoserver] - Loaded service ""wms"", enabled
- 05 三月 21:31:39 INFO [org.geoserver] - Loaded service ""wcs"", enabled
- 05 三月 21:31:39 INFO [gwc.config] - Initializing GeoServer specific GWC configuration gwc-gs.xml
- 05 三月 21:31:39 INFO [ows.OWSHandlerMapping] - Mapped URL path [/gwc/service/**] onto handler ""dispatcher""
- 05 三月 21:31:39 INFO [geowebcache.GeoWebCacheDispatcher] - Invoked setServletPrefix(gwc)
- 05 三月 21:31:39 INFO [georss.GeoRSSPoller] - Initializing GeoRSS poller in a background job...
- 05 三月 21:31:39 INFO [georss.GeoRSSPoller] - No enabled GeoRSS feeds found, poller will not run.
- 05 三月 21:31:40 INFO [rest.RESTDispatcher] - Created RESTDispatcher with 14 paths
- 05 三月 21:31:40 INFO [wms.WMSService] - Will NOT recombine tiles for non-tiling clients.
- 05 三月 21:31:40 INFO [wms.WMSService] - Will proxy requests to backend that are not getmap or getcapabilities.
- 05 三月 21:31:40 INFO [ows.OWSHandlerMapping] - Mapped URL path [/ows/**] onto handler ""dispatcher""
- 05 三月 21:31:40 INFO [ows.OWSHandlerMapping] - Mapped URL path [/ows] onto handler ""dispatcher""
- 05 三月 21:31:40 INFO [org.geoserver] - GeoServer configuration lock is enabled
- 05 三月 21:31:41 INFO [ows.OWSHandlerMapping] - Mapped URL path [/wfs/*] onto handler ""dispatcher""
- 05 三月 21:31:41 INFO [ows.OWSHandlerMapping] - Mapped URL path [/TestWfsPost] onto handler ""wfsTestServlet""
- 05 三月 21:31:41 INFO [ows.OWSHandlerMapping] - Mapped URL path [/wfs] onto handler ""dispatcher""
- 05 三月 21:31:45 INFO [ows.OWSHandlerMapping] - Mapped URL path [/wms/*] onto handler ""dispatcher""
- 05 三月 21:31:45 INFO [ows.OWSHandlerMapping] - Mapped URL path [/wms] onto handler ""dispatcher""
- 05 三月 21:31:46 INFO [ows.OWSHandlerMapping] - Mapped URL path [/animate] onto handler ""dispatcher""
- 05 三月 21:31:46 INFO [ows.OWSHandlerMapping] - Mapped URL path [/animate/*] onto handler ""dispatcher""
- 05 三月 21:31:46 INFO [ows.OWSHandlerMapping] - Mapped URL path [/wcs] onto handler ""dispatcher""
- 05 三月 21:31:46 INFO [ows.OWSHandlerMapping] - Mapped URL path [/wcs/**] onto handler ""dispatcher""
- 05 三月 21:31:47 INFO [ows.OWSHandlerMapping] - Mapped URL path [/kml] onto handler ""dispatcher""
- 05 三月 21:31:47 INFO [ows.OWSHandlerMapping] - Mapped URL path [/kml/*] onto handler ""dispatcher""
- 05 三月 21:31:47 INFO [ows.OWSHandlerMapping] - Mapped URL path [/kml/icon/**/*] onto handler ""kmlIconService""
之后在浏览器中打开:http://localhost:8080/geoserver/,如下:
eclipse中建geoserver源码的更多相关文章
- Eclipse下建立geoserver源码工程
摘要:本文详细阐述,如何基于geoserver源码构建eclipse工程文件,操作过程中除用到jdk.eclipse以外,还有git和maven,操作系统为windows8. 1安装Git 从(htt ...
- 关于导入geoserver 源码到Eclipse编译运行
参考http://blog.csdn.net/gisshixisheng/article/details/43016443 和 http://blog.sina.com.cn/s/blog_6e37 ...
- Eclipse与Android源码中ProGuard工具的使用
由于工作需要,这两天和同事在研究android下面的ProGuard工具的使用,通过查看android官网对该工具的介绍以及网络上其它相关资料,再加上自己的亲手实践,算是有了一个基本了解.下面将自己的 ...
- 基于Eclipse搭建Hadoop源码环境
Hadoop使用ant+ivy组织工程,无法直接导入Eclipse中.本文将介绍如何基于Eclipse搭建Hadoop源码环境. 准备工作 本文使用的操作系统为CentOS.需要的软件版本:hadoo ...
- eclipse调试jdk源码
摘要 介绍使用eclipse调试jdk源码 java是一门开源的程序设计语言,喜欢研究源码的java开发者总会忍不住debug一下jdk源码.虽然官方的jdk自带了源码包src.zip,然而在debu ...
- eclipse查看jdk源码,及反编译查看
jdk中的包: dt.jar是关于运行环境的类库,主要是swing的包 tools.jar是关于一些工具的类库 rt.jar包含了jdk的基础类库,也就是你在java doc里面看到的所有的类的cla ...
- 【Tomcat】使用Eclipse运行Tomcat7源码
1.搭建开发环境 a.下载好tomcat7源码包 b.安装好jdk7,及设置好环境变量 c.安装好ant,及设置好环境变量,用于预编译tocmat源码. d.以上步骤准备好我们就可以开始进入源码的预编 ...
- Eclipse导入Hadoop源码项目及编写Hadoop程序
一 Eclipse导入Hadoop源码项目 基本步骤: 1)在Eclipse新建一个java项目[hadoop-1.2.1] 2)将Hadoop压缩包解压目录src下的core,hdfs,mapred ...
- Eclipse导入hadoop源码
在windows中,使用Eclipse阅读hadoop源码,首先到apache官网下载tar.gz的hadoop源码压缩文件,解压. 方法1:(hadoop技术内幕推荐) 打开Eclipse,新建ja ...
随机推荐
- HDU 2176 取(m堆)石子游戏 (尼姆博奕)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2176 m堆石子,两人轮流取.只能在1堆中取.取完者胜.先取者负输出No.先取者胜输出Yes,然后输出怎 ...
- 使用json对象要注意的地方
本人是初学渣渣,使用json过程中遇到常见的问题,总结如下: 1--json对象内部不要有注释,虽然不报错,但是会使得渲染界面失败: 2--json对象是没有length属性的,若想获取到这个leng ...
- 基于spring框架的jt项目分页查询知识点(一)
知识点汇总(一) 1. 点击事件函数 $(function(){ //事件注册,(表示在#pageId对应容器对象的相关子元素中注册click事件) $("#pageId").on ...
- jdbc --例子7
package cn.kitty.o1; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLE ...
- 【开源】EasyFlash 新年发布 V4.0 beta 版,完全重写(转)
[开源]EasyFlash 新年发布 V4.0 beta 版,完全重写 EasyFlash V4.0 beta [开源]嵌入式闪存库 EasyFlash for STM32,支持Env和IAP
- scrapy 自定义图片路径保存,并存到数据库中
scrapy中有个自带的pipeline工具,ImagesPipeline,可以专门用来储存图片到本地. 但默认储存地址无法配置,所以我们需要写一个自己的pipeline用于储存图片. 先分析一下我们 ...
- innobackup stream 压缩备份,解压后的qp文件
是用innobackup stream 压缩备份,解压后很多文件还是qp格式的压缩文件,需要再解压. 备份: [root@ ~]# /usr/bin/innobackupex --defaults-f ...
- php+js的 authcode 混淆加密和解密,php和js可以通用加密和解密
<script> //md5.js var hexcase = 0; function hex_md5(a) { return rstr2hex(rstr_md5(str2rstr_utf ...
- redis 缓存锁的实现方法
1. redis加锁分类 redis能用的的加锁命令分表是INCR.SETNX.SET 2. 第一种锁命令INCR 这种加锁的思路是, key 不存在,那么 key 的值会先被初始化为 0 ,然后再执 ...
- redis 数据统计(用自增id防止同一秒并发过大没统计成功)
Redis 缓存保存某段时间累加的数值,加入最大id防止同一秒并发过大,导致只统计了执行时同一秒的部分数据,而同一秒另一部分数据在下次累加时没有统计到缓存中 //coin总数 public funct ...