Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
53997c2
OpenRewrite config
lanseg Dec 4, 2025
a11b240
OpenRewrite automated upgrade
lanseg Dec 4, 2025
26a3b7a
Moved metrics from javax.servlet to jakarta.servlet
lanseg Dec 5, 2025
7a8a7db
Completed refactored core
lanseg Dec 5, 2025
03aa703
Fixed checkstyle issues
lanseg Dec 5, 2025
cc203f1
OpenRewrite migration from junit4 to junit6
lanseg Dec 5, 2025
b4b567c
Fixed SingleTileLoaderTaskTest
lanseg Dec 5, 2025
1487823
Migrated to Hibernate 6.6 using OpenRewrite
lanseg Dec 8, 2025
8be3a18
Fixed deserializing HttpMethod
lanseg Dec 8, 2025
1a63fc3
Fixed NotAnEntity exception
lanseg Dec 8, 2025
3764f60
Fixed proxy and http auth parameters passing
lanseg Dec 9, 2025
78bc2ec
Spring-security fix for the server
lanseg Dec 10, 2025
7ba1741
Remove channel enforcing in the spring config.
lanseg Dec 11, 2025
3c82c58
Migrated 'examples' code
lanseg Dec 11, 2025
43e7135
Re-enabled acceptance tests
lanseg Dec 11, 2025
991ecaa
Increased log verbosity for debugging
lanseg Dec 12, 2025
f262df6
Explicitly define path param names in the main servlet
lanseg Dec 15, 2025
332439c
Fixed test link generation for the acceptance tests
lanseg Dec 15, 2025
4437746
Proof of concept fix for the failing secure templates test
lanseg Dec 18, 2025
7b4c100
Removed WIP fix
lanseg Dec 19, 2025
7e3023c
Fixed http to https redirect for the private templates
lanseg Dec 19, 2025
536c1a4
Restored missing dependencies for unit tests
lanseg Dec 19, 2025
c892deb
Fixed clustering tests.
lanseg Dec 22, 2025
a251f33
Added size constraints instead of the default ones
lanseg Dec 22, 2025
1f7665a
Merge PrintJobImpl interface and implementation
lanseg Dec 23, 2025
02e7130
Resolved the deprecated issues
lanseg Dec 24, 2025
28fb200
Apply pre-commit fix
geo-ghci-int[bot] Dec 29, 2025
0065e5e
Addressed linter errors regarding path variable names
lanseg Dec 29, 2025
72c9d23
Update CI dependencies (#3907)
renovate[bot] Jan 1, 2026
08c15ad
Update all patch/minor versions (#3905)
renovate[bot] Jan 1, 2026
eb9b857
Update CI dependencies (#3906)
renovate[bot] Jan 1, 2026
95e7dcd
Fixed the linter recommendation for the path variable names
lanseg Jan 5, 2026
f2b4060
OpenRewrite config
lanseg Dec 4, 2025
904e0a9
OpenRewrite automated upgrade
lanseg Dec 4, 2025
9285076
Moved metrics from javax.servlet to jakarta.servlet
lanseg Dec 5, 2025
83d9be5
Completed refactored core
lanseg Dec 5, 2025
d947394
Fixed checkstyle issues
lanseg Dec 5, 2025
992b5b8
OpenRewrite migration from junit4 to junit6
lanseg Dec 5, 2025
0d12e47
Fixed SingleTileLoaderTaskTest
lanseg Dec 5, 2025
8c88f7d
Migrated to Hibernate 6.6 using OpenRewrite
lanseg Dec 8, 2025
1909873
Fixed deserializing HttpMethod
lanseg Dec 8, 2025
2c852c3
Fixed NotAnEntity exception
lanseg Dec 8, 2025
965d363
Fixed proxy and http auth parameters passing
lanseg Dec 9, 2025
848546e
Spring-security fix for the server
lanseg Dec 10, 2025
1372789
Remove channel enforcing in the spring config.
lanseg Dec 11, 2025
29571e5
Migrated 'examples' code
lanseg Dec 11, 2025
0c7429a
Re-enabled acceptance tests
lanseg Dec 11, 2025
6107a1b
Increased log verbosity for debugging
lanseg Dec 12, 2025
ae8ccd8
Explicitly define path param names in the main servlet
lanseg Dec 15, 2025
5c9fa4c
Fixed test link generation for the acceptance tests
lanseg Dec 15, 2025
62f57e1
Proof of concept fix for the failing secure templates test
lanseg Dec 18, 2025
a01f8ff
Removed WIP fix
lanseg Dec 19, 2025
a233296
Fixed http to https redirect for the private templates
lanseg Dec 19, 2025
e54f317
Restored missing dependencies for unit tests
lanseg Dec 19, 2025
730c01a
Fixed clustering tests.
lanseg Dec 22, 2025
5c76c93
Added size constraints instead of the default ones
lanseg Dec 22, 2025
b7da39d
Merge PrintJobImpl interface and implementation
lanseg Dec 23, 2025
4166398
Resolved the deprecated issues
lanseg Dec 24, 2025
0c84ce6
Apply pre-commit fix
geo-ghci-int[bot] Dec 29, 2025
98de59a
Addressed linter errors regarding path variable names
lanseg Dec 29, 2025
8977450
Fixed the linter recommendation for the path variable names
lanseg Jan 5, 2026
8cce6d2
Merge branch 'spring7-openrewrite' of github.com:mapfish/mapfish-prin…
lanseg Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ jobs:
python-version: '3.14'
- run: python3 -m pip install --requirement=ci/requirements.txt

- uses: actions/cache@v4
- uses: actions/cache@v5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doing this in this pull request?

with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: "pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}\npre-commit-"
- run: pre-commit run --all-files --color=always
- run: git diff --exit-code --patch > /tmp/pre-commit.patch; git diff --color; git reset --hard || true
if: failure()
- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: Apply pre-commit fix.patch
path: /tmp/pre-commit.patch
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- run: make build

- run: make checks
- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: Checkstyle and SpotBugs reports
path: reports
Expand All @@ -120,13 +120,13 @@ jobs:
- timeout-minutes: 10
run: make tests

- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: Unit test results
path: core/build/resources/test/org/mapfish/print/
if-no-files-found: ignore
if: failure()
- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: Unit test report
path: core/build/reports/tests/test/
Expand All @@ -139,7 +139,7 @@ jobs:
- run: c2cciutils-docker-logs || true
if: always()

- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: Acceptance tests (Examples)
path: examples/build/resources/test/examples/
Expand All @@ -155,7 +155,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch; git diff --color; git reset --hard || true
if: failure()
- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: Update dpkg versions list.patch
path: /tmp/dpkg-versions.patch
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ repos:
|\.github/ghci\.yaml
)$
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 42.29.4
rev: 42.69.2
hooks:
- id: renovate-config-validator
- repo: https://github.com/sbrunner/hooks
rev: 1.6.1
hooks:
- id: canonicalize
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.7
rev: v0.14.10
hooks:
- id: ruff-format
- repo: https://github.com/sbrunner/python-versions-hook
Expand Down
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

plugins {
id("com.github.spotbugs") version "6.4.7"
id("com.github.spotbugs") version "6.4.8"
}

defaultTasks 'build'
Expand Down Expand Up @@ -60,12 +60,12 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) {
compileJava {
options.encoding = 'utf-8'
options.deprecation = true
options.compilerArgs += ['-Xlint:unchecked']
options.compilerArgs += ['-Xlint:unchecked', '-parameters']
}

dependencies {
testImplementation(
'org.mockito:mockito-core:5.20.0',
'org.mockito:mockito-core:5.20.0',
)
}

Expand All @@ -88,4 +88,3 @@ configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) {
tasks.register('docs') {
enabled = false
}

2 changes: 1 addition & 1 deletion ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
c2cciutils==1.7.5
pre-commit==4.5.0
pre-commit==4.5.1
tag-publish==1.1.1
2 changes: 1 addition & 1 deletion core/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM mapfish_print_builder AS builder

FROM tomcat:9.0.112-jre21-temurin-jammy AS runner
FROM tomcat:10-jre21-temurin-jammy AS runner
LABEL maintainer="Camptocamp <[email protected]>"

RUN --mount=type=cache,target=/var/cache,sharing=locked \
Expand Down
163 changes: 87 additions & 76 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ test {
junitXml.getRequired().set(true)
html.getRequired().set(true)
}
maxHeapSize = "2G"
useJUnitPlatform()
}

build {
Expand Down Expand Up @@ -125,88 +127,97 @@ configurations {

dependencies {
implementation(
'org.springframework:spring-context:5.3.39',
'org.springframework:spring-web:5.3.39',
'org.springframework:spring-webmvc:5.3.39',
'org.springframework:spring-aspects:5.3.39',
'org.springframework:spring-orm:5.3.39',
'org.springframework:spring-jdbc:5.3.39',
'org.springframework:spring-tx:5.3.39',
'org.springframework:spring-test:5.3.39',
'org.springframework.security:spring-security-config:5.8.16',
'org.springframework.security:spring-security-web:5.8.16',
'com.thetransactioncompany:cors-filter:2.10',
'org.hibernate:hibernate-core:5.6.15.Final',
'org.postgresql:postgresql:42.7.8',
'com.vladmihalcea:hibernate-types-52:2.21.1',
'com.mchange:c3p0:0.11.2',
'javax.media:jai-core:1.1.3',
'org.springframework:spring-context:7.0.1',
'org.springframework:spring-core:7.0.1',
'org.springframework:spring-web:7.0.1',
'org.springframework:spring-webmvc:7.0.1',
'org.springframework:spring-aspects:7.0.1',
'org.springframework:spring-orm:7.0.1',
'org.springframework:spring-jdbc:7.0.1',
'org.springframework:spring-tx:7.0.1',
'org.springframework:spring-test:7.0.1',
'org.springframework.security:spring-security-config:7.0.1',
'org.springframework.security:spring-security-web:7.0.1',
'com.thetransactioncompany:cors-filter:3.1',
'org.hibernate:hibernate-core:6.6.38.Final',
'org.postgresql:postgresql:42.7.8',
'io.hypersistence:hypersistence-utils-hibernate-63:3.13.2',
'com.mchange:c3p0:0.11.2',
'javax.media:jai-core:1.1.3',
'jakarta.annotation:jakarta.annotation-api:3.0.0',
'jakarta.persistence:jakarta.persistence-api:3.0.0',
'jakarta.servlet:jakarta.servlet-api:6.1.0'
)
metrics(
'io.dropwizard.metrics:metrics-core:4.2.37',
'io.dropwizard.metrics:metrics-servlet:4.2.37',
'io.dropwizard.metrics:metrics-httpclient:4.2.37',
'io.dropwizard.metrics:metrics-servlets:4.2.37',
'io.dropwizard.metrics:metrics-jvm:4.2.37',
'io.dropwizard.metrics:metrics-jmx:4.2.37',
'io.dropwizard.metrics:metrics-logback:4.2.37',
'io.dropwizard.metrics:metrics-core:4.2.37',
'io.dropwizard.metrics:metrics-jakarta-servlet:4.2.37',
'io.dropwizard.metrics:metrics-jakarta-servlets:4.2.37',
'io.dropwizard.metrics:metrics-httpclient:4.2.37',
'io.dropwizard.metrics:metrics-jvm:4.2.37',
'io.dropwizard.metrics:metrics-jmx:4.2.37',
'io.dropwizard.metrics:metrics-logback:4.2.37',
)
geotools(
'org.geotools:gt-epsg-hsql:34.1',
'org.geotools:gt-render:34.1',
'org.geotools:gt-geojson:34.1',
'org.geotools:gt-geotiff:34.1',
'org.geotools:gt-wms:34.1',
'org.geotools.xsd:gt-xsd-gml3:34.1',
'org.geotools:gt-svg:34.1',
'org.geotools:gt-cql:34.1',
'org.geotools:gt-epsg-hsql:34.1',
'org.geotools:gt-render:34.1',
'org.geotools:gt-geojson:34.1',
'org.geotools:gt-geotiff:34.1',
'org.geotools:gt-wms:34.1',
'org.geotools.xsd:gt-xsd-gml3:34.1',
'org.geotools:gt-svg:34.1',
'org.geotools:gt-cql:34.1',
)
implementation "org.apache.httpcomponents.client5:httpclient5:5.4.4"
jasper(
'ar.com.fdvs:DynamicJasper:5.3.9',
'com.itextpdf:itextpdf:5.5.13.4',
'net.sf.jasperreports:jasperreports:7.0.3',
'net.sf.jasperreports:jasperreports-excel-poi:7.0.3',
'net.sf.jasperreports:jasperreports-fonts:7.0.3',
'net.sf.jasperreports:jasperreports-functions:7.0.3',
'net.sf.jasperreports:jasperreports-json:7.0.3',
'net.sf.jasperreports:jasperreports-jdt:7.0.3',
'net.sf.jasperreports:jasperreports-pdf:7.0.3',
'ar.com.fdvs:DynamicJasper:5.3.9',
'com.itextpdf:itextpdf:5.5.13.4',
'net.sf.jasperreports:jasperreports:7.0.3',
'net.sf.jasperreports:jasperreports-excel-poi:7.0.3',
'net.sf.jasperreports:jasperreports-fonts:7.0.3',
'net.sf.jasperreports:jasperreports-functions:7.0.3',
'net.sf.jasperreports:jasperreports-json:7.0.3',
'net.sf.jasperreports:jasperreports-jdt:7.0.3',
'net.sf.jasperreports:jasperreports-pdf:7.0.3',
)
implementation(
'org.slf4j:slf4j-api:2.0.17',
'org.slf4j:jcl-over-slf4j:2.0.17',
'org.slf4j:jul-to-slf4j:2.0.17',
'ch.qos.logback:logback-classic:1.5.21',
'ch.qos.logback:logback-access:1.5.21',
'org.json:json:20250517',
'org.yaml:snakeyaml:2.5',
'com.github.spullara.cli-parser:cli-parser:1.1.6',
'com.sun.mail:javax.mail:1.6.2',
'com.amazonaws:aws-java-sdk-s3:1.12.794',
'io.sentry:sentry-logback:8.27.1',
// For JSON logs
'net.logstash.logback:logstash-logback-encoder:9.0',
// For PDF/A
'com.adobe.xmp:xmpcore:6.1.11',
// For JasperReports
'joda-time:joda-time:2.14.0',
'org.jfree:jcommon:1.0.24',
'org.apache.groovy:groovy-all:5.0.2',
'xalan:serializer:2.7.3',
// For WebP images
'com.twelvemonkeys.imageio:imageio-webp:3.12.0',
'org.slf4j:slf4j-api:2.0.17',
'org.slf4j:jcl-over-slf4j:2.0.17',
'org.slf4j:jul-to-slf4j:2.0.17',
'ch.qos.logback:logback-classic:1.5.23',
'ch.qos.logback:logback-access:1.5.23',
'org.json:json:20250517',
'org.yaml:snakeyaml:2.5',
'com.github.spullara.cli-parser:cli-parser:1.1.6',
'com.sun.mail:javax.mail:1.6.2',
'com.amazonaws:aws-java-sdk-s3:1.12.797',
'io.sentry:sentry-logback:8.29.0',
// For JSON logs
'net.logstash.logback:logstash-logback-encoder:9.0',
// For PDF/A
'com.adobe.xmp:xmpcore:6.1.11',
// For JasperReports
'joda-time:joda-time:2.14.0',
'org.jfree:jcommon:1.0.24',
'org.apache.groovy:groovy-all:5.0.3',
'xalan:serializer:2.7.3',
// For WebP images
'com.twelvemonkeys.imageio:imageio-webp:3.13.0',
)

implementation(
'org.apache.xmlgraphics:batik-codec:1.19',
'org.apache.xmlgraphics:batik-svg-dom:1.19'
'org.apache.xmlgraphics:batik-codec:1.19',
'org.apache.xmlgraphics:batik-svg-dom:1.19'
)

providedCompile('javax.servlet:javax.servlet-api:4.0.1')
//providedCompile('jakarta.servlet:jakarta.servlet-api:6.1.0')
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.8'

testImplementation 'de.saly:javamail-mock2-fullmock:0.5-beta4'
testImplementation 'com.h2database:h2:2.4.240'
testImplementation (
'de.saly:javamail-mock2-fullmock:0.5-beta4',
'com.h2database:h2:2.4.240',
'org.junit.jupiter:junit-jupiter:6.0.1',
'org.junit.jupiter:junit-jupiter-api:6.0.1',
)
}

static def gitRevision() {
Expand All @@ -228,14 +239,14 @@ processResources {

def addManifestAttribute(manifest) {
manifest.mainAttributes(
'Mapfish-Print-Version': version,
'Git-Revision': gitRevision(),
'Build-Time': new Date().getDateTimeString(),
'Build-By': System.getProperty('user.name', 'unknown'),
'Build-Java-Runtime-Name': System.getProperty('java.runtime.name', 'unknown'),
'Build-Java-Version': System.getProperty('java.version', 'unknown'),
'Build-OS-Arch': System.getProperty('os.arch', 'unknown'),
'Build-OS-Name': System.getProperty('os.name', 'unknown')
'Mapfish-Print-Version': version,
'Git-Revision': gitRevision(),
'Build-Time': new Date().getDateTimeString(),
'Build-By': System.getProperty('user.name', 'unknown'),
'Build-Java-Runtime-Name': System.getProperty('java.runtime.name', 'unknown'),
'Build-Java-Version': System.getProperty('java.version', 'unknown'),
'Build-OS-Arch': System.getProperty('os.arch', 'unknown'),
'Build-OS-Name': System.getProperty('os.name', 'unknown')
)
}

Expand Down Expand Up @@ -280,7 +291,7 @@ gradle.taskGraph.whenReady { taskGraph ->
print.args printArgs.toString().split(" ").toList()
} else {
throw new IllegalArgumentException('You must supply the -PprintArgs="..." arguments.\nFor Example:\n\n./gradlew print ' +
'-PprintArgs="-config examples/config.yaml -spec examples/spec.json -output ./output.pdf"\n\n')
'-PprintArgs="-config examples/config.yaml -spec examples/spec.json -output ./output.pdf"\n\n')
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/mapfish/print/ImageInit.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mapfish.print;

import com.twelvemonkeys.imageio.plugins.webp.WebPImageReaderSpi;
import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;
import javax.imageio.ImageIO;
import javax.imageio.spi.IIORegistry;
import org.slf4j.Logger;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/mapfish/print/MapPrinter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.mapfish.print;

import jakarta.annotation.Nonnull;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
Expand All @@ -10,7 +11,6 @@
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import javax.annotation.Nonnull;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONWriter;
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/mapfish/print/VersionInfo.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.mapfish.print;

import jakarta.annotation.Nullable;
import jakarta.annotation.PostConstruct;
import jakarta.servlet.ServletContext;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import javax.annotation.Nullable;
import javax.annotation.PostConstruct;
import javax.servlet.ServletContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.mapfish.print.attribute;

import javax.annotation.Nonnull;
import jakarta.annotation.Nonnull;
import org.json.JSONException;
import org.json.JSONWriter;
import org.mapfish.print.config.ConfigurationObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.mapfish.print.attribute;

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.json.JSONException;
import org.json.JSONWriter;
import org.mapfish.print.PrintException;
Expand Down
Loading
Loading