This project is no longer actively maintained by camptocamp. New projects are strongly encouraged to use mapfish-print which is at Version 3 at the time of writing.
This project is no longer fully functional, consisting of mapfish-print-lib.jar
distribution used
by downstream projects as described below.
MapFish Print 2.3 documentation
Downstream projects making use of this technology:
- geoserver - Uses
mapfish-print-lib
for gs-printing extension - core-geonetwork - uses mapfish-print-lib for activities such as thumbnail generation
- GeoNode -
mapfish-print-lib
via geoserver printing extension - MapStore -
mapfish-print-lib
via geoserver printing extension
GeoCat BV has mained this series as needed to support the core-geonetwork project:
- Updated to migrate to OpenPDF
GeoSolutions created a fork of the project in 2013:
- https://github.com/geosolutions-it/mapfish-print
- Some features introduced over time (see wiki )
- Updated to reflect GeoTools changes including Java 11 and Log4j changes
- This work has been incorporated back into
mapfish-print-lib
for 2.3.0 release - With
GeoNode
andMapStore
successfully migrating tomapfish-print-lib
this fork has concluded.
Outdated documentation:
Standard maven build targets are available:
-
To clean the
target/
folder:mvn clean
-
To compile:
mvn compile
-
To create a
print-lib-2.x-SNAPSHOT.jar
jar:mvn package
-
To install SNAPSHOT jar into
~/.m2/repository
local maven repository:mvn install
The use of a local maven repository allows for integration testing with other builds.
To build in IntelliJ:
- Open as a maven project.
To build in Eclipse:
- Open as maven project.
To build in Eclipse as a Java project:
-
Create eclipse project
.classpath
and.project
files:mvn eclipse:eclipse
-
Import project into Eclipse as a Java project.
When running in an IDE:
-
Main class is
org.mapfish.print.ShellMapPrinter
-
Program arguments:
--config=samples/config.yaml --spec=samples/spec.json --output=$HOME/print.pdf
To deploy SNAPSHOT to repo.osgeo.org:
mvn deploy
Your ~/.m2/settings.xml
requires credentials to access osgeo nexus
server at repo.osgeo.org.
See https://wiki.osgeo.org/wiki/SAC:Repo to obtain credentials:
<servers>
<server>
<username>OSGEO_ID</username>
<password>OSGEO_PASSWORD</password>
<id>nexus</id>
</server>
</servers>
Uses Python3 environment for **sphinx-build documentation:
pip3 install -r docs/requirements.txt
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
open _build/html/index.html
Docs are created in docs/_build/html
folder.
Maven docs
profile will assemble the docs into a zip bundle if docs/_build/html/index.html
exists.
mvn package
To create a release:
-
Update version in
pom.xml
:<groupId>org.mapfish.print</groupId> <artifactId>print-lib</artifactId> <version>2.3.0</version>
-
Double
ReleaseNotes.md
change-log and update if ndded. -
Build docs:
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
-
Build confirming creation of
print-lib-2.3.0.jar
mvn clean install
-
Commit the change to
pom.xml
git add pom.xml git commit -m "Release 2.3.0"
-
Deploy to osgeo nexus
mvn deploy -DskipTests
-
Push and tag the change:
git push git tag -a release/2.3.0 -m "Release 2.3.0" git push origin release/2.3.0
-
Check the release in github:
-
Add any release-notes to the tag in GitHub.
Upload jar and docs bundles from target folder.
-
Update the
pom.xml
against to return to SNAPSHOT developmentt:<groupId>org.mapfish.print</groupId> <artifactId>print-lib</artifactId> <version>2.3-SNAPSHOT</version>
And push up the change:
git add pom.xml git commit -m "Development 2.3-SNAPSHOT" git push