Skip to content

Commit ac870db

Browse files
Copilotpethers
andauthored
chore: replace unmaintained unix-maven-plugin with jdeb, upgrade Maven to 3.9.14 (#8487)
* Initial plan * chore: replace unix-maven-plugin with jdeb for .deb packaging Replace the unmaintained com.stratio.mojo.unix:unix-maven-plugin with org.vafer:jdeb v1.14 for Debian package creation. This removes the dependency on Maven 3.9.9 and enables upgrading to Maven 3.9.14. - Change packaging from 'deb' to 'pom' (jdeb attaches .deb artifact) - Use maven-dependency-plugin to unpack jetty-home and WAR - Use maven-antrun-plugin to prepare staging directory - Use jdeb to assemble the .deb package - Create src/deb/control/ with control file and maintainer scripts - Remove unix-maven-plugin from parent-pom plugin management - Update Maven version from 3.9.9 to 3.9.14 across all workflows, devcontainer, and documentation Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/cfec7da8-214e-4e03-8dc5-beff1135cf9d * chore: update release-drafter Maven version and add overwrite comment Update .deb filename to match release workflow naming convention. Add explanatory comment for overwrite attribute on cia.xml copy. Update release-drafter.yml Maven version reference to 3.9.14. Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/cfec7da8-214e-4e03-8dc5-beff1135cf9d * fix: move dependency-plugin unpack to process-classes phase to fix javadoc:aggregate The unpack executions at compile phase caused MDEP-98 error during javadoc:aggregate because the WAR reactor artifact wasn't packaged yet. Moving to process-classes prevents this since javadoc:aggregate only forks lifecycle up to compile, while still running before the antrun staging at prepare-package phase. Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/9a4ef88b-e273-4e4c-8fd1-06b9eaa27784 * fix: apply review comments - idempotent control scripts, fix MDEP-98 in mvn test - Make preinst idempotent: check if cia user exists before creating - Make postinst idempotent: use ln -sf, check file existence, track setup_ok for all operations, idempotent properties update - Make prerm idempotent: use -f flags, check existence before stop - Replace maven-dependency-plugin unpack with Ant unzip tasks to fix MDEP-98 during both javadoc:aggregate AND mvn test reactor builds (process-classes phase was still reached by mvn test) Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/19ad2014-94dc-48ba-befc-353f23b94af8 * fix: apply review feedback — fix shebangs, guard postrm purge, clean staging dir - Fix shebangs in all 4 control scripts: '#! /bin/bash' → '#!/bin/bash' - Guard postrm destructive cleanup with '$1 = purge' to preserve logs/javamelody on upgrade/remove - Add staging directory cleanup at start of antrun target to prevent stale files from prior builds without 'clean' Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/d2c69690-09e1-4709-8b70-4ea468d88ad0 * chore: initial plan for review feedback Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/bc588156-5dfa-401f-acdb-bb07c1116e16 * fix: make cacerts tolerant and use reactor WAR path - postinst: Missing cacerts is now tolerant (warns but doesn't fail setup_ok), allowing installs on systems without ca-certificates-java - pom.xml: WAR now referenced from reactor build output (../citizen-intelligence-agency/target/) instead of local repository, so 'mvn clean package' from repo root works without prior 'install' Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/bc588156-5dfa-401f-acdb-bb07c1116e16 * fix: apply review - root:root ownership, nologin shell, jre-headless suggest - jdeb perm mapper: cia:cia → root:root to prevent privilege escalation (postinst still sets cia:cia on runtime dirs via chown) - preinst: use /usr/sbin/nologin instead of /bin/sh for service account - control: suggest openjdk-21-jre-headless instead of jdk-headless Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/14b48673-6d83-470f-87ee-950f9069e0c9 * fix: set filemode 644 for general files, 600 for keystore.p12; only remove managed cacerts symlink in prerm Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/a4f86eb6-c74c-40a6-a9f1-025e0b8b38b4 * fix: use readlink without -f in prerm to check immediate symlink target Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> Agent-Logs-Url: https://github.com/Hack23/cia/sessions/a4f86eb6-c74c-40a6-a9f1-025e0b8b38b4 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
1 parent 7d84182 commit ac870db

23 files changed

+279
-180
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ RUN chmod +x /usr/local/bin/init-postgresql.sh \
6969
&& dpkg-reconfigure -f noninteractive tzdata
7070

7171
# Use the built-in MAVEN_VERSION argument from the base image
72-
ARG MAVEN_VERSION=3.9.9
72+
ARG MAVEN_VERSION=3.9.14
7373
ENV MAVEN_HOME=/usr/share/maven
7474
ENV PATH=${PATH}:${MAVEN_HOME}/bin
7575
ENV MAVEN_OPTS="-Xmx8192m -Xms2048m -XX:+UseG1GC"

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"version": "21",
5959
"distribution": "open",
6060
"installMaven": true,
61-
"mavenVersion": "3.9.9",
61+
"mavenVersion": "3.9.14",
6262
"installAnt": true
6363
},
6464
"ghcr.io/devcontainers/features/node:1": {

.github/MAVEN_CACHING_STRATEGY.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ We use GitHub Actions `actions/cache@v5` to cache Maven artifacts across workflo
1818
~/.m2/repository
1919
~/.m2/wrapper
2020
~/.sonar/cache
21-
key: ${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml', '.mvn/**') }}
21+
key: ${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml', '.mvn/**') }}
2222
restore-keys: |
23-
${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml') }}
24-
${{ runner.os }}-maven-3.9.9-
23+
${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml') }}
24+
${{ runner.os }}-maven-3.9.14-
2525
${{ runner.os }}-maven-
2626
```
2727
@@ -36,12 +36,12 @@ We use GitHub Actions `actions/cache@v5` to cache Maven artifacts across workflo
3636
### Primary Cache Key
3737

3838
```
39-
${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml', '.mvn/**') }}
39+
${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml', '.mvn/**') }}
4040
```
4141
4242
**Components:**
4343
- `${{ runner.os }}` - Platform-specific (Linux, macOS, Windows)
44-
- `maven-3.9.9` - Maven version for isolation
44+
- `maven-3.9.14` - Maven version for isolation
4545
- `${{ hashFiles('**/pom.xml', '.mvn/**') }}` - Hash of all POM files and Maven config
4646
4747
**Benefits:**
@@ -55,13 +55,13 @@ Cache restoration follows a hierarchical fallback strategy:
5555
5656
1. **Level 1: Exact POM match**
5757
```
58-
${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml') }}
58+
${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml') }}
5959
```
6060
Restores cache when most POM files match (excludes .mvn changes)
6161
6262
2. **Level 2: Maven version match**
6363
```
64-
${{ runner.os }}-maven-3.9.9-
64+
${{ runner.os }}-maven-3.9.14-
6565
```
6666
Restores any cache from same Maven version (allows POM differences)
6767

.github/WORKFLOWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ mvn -B test --file pom.xml -Prelease-site,all-modules \
5151

5252
**Environment**:
5353
- Java 26 (Temurin)
54-
- Maven 3.9.9
54+
- Maven 3.9.14
5555
- PostgreSQL 18 with pgaudit, pgvector extensions
5656
- Google Chrome for UI testing
5757
- Xvfb for headless browser testing

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The Citizen Intelligence Agency (CIA) is a volunteer-driven, open-source intelli
3232

3333
### Prerequisites
3434
- Java 26 JDK
35-
- Maven 3.9.9 or later
35+
- Maven 3.9.14 or later
3636
- PostgreSQL (for full integration testing, review ../service.data.impl/README-SCHEMA-MAINTENANCE.md for task related to any database changes)
3737

3838
### Build Commands

.github/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ template: |
121121
122122
## 💻 Technology Stack
123123
124-
**Runtime:** Java 26 (Feature Release) • **Source:** Java 21 (LTS) • **Build:** Maven 3.9.9 • **Database:** PostgreSQL 18
124+
**Runtime:** Java 26 (Feature Release) • **Source:** Java 21 (LTS) • **Build:** Maven 3.9.14 • **Database:** PostgreSQL 18
125125
126126
## 🙏 Contributors
127127
Thanks to $CONTRIBUTORS for their contributions to this release!

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ jobs:
131131
~/.m2/wrapper
132132
~/.sonar/cache
133133
# Include Maven version in key for isolation
134-
key: ${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml', '.mvn/**') }}
134+
key: ${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml', '.mvn/**') }}
135135
restore-keys: |
136-
${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml') }}
137-
${{ runner.os }}-maven-3.9.9-
136+
${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml') }}
137+
${{ runner.os }}-maven-3.9.14-
138138
${{ runner.os }}-maven-
139139
140140
- name: Cache APT packages
@@ -301,7 +301,7 @@ jobs:
301301
- name: Set up Maven
302302
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
303303
with:
304-
maven-version: 3.9.9
304+
maven-version: 3.9.14
305305

306306
- name: Build with Maven
307307
run: mvn -B clean install --file pom.xml -Prelease-site,all-modules -DskipTests -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dspdx.skip=true -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.pool=true

.github/workflows/copilot-setup-steps.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ jobs:
166166
~/.m2/wrapper
167167
~/.sonar/cache
168168
# Include Maven version in key for isolation
169-
key: ${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml', '.mvn/**') }}
169+
key: ${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml', '.mvn/**') }}
170170
restore-keys: |
171-
${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml') }}
172-
${{ runner.os }}-maven-3.9.9-
171+
${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml') }}
172+
${{ runner.os }}-maven-3.9.14-
173173
${{ runner.os }}-maven-
174174
- name: Cache APT packages
175175
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
@@ -402,7 +402,7 @@ jobs:
402402
- name: Set up Maven
403403
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
404404
with:
405-
maven-version: 3.9.9
405+
maven-version: 3.9.14
406406

407407
- name: Build with Maven
408408
run: mvn -B clean install --file pom.xml -Prelease-site,all-modules -DskipTests -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dspdx.skip=true -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.pool=true

.github/workflows/javadoc-generation.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ jobs:
9797
~/.m2/wrapper
9898
~/.sonar/cache
9999
# Include Maven version in key for isolation
100-
key: ${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml', '.mvn/**') }}
100+
key: ${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml', '.mvn/**') }}
101101
restore-keys: |
102-
${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml') }}
103-
${{ runner.os }}-maven-3.9.9-
102+
${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml') }}
103+
${{ runner.os }}-maven-3.9.14-
104104
${{ runner.os }}-maven-
105105
106106
- name: Cache APT packages
@@ -120,7 +120,7 @@ jobs:
120120
- name: Set up Maven
121121
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
122122
with:
123-
maven-version: 3.9.9
123+
maven-version: 3.9.14
124124

125125
- name: Build project (skip tests for faster javadoc generation)
126126
run: mvn -B clean install -DskipTests -Prelease-site,all-modules -DfailIfNoTests=false -Dspdx.skip=true -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.pool=true

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ jobs:
106106
~/.m2/wrapper
107107
~/.sonar/cache
108108
# Include Maven version in key for isolation
109-
key: ${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml', '.mvn/**') }}
109+
key: ${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml', '.mvn/**') }}
110110
restore-keys: |
111-
${{ runner.os }}-maven-3.9.9-${{ hashFiles('**/pom.xml') }}
112-
${{ runner.os }}-maven-3.9.9-
111+
${{ runner.os }}-maven-3.9.14-${{ hashFiles('**/pom.xml') }}
112+
${{ runner.os }}-maven-3.9.14-
113113
${{ runner.os }}-maven-
114114
115115
- name: Add PostgreSQL PGDG repository
@@ -248,7 +248,7 @@ jobs:
248248
- name: Set up Maven
249249
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
250250
with:
251-
maven-version: 3.9.9
251+
maven-version: 3.9.14
252252

253253
- name: Set Version for release
254254
run: mvn -B --file parent-pom/pom.xml versions:set -DnewVersion="${{ github.event.inputs.release }}" -Pall-modules versions:commit -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.pool=true

0 commit comments

Comments
 (0)