Maven Snapshots¶
The current live jar published by GeoTools is known as a SNAPSHOT. Projects that want to work directly with GeoTools will depend “SNAPSHOT” rather than specifying a version number.
Grab SNAPSHOT Dependency¶
We depend on a “snapshot” of several projects (usually project GeoTools community members are involved such as ImageIO-EXT). In these cases an email will be sent to the developer list asking people to “update with -U”.
To respond to one of these emails include “-u” in your next build.
Update (for example from upstream):
git pull --rebase upstream main
Build using the -U option:
mvn clean install -U -DskipTests
The above example skipped running the tests (which is common when you are trying for a quick update), please note by definition that “-U” is not compatible with the “-o” offline mode.
Publish GeoTools SNAPSHOT¶
If you are working on GeoServer or another project that depends on the latest greatest
GeoTools release you will need to know how to deploy a SNAPSHOT to https://repo.osgeo.org/
(so members of your developer community do not get compile errors).
The build server build.geoserver.org
is watching the github repository, and will
build and deploy a SNAPSHOT.
If you really cannot wait:
Update to make sure you are not missing out on anyone’s work:
git pull --rebase upstream main
Build with tests to make sure your commit is not fatal:
mvn clean install
Commit - remember to include any Jira issue numbers in your log message:
mvn commit -m "Change to fix shapefile charset handling, see GEOT-1437"
Push the commits back to upstream:
mvn push upstream main
Ensure your
~/.m2/settings.xml
has your webdav credentials.osgeo
- this is the same as your OSGeo credentials
The
settings.xml
should list both:<?xml version="1.0" encoding="ISO-8859-1"?> <settings> <offline>false</offline> <servers> <server> <id>osgeo</id> <username>USERID</username> <password>PASSWORD</password> </server> </servers> </settings>
Deploy for members of your community:
mvn deploy -Dmaven.test.skip=true
Let your community know via email! (The email can ask them to build with -U).