πŸ“

Making Your First Code Change

Make a simple change to verify your development workflow end to end.

Let’s make a simple change to verify your development workflow.

1. Find a file to modify

# cd /workspace/geoserver
# nano src/web/core/src/main/java/org/geoserver/web/GeoServerHomePage.java

Note: The container includes nano (a beginner-friendly text editor). Use Ctrl+O to save, Ctrl+X to exit. Of course, vim is also available.

2. Make a small change

Find (Ctrl+W) this line (near the top of the constructor):

String welcomeText = getWelcomeDescription();

By default this is empty on a fresh install, so the welcome message stays hidden. Replace it with some text of your own:

String welcomeText = "Modified by [Your Name] for GeoGuru mentorship";

3. Rebuild the web application

# build-geoserver.sh

This takes about 1-2 minutes.

4. Restart GeoServer

# restart-geoserver.sh

5. Verify your change

Refresh http://localhost:8080/geoserver in your browser. Your text now appears directly on the page, right under the main GeoServer heading.

6. Commit and push

# cd /workspace/geoserver
# git add src/web/core/src/main/java/org/geoserver/web/GeoServerHomePage.java
# git commit -m "Add mentorship welcome message"
# git push origin main

You’ve just completed the full development cycle: edit β†’ build β†’ test β†’ commit β†’ push. This is the workflow you’ll use for all contributions.