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.
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 - Uses geosolutions fork described below
- MapStore - Uses geosolutions fork described below
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
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.3-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>
To create a release:
-
Update version in
pom.xml
:<groupId>org.mapfish.print</groupId> <artifactId>print-lib</artifactId> <version>2.3.0</version>
-
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.
-
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