Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/legacy-full-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ on:
- 'scripts/test-openjrs-branding.py'
- 'scripts/prepare-legacy-frontend.py'
- 'scripts/verify-legacy-war-deps.py'
- 'scripts/verify-no-vendor-heartbeat.py'
- 'scripts/verify-native-reports.py'
- 'scripts/smoke-jasperserver.sh'
- 'scripts/test-legacy-rest-reports.sh'
- 'scripts/test-legacy-viewer.py'
- 'scripts/test-sample-map-table.py'
- 'scripts/sync-jr7-samples.py'
- 'scripts/update-native-samples.py'
- 'scripts/test-native-samples.py'
push:
branches:
- feature/jasperreports-7-migration
Expand Down Expand Up @@ -145,6 +151,10 @@ jobs:
java -version
mvn -version
ant -version
- name: Check native JR7 sample catalogs
run: |
python3 scripts/sync-jr7-samples.py
python3 scripts/verify-native-reports.py
- name: Download frontend overlay
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -194,13 +204,13 @@ jobs:
test -s "$ksp/.jrsksp"
test -s keystore.init.properties
echo "CI keystore generated in runner temporary storage."
- name: Test JR7 component registration, legacy XML and exports
- name: Test native JR7 reports, component registration and exports
run: |
mvn -B -ntp -f jasperserver/pom.xml \
-DbuildArtifactVersionName=ci \
-Dji-repo-releases=https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts \
-Dji-repo-snapshots=https://jaspersoft.jfrog.io/jaspersoft/jr-ce-snapshots \
-pl jasperserver-custom-visualization,jasperserver-legacy-jrxml -am test
-pl jasperserver-custom-visualization -am test
- name: Build original Community WAR
working-directory: jasperserver/buildomatic
env:
Expand Down Expand Up @@ -228,11 +238,13 @@ jobs:
run: |
test -s jasperserver/jasperserver-war/target/jasperserver.war
unzip -t jasperserver/jasperserver-war/target/jasperserver.war >/dev/null
python3 scripts/verify-no-vendor-heartbeat.py jasperserver/jasperserver-war/target/jasperserver.war
python3 scripts/verify-native-reports.py --war jasperserver/jasperserver-war/target/jasperserver.war
- name: Test legacy viewer action and resource registration
run: |
mvn -B -ntp -f jasperserver/jasperserver-war-jar/pom.xml \
-s jasperserver/buildomatic/build_conf/default/maven_settings_community.xml \
-DskipTests=false -Dtest=ViewerActionMappingsTest,InteractiveTableActionsTest test
-DskipTests=false -Dtest=JSCommonControllerTest,ViewerActionMappingsTest,InteractiveTableActionsTest test
- name: Upload compiled WAR
uses: actions/upload-artifact@v4
with:
Expand All @@ -249,7 +261,7 @@ jobs:
set -o pipefail
./js-ant build-init-js-db-ce 2>&1 | tee "$RUNNER_TEMP/database-init.log"
./js-ant run-production-data-ce 2>&1 | tee -a "$RUNNER_TEMP/database-init.log"
- name: Load SugarCRM sample data and sample reports
- name: Load SugarCRM, Foodmart and native sample reports
working-directory: jasperserver/buildomatic
env:
BUILDOMATIC_ENV: ci
Expand All @@ -264,6 +276,7 @@ jobs:
test -s "$ks/.jrsks"
test -s "$ksp/.jrsksp"
./js-ant create-sugarcrm-db load-sugarcrm-db 2>&1 | tee "$RUNNER_TEMP/sample-data.log"
./js-ant create-foodmart-db load-foodmart-db 2>&1 | tee -a "$RUNNER_TEMP/sample-data.log"
./js-ant import-sample-data-ce 2>&1 | tee -a "$RUNNER_TEMP/sample-data.log"
- name: Prepare runtime WAR with Buildomatic files
run: |
Expand Down Expand Up @@ -293,11 +306,11 @@ jobs:
username="postgres" password="postgres" maxTotal="20"/>
<Resource name="jdbc/sugarcrm" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
driverClassName="org.postgresql.Driver" url="jdbc:postgresql://127.0.0.1:5432/jasperserver"
driverClassName="org.postgresql.Driver" url="jdbc:postgresql://127.0.0.1:5432/sugarcrm"
username="postgres" password="postgres" maxTotal="10"/>
<Resource name="jdbc/foodmart" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
driverClassName="org.postgresql.Driver" url="jdbc:postgresql://127.0.0.1:5432/jasperserver"
driverClassName="org.postgresql.Driver" url="jdbc:postgresql://127.0.0.1:5432/foodmart"
username="postgres" password="postgres" maxTotal="10"/>
</Context>
EOF
Expand Down Expand Up @@ -329,7 +342,10 @@ jobs:
env:
JRS_SMOKE_USER: jasperadmin
JRS_SMOKE_PASSWORD: jasperadmin
run: python3 scripts/test-legacy-viewer.py
run: |
python3 scripts/test-legacy-viewer.py
python3 scripts/test-sample-map-table.py
python3 scripts/test-native-samples.py
- name: Render Community visualization SVG and PDF in Chrome
run: |
chrome_path=$(command -v google-chrome)
Expand Down Expand Up @@ -366,6 +382,8 @@ jobs:
${{ runner.temp }}/jrs-login-smoke.html
${{ runner.temp }}/jrs-login-headers.txt
${{ runner.temp }}/viewer-smoke/**
${{ runner.temp }}/map-table-tests/**
${{ runner.temp }}/native-sample-tests/**
jasperserver/jasperserver-custom-visualization/target/cv-browser/**
if-no-files-found: ignore
retention-days: 7
Expand Down
37 changes: 36 additions & 1 deletion .github/workflows/local-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ on:
- '.dockerignore'
- '.gitattributes'
- 'compose.yaml'
- 'jasperserver/**'
- 'jasperserver-ui/**'
- 'scripts/test-openjrs-branding.py'
- 'scripts/test-legacy-viewer.py'
- 'scripts/test-sample-map-table.py'
- 'scripts/sync-jr7-samples.py'
- 'scripts/update-native-samples.py'
- 'scripts/test-native-samples.py'
- 'scripts/verify-no-vendor-heartbeat.py'
- 'scripts/verify-native-reports.py'
- 'docker/local/**'
- '.github/workflows/local-docker.yml'

Expand All @@ -28,13 +38,16 @@ jobs:
JRS_BASE_URL: http://127.0.0.1:18080/jasperserver
JRS_SMOKE_USER: jasperadmin
JRS_SMOKE_PASSWORD: jasperadmin
OPENJRS_JAVA_OPTS: -Xms256m -Xmx2048m -Djava.awt.headless=true -Dopenjrs.map.tile.url=http://127.0.0.1:8080/jasperserver/scripts/openjrs-map-test-tile.png
steps:
- uses: actions/checkout@v4
- name: Validate Compose and shell scripts
run: |
docker compose config --quiet
bash -n docker/local/*.sh
python3 -m py_compile docker/local/configure.py
python3 scripts/sync-jr7-samples.py
python3 scripts/verify-native-reports.py
- name: Build frontend, backend, initializer and runtime images
run: |
set -o pipefail
Expand All @@ -58,6 +71,14 @@ jobs:
run: |
python3 scripts/test-openjrs-branding.py
python3 scripts/test-legacy-viewer.py
- name: Check native JR7 samples, MDX and drilldown
run: python3 scripts/test-native-samples.py
- name: Check shipped table, OpenStreetMap, drilldown and image exports
env:
JRS_MAP_EXPORT: '1'
run: |
docker compose cp jasperserver/jasperserver-custom-visualization/src/test/resources/map-test-tile.png openjrs:/usr/local/tomcat/webapps/jasperserver/scripts/openjrs-map-test-tile.png
python3 scripts/test-sample-map-table.py
- name: Check sandboxed Chromium in the runtime image
run: docker compose exec -T openjrs chromium --headless --disable-gpu --dump-dom about:blank
- name: Export a Community visualization using Chromium inside Tomcat
Expand All @@ -70,7 +91,19 @@ jobs:
docker compose logs --no-color > "$RUNNER_TEMP/docker-runtime.log" 2>&1 || true
docker compose ps -a > "$RUNNER_TEMP/docker-status.txt" 2>&1 || true
docker compose cp openjrs:/usr/local/tomcat/webapps/jasperserver/WEB-INF/logs "$RUNNER_TEMP/application-logs" || true
rg -n -A20 'ERROR|Caused by:' "$RUNNER_TEMP/application-logs/jasperserver.log" | tail -100 || true
python3 - <<'PY'
import os
from pathlib import Path
log = Path(os.environ['RUNNER_TEMP']) / 'application-logs/jasperserver.log'
if log.exists():
lines = log.read_text(errors='replace').splitlines()
selected = set()
for index, line in enumerate(lines):
if 'ERROR' in line or 'Caused by:' in line:
selected.update(range(index, min(index + 21, len(lines))))
for index in sorted(selected)[-150:]:
print(str(index + 1) + ': ' + lines[index])
PY
- uses: actions/upload-artifact@v4
if: always()
with:
Expand All @@ -82,6 +115,8 @@ jobs:
${{ runner.temp }}/openjrs-branding/**
${{ runner.temp }}/viewer-smoke/**
${{ runner.temp }}/docker-cv.pdf
${{ runner.temp }}/map-table-tests/**
${{ runner.temp }}/native-sample-tests/**
retention-days: 7
- name: Remove disposable CI environment
if: always()
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tomcat/
ide/
/.env
/docker/local/__pycache__/
/openjrs-sample-backups/
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
# syntax=docker.io/docker/dockerfile:1
# Local development image. Dependency audit exceptions remain diagnostic only.
FROM node:14.21.3-bullseye AS frontend
FROM docker.io/library/node:14.21.3-bullseye AS frontend
RUN apt-get update && apt-get install -y --no-install-recommends python3 make g++ zip \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
Expand All @@ -14,11 +14,11 @@ RUN yarn run clean && yarn run build \
&& cd jrs-ui && yarn run overlay \
&& cd build/overlay && zip -qr /tmp/jrs-ui-overlay.zip .

FROM eclipse-temurin:8-jdk-jammy AS java8
FROM maven:3.9.9-eclipse-temurin-8 AS maven-bin
FROM tomcat:9.0-jdk8-temurin AS tomcat-bin
FROM docker.io/library/eclipse-temurin:8-jdk-jammy AS java8
FROM docker.io/library/maven:3.9.9-eclipse-temurin-8 AS maven-bin
FROM docker.io/library/tomcat:9.0-jdk8-temurin AS tomcat-bin

FROM debian:bookworm-slim AS build-tools
FROM docker.io/library/debian:bookworm-slim AS build-tools
RUN apt-get update && apt-get install -y --no-install-recommends \
ant ant-contrib ca-certificates curl fontconfig fonts-dejavu-core \
postgresql-client python3 unzip util-linux \
Expand All @@ -33,6 +33,8 @@ FROM build-tools AS builder
WORKDIR /src
COPY jasperserver jasperserver
COPY scripts/verify-legacy-war-deps.py scripts/verify-legacy-war-deps.py
COPY scripts/verify-no-vendor-heartbeat.py scripts/verify-no-vendor-heartbeat.py
COPY scripts/verify-native-reports.py scripts/verify-native-reports.py
COPY docker/local /opt/openjrs-docker
COPY --from=frontend /tmp/jrs-ui-overlay.zip /tmp/jrs-ui-overlay.zip
RUN --mount=type=cache,id=openjrs-maven,target=/root/.m2,sharing=locked \
Expand All @@ -44,7 +46,7 @@ RUN mkdir -p /root/.m2 && ln -s /opt/maven-repository /root/.m2/repository
WORKDIR /src/jasperserver/buildomatic
ENTRYPOINT ["bash", "/opt/openjrs-docker/initialize.sh"]

FROM debian:bookworm-slim AS runtime
FROM docker.io/library/debian:bookworm-slim AS runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates chromium chromium-sandbox curl fontconfig fonts-dejavu-core tini \
&& rm -rf /var/lib/apt/lists/* \
Expand Down
113 changes: 110 additions & 3 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,112 @@
# OpenJRS Server — JasperReports Server CE migration baseline

## Native JR7 reports — BREAKING CHANGE

OpenJRS accepts **native JasperReports 7.1.0 JRXML/JRTX only**. The automatic
JR6 XML conversion module, its dependency and its extension registration have
been removed. JR6 sources must be migrated before import; JR6 compiled `.jasper`
files must be regenerated with JR7. Keeping a database volume or rebuilding
an image does not migrate the reports stored in that database.

All seven JRXML definitions in the PostgreSQL/MySQL Community catalogs are native:
Employees, EmployeeAccounts, FoodmartSalesMondrianReport, CustomersReport,
OrdersReport (subreport), TableReport and MapReport. Standalone Community examples
and production/remote-test fixtures have also been rewritten with the official
JR7 writer. The Community import-test packages contain another thirteen native
JRXML definitions and one native JRTX style template. Source copyright/license
comments are retained. Historical Pro/Visualize.js archives and old `script-revs`
upgrade catalogs are outside the Community bootstrap and this migration.

For user reports, use [Jaspersoft Studio 7 or later](https://github.com/Jaspersoft/jasperreports/blob/7.1.0/changes.txt)
to migrate source files and style templates, review renamed APIs/component modules,
recompile with JR7, and validate data sources, subreports, interactions and exports
before import. There is no JR6 runtime or automatic fallback. The existing web
viewer and the Community visualization implementation retain their JR7 integration.

The parent aligns Jackson with JR7's declared versions (2.22.3, annotations 2.22)
and JFreeChart with 1.5.6. Even the official native JR7 pie example fails with
the former Jackson 2.13.4 polymorphic plot merge. The auxiliary ChartPart book
example uses a Community pie chart for customer counts by country in place of
its commercial Highcharts component; title, bookmarks and book navigation remain.
New JFreeChart no longer needs `jcommon`; Jackson's JAXB provider also removes
the redundant `jakarta.xml.bind-api` path while `jaxb-api` remains. Twelve new
artifact hashes, including the resolved Activation API version, were checked
against Maven Central and recorded in
[`jr7-native-reports-provenance.json`](jasperserver/deps/jr7-native-reports-provenance.json).
The diagnostic allowance pins these exact replacements. The original strict
Buildomatic inventory and the unresolved SiteMesh review remain unchanged.

**BREAKING CHANGE — PDF accessibility:** bundled examples/fixtures that requested
tagged PDF now set
`net.sf.jasperreports.export.pdf.tagged=false` and export ordinary, untagged PDF.
JasperReports 7.1.0 Community's default PDF tagger rejects tagged export; the
official silent factory also produces untagged output. This is not accessible
tagged PDF or a PDF/UA compliance claim. PDF accessibility is deferred to separate
work. Existing structural tag properties remain in the JRXML for that work but
have no effect while tagging is disabled. In the main CE catalog this affects
Employees, EmployeeAccounts and Foodmart; auxiliary AllAccounts, SalesByMonth,
ParamMany and import-package examples also use ordinary PDF. This changes sample definitions:
there is no global silent tagger or override of users' report settings.

Existing databases preserve their stored reports on image rebuild. From an updated
checkout with the local server running, `python3 scripts/update-native-samples.py`
previews the upgrade and `--apply` backs up and updates only known unmodified
originals among all seven catalog JRXML files. Customized files are refused, versions are checked and volumes are
preserved. See [native sample sources and upgrade instructions](jasperserver/samples/jrxml7/README.md).

## Table Report and OpenStreetMap example

The shipped Table Report stores native JR7 hyperlink parameters and current
stretch aliases directly in its JRXML. Its city
drilldown points to `/reports/interactive/MapReport` and retains coordinates.

The native MapReport renders through the Community visualization
integration using bundled Leaflet 1.9.4 and OpenStreetMap tiles. Google Maps and
its API key are no longer used for these maps. The shipped Map Report keeps its
default center and accepts latitude, longitude and numeric zoom parameters;
missing/blank request parameters use its defaults. An existing database needs
the explicit sample update described above before the old adapter is removed.

**Compatibility change:** MapReport now uses OpenStreetMap/Leaflet directly.
User reports with Google map components require their own explicit component
migration; no automatic map conversion remains.

The browser can pan and zoom the map; PDF/XLSX images use sandboxed Chromium,
configured through `chrome.path` as for other Community visualizations. Export
waits for tile loading; missing tiles do not silently produce a successful blank
map. Runtime network access to the tile provider is required. The default public
OSM endpoint is for light interactive use; follow its tile policy and use an
appropriate provider for sustained traffic. JVM option
`-Dopenjrs.map.tile.url=https://your-provider/{z}/{x}/{y}.png` selects another tile
endpoint. Preserve the attribution required by the provider and map data.

CI uses deterministic local tiles to test the renderer, coordinates, pan/zoom,
table drilldown and image exports without crawling a public map service. It does
not verify availability of the public OSM service from each deployment network.
Leaflet's provenance/license and OSM policy links are packaged in
`org/openjrs/maps/NOTICE.md` in the Community visualization module.

## Vendor heartbeat removal — BREAKING CHANGE

OpenJRS removes the Jaspersoft heartbeat subsystem: outbound HTTP client,
system/database/browser collectors, weekly Quartz job, opt-in dialog, and the
`/heartbeat.html` and `/heartbeatInfo.html` handlers. These handlers now return
HTTP 404. Extensions that imported the removed `war.common.Heartbeat*` classes
or injected `concreteHeartbeatBean` must remove that integration.

Legacy `heartbeat.*` and `jrs.config.enable.heartbeat*` settings no longer enable
collection or transmission. Previously persisted consent/cache files are not
read. No repository data or encryption keys need to be deleted for this change;
rebuild and recreate the application container to replace an existing image.

The WAR verification checks the packaged backend and frontend for the removed
client and wiring. Browser tests check that the dialog/configuration is absent,
the former handlers return 404, and no heartbeat browser requests occur during
login and report viewing. This change addresses the vendor heartbeat, not a
general audit of every possible external connection or third-party extension.

Upstream copyright and license notices remain in place.

> Historical build-recovery notes. See the [project README](README.md#current-status) for current branch status and verified tests. The JasperReports 7.1.0 migration is maintained separately in [PR #2](https://github.com/rftd/jasperreports-server-ce/pull/2).

This branch starts with **build recovery**, not a JasperReports 7 runtime upgrade. The current application and its saved reports must remain unchanged until the original build is reproducible.
Expand Down Expand Up @@ -87,7 +194,7 @@ It does not establish full coverage of formatting, save, crosstab interactions,
drill-down or every report/component type. A replacement viewer belongs in a
separate PR; the current migration preserves this viewer.

The JR7 legacy XML loader and Community visualization port have their own
scope and limitations documented in `jasperserver-legacy-jrxml/README.md` and
`jasperserver-custom-visualization/README.md`. Passing the diagnostic CI does
Native sample sources and the Community visualization port have their own
scope and limitations documented in `jasperserver/samples/jrxml7/README.md` and
`jasperserver/jasperserver-custom-visualization/README.md`. Passing the diagnostic CI does
not approve the unresolved production WAR inventory differences.
Loading
Loading