This README helps you getting started with GeoServer development. It will guide you through the process of checking out the source code, compiling it, and running.
GeoServer Development requires Java 11, Maven, and git.
Further readings: https://docs.geoserver.org/latest/en/developer/index.html
-
Install prerequisites
Obtain OpenJDK 11, Maven and git from your Linux distribution.
-
Install Java Runtime Environment
Download and install Java 11 runtime environment, as provided by adoptium macOS installers: https://adoptium.net/temurin/archive/?version=11
Update your shell environment with:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptiumjdk-11.jdk/Contents/Home
The system /usr/bin/java makes use of JAVA_HOME setting above.
-
Download and install git:
-
Download and install Maven:
-
Install Java Runtime Environment
Download and install Java 11 runtime environment, as provided by Adoptium windows installers: https://adoptium.net
Update Windows Environment Variables:
- Create an environment variable JAVA_HOME and point it to your Java JDK directory.
- Modify the PATH variable and add: ;%JAVA_HOME%/bin
-
Download and install git:
-
Download and install Maven:
-
Get the source code
Go to the command line and run:
git clone https://github.com/geoserver/geoserver.git
-
Build the source code
Go to the command line and navigate to the folder you just checked out. Now run:
cd geoserver cd src mvn clean install
-
Running locally:
cd web/app mvn jetty:run
The build process may fail because of several reasons:
-
Unavailable dependencies - Maven tries to download dependencies which might not be available on the server side yet.
Solution: Try again in a few minutes.
-
Failing tests - Maven runs existing tests automatically. If some of them fail, the build fails.
Solution: You can tell Maven not to run the tests. This is discouraged.
Bug the developers instead or fix the test and send a patch, thanks!
If you really just want to disable the test, run maven like so:
mvn -DskipTests=true install