fix: force SNAPSHOT updates in Docker build to resolve stale cache
The BuildKit cache mount for ~/.m2/repository persists the old cameleer-license-minter SNAPSHOT (which depended on server-core). Adding -U forces Maven to re-resolve SNAPSHOTs from the Gitea registry, picking up the updated minter that depends on license-api. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,10 +15,10 @@ WORKDIR /build
|
||||
COPY .mvn/ .mvn/
|
||||
COPY mvnw pom.xml ./
|
||||
# Cache deps — BuildKit cache mount persists across --no-cache builds
|
||||
RUN --mount=type=cache,target=/root/.m2/repository ./mvnw dependency:go-offline -B || true
|
||||
RUN --mount=type=cache,target=/root/.m2/repository ./mvnw dependency:go-offline -U -B || true
|
||||
COPY src/ src/
|
||||
COPY --from=frontend /ui/dist/ src/main/resources/static/
|
||||
RUN --mount=type=cache,target=/root/.m2/repository ./mvnw package -DskipTests -B
|
||||
RUN --mount=type=cache,target=/root/.m2/repository ./mvnw package -DskipTests -U -B
|
||||
|
||||
# Runtime: target platform (amd64)
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
|
||||
Reference in New Issue
Block a user