About importing GeoServer source code to eclipse compile run

Source: Internet
Author: User

Refer to http://blog.csdn.net/gisshixisheng/article/details/43016443 and http://blog.sina.com.cn/s/blog_6e3765300102vvh8.html two articles

First, install the JDK environment

1, to the official website download JDK

Preferably 1.8.0 or later, here JDK jdk-8u101-windows-x64 (my machine is 64 bits, if 32 bit, 32 bits required)

2. Installing the JDK

All the way next, where the JDK installation location and JRE installation location are placed by default on the C drive, and if necessary, during the installation process

Click Change, my folder directory is D:\SoftWare\java\jdk1.8.0 and D:\SoftWare\java\jre1.8.0, respectively

3. Setting the System environment variable

Add Java_home D:\SoftWare\java\jdk1.8.0

Add Classpath.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;

Add path%java_home%\bin;

Second, install Maven

1, to the official website to download maven

Note that is the bin compressed version and here I am apache-maven-3.3.9-bin.zip

2. Install Maven

MAVEN installation does not require the installation process, only need to decompress, I unzip the directory as D:\SoftWare\maven3.3.9

3. Setting the System environment variable

Maven_home D:\SoftWare\maven3.3.9

Path adds%maven_home%\bin after the original path; The new path variable is%java_home%\bin;%maven_home%\bin;

Third, download GeoServer source code

There are two ways to download GeoServer source code, one is from Git, the other is from the GeoServer website, here for simple, directly from the site to obtain the source code, download the time GeoServer Source geoserver-2.9.1, also give it an extract directory, here for D:\SoftWare\geoserver-code\geoserver2.9.1

Third, install Eclipse

Do not need to download the installation version, only need to download the uncompressed version of the official Web Select IDE Tools follow the prompts to download, general download after decompression will have 32, 64 and the official Chinese patch eclipse-zh_4.4.0.v20140623020002 three compressed files, Choose 32-bit or 64-bit decompression as needed.

I choose 64 bit here, also give it an extract directory D:\SoftWare\eclipse, and will eclipse-zh_4.4.0.v20140623020002 the solution of this compression package Compressed files extracted features and plugins folder copy to D:\SoftWare\eclipse, overwriting the corresponding folder, you can complete the Chinese.

Check eclipse's Maven repository directory, open Eclipse, select Preference under window, select java->buildpath-> Classpath Variables in the dialog box, See if there is a variable m2_repo, and whether it is Maven's repository directory location, this is C:\Users\Administrator\.m2\repository

If not, click New, create a new variable M2_repo, and the repository directory location with a value of Maven C:\Users\Administrator\.m2\repository

Iv. building source based on Maven

1, Program-Accessories-command prompt, in the cmd window to switch to the GeoServer source after the decompression of the SRC directory location

2. Building the source code

Execute Command mvn clean install-dmaven.test.skip=true

3. Building Eclipse Engineering

Export the GeoServer as an Eclipse project. Continue with the following command (note that this does not use-dmaven.tesk.skip=true)

MVN Eclipse:eclipse

V. Eclipse compilation Run

1, import geoserver source src directory into eclipse

2. Running Start.java

3. Enter Http://localhost:8080/geoserver in the browser

About importing GeoServer source code to eclipse compile run

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.