I used Eclipse to start the project when I studied the GeoServer source code before. Today, I organized the cloud notes and ran the recently released GeoServer 2.13.0 source code step by step. GeoServer is an open source geographic information program based on java, which can easily publish and manage map data. For details, please visit the official website . Step by step:
1.jdk environment, jdk1.8.0 or above, set environment variables (Linux), vi ~/.bashrc, enter
export JAVA_HOME=/home/shanks/software/jdk1.8.0_161 export JRE_HOME=/home/shanks/software/jdk1.8.0_161/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
2. Download the GeoServer source code and unzip it
3. Install Eclipse
4. Maven download, set environment variables
export MAVEN_HOME=/home/shanks/software/apache-maven-3.3.9 export PATH=$PATH:$MAVEN_HOME/bin
Command line execution source ~/.bashrc
5. Enter the src directory under the GeoServer source code project, and enter the command line:
mvn clean install -Dmaven.test.skip=true
6. Build the eclipse project
mvn eclipse:eclipse
7. Open eclipse, Import -> General -> Existing Projects into Workspace, import it
After the import is successful, the view is as follows:
8. Start the project
Find Start.java as shown below and run
After startup, you can open the web page in the browser: http://localhost:8080/geoserver/web.
GeoSever initial account: admin, password: geoserver, after opening:
9. When building the project, " Access restriction: The type 'RenderingEngine' is not API (restriction on ", etc. may appear , which can be resolved as follows:
Right-click on the project –>Properties->Java Build Path-->Libraries, find "JRE System Libraries", and click Remove.
Then click Add Library on the right, add "JRE System Libraries", and finally Apply.