Compare commits

...
3 Commits
Author SHA1 Message Date
james.maes da8044d6f2 Merge pull request #23 from QRun-IO/develop
release: qqq-orb 0.6.9 (snapshot refresh)
2026-10-14 10:04:52 -05:00
james.maes 9ea11d511b Merge pull request #22 from QRun-IO/feature/snapshot-dependency-refresh
fix(maven): refresh SNAPSHOT dependencies on every build
2026-10-14 10:02:40 -05:00
james.maesandClaude Opus 5.5 81c5086ee4 fix(maven): refresh SNAPSHOT dependencies on every build
The ~/.m2 cache is keyed only on the pom checksum, so a SNAPSHOT dependency
restored from cache was not re-checked within Maven's daily update policy and
builds ran against stale snapshots. Compile, verify and frontend test steps
now pass --update-snapshots. Adds tests/test_snapshot_refresh.sh to the suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:01:04 -05:00
7 changed files with 37 additions and 5 deletions

No files matched your search

+3
View File
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Maven compile, verify and frontend test steps pass `--update-snapshots`, so SNAPSHOT dependencies restored from the pom-checksum-keyed `~/.m2` cache are re-checked against the remote on every build instead of going stale
### Added
- Auto-publish `dev:snapshot` on develop branch pushes
- Auto-publish production releases on main branch pushes with semantic version bumping
+4 -1
View File
@@ -14,4 +14,7 @@
set -e
echo "Running Maven Compile with optimized settings"
mvn -s /tmp/circleci/mvn-settings.xml -T4 --no-transfer-progress compile
## --update-snapshots: the ~/.m2 cache is keyed only on the pom checksum, so
## without it a SNAPSHOT dependency restored from cache is never re-checked
## (Maven's daily update policy) and builds run against stale snapshots.
mvn -s /tmp/circleci/mvn-settings.xml --update-snapshots -T4 --no-transfer-progress compile
+4 -1
View File
@@ -21,4 +21,7 @@ export PORT=3001
npm run start &
dockerize -wait tcp://localhost:3001 -timeout 3m
export QQQ_SELENIUM_HEADLESS=true
mvn -s /tmp/circleci/mvn-settings.xml --no-transfer-progress -B test
## --update-snapshots: the ~/.m2 cache is keyed only on the pom checksum, so
## without it a SNAPSHOT dependency restored from cache is never re-checked
## (Maven's daily update policy) and builds run against stale snapshots.
mvn -s /tmp/circleci/mvn-settings.xml --update-snapshots --no-transfer-progress -B test
+4 -1
View File
@@ -23,4 +23,7 @@ set -e
###################################################
## Compile Maven project with optimized settings ##
###################################################
mvn -s /tmp/circleci/mvn-settings.xml -T4 --no-transfer-progress compile
## --update-snapshots: the ~/.m2 cache is keyed only on the pom checksum, so
## without it a SNAPSHOT dependency restored from cache is never re-checked
## (Maven's daily update policy) and builds run against stale snapshots.
mvn -s /tmp/circleci/mvn-settings.xml --update-snapshots -T4 --no-transfer-progress compile
+4 -1
View File
@@ -23,4 +23,7 @@ set -e
########################################################
## Run Maven verify lifecycle with optimized settings ##
########################################################
mvn -s /tmp/circleci/mvn-settings.xml -T4 --no-transfer-progress verify
## --update-snapshots: the ~/.m2 cache is keyed only on the pom checksum, so
## without it a SNAPSHOT dependency restored from cache is never re-checked
## (Maven's daily update policy) and builds run against stale snapshots.
mvn -s /tmp/circleci/mvn-settings.xml --update-snapshots -T4 --no-transfer-progress verify
+3 -1
View File
@@ -17,6 +17,7 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEST_SCRIPT="$SCRIPT_DIR/test_calculate_version.sh"
SETTINGS_TEST_SCRIPT="$SCRIPT_DIR/test_maven_settings_output.sh"
SNAPSHOT_TEST_SCRIPT="$SCRIPT_DIR/test_snapshot_refresh.sh"
VERBOSE=false
CI_MODE=false
@@ -73,7 +74,7 @@ main() {
## CI mode: minimal output, focus on results ##
###############################################
echo "Running tests in CI mode..."
if { "$TEST_SCRIPT" $test_args && bash "$SETTINGS_TEST_SCRIPT"; } > /tmp/test_output.log 2>&1; then
if { "$TEST_SCRIPT" $test_args && bash "$SETTINGS_TEST_SCRIPT" && bash "$SNAPSHOT_TEST_SCRIPT"; } > /tmp/test_output.log 2>&1; then
echo "✅ All tests passed!"
exit 0
else
@@ -88,6 +89,7 @@ main() {
###################################
"$TEST_SCRIPT" $test_args
bash "$SETTINGS_TEST_SCRIPT"
bash "$SNAPSHOT_TEST_SCRIPT"
fi
}
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# Asserts that every Maven build/test entry point refreshes SNAPSHOT dependencies.
# The ~/.m2 cache is keyed only on the pom checksum, so without --update-snapshots
# a cached SNAPSHOT is never re-checked within Maven's daily update window.
set -u
cd "$(dirname "$0")/.." || exit 1
fail=0
for f in src/scripts/mvn_build_compile.sh src/scripts/mvn_verify.sh src/scripts/frontend_build_compile.sh src/scripts/frontend_test_run.sh; do
if grep -E '^mvn ' "$f" | grep -q -- '--update-snapshots'; then
echo "PASS $f"
else
echo "FAIL $f: mvn invocation lacks --update-snapshots"; fail=1
fi
done
exit $fail