From d4e161b16fdd8d3804c0159a651c01030d521602 Mon Sep 17 00:00:00 2001 From: samin rahman Date: Tue, 10 Nov 2026 16:01:01 +1100 Subject: [PATCH 1/2] UID2-8298: bake Maven dependencies and compiled tests into the e2e image Run a Maven test phase at image build time so the local repository and compiled test classes are part of the image. Container start no longer downloads dependencies or compiles the test sources before running the selected suites. The build step uses a tag filter that matches no test, so surefire and its JUnit provider are resolved while nothing is executed. BasicTest is selected because the suite classes fail when a filter excludes all tests. CMD, ENV and the base image are unchanged. Co-Authored-By: Claude Sonnet 5.5 --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index accb17f..6025d2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,13 @@ WORKDIR /app COPY ./pom.xml ./pom.xml COPY ./src ./src +# Resolve dependencies and compile the tests at build time so container start +# does not download or compile anything. The group filter matches no test, so +# surefire and its JUnit provider are resolved while no test runs and the build +# makes no calls to live endpoints. BasicTest is selected because the suite +# classes fail with NoTestsDiscoveredException when a filter excludes all tests. +RUN mvn -B test -Dtest=BasicTest -Dgroups=no-such-tag + ###################### # Configure env vars # ###################### From 196d453901b78c09eaae71fc99adfaf32b61a6ec Mon Sep 17 00:00:00 2001 From: samin rahman Date: Tue, 10 Nov 2026 16:04:11 +1100 Subject: [PATCH 2/2] UID2-8298: use test-compile for the image build step Replace the filtered test phase with test-compile. It resolves the project and compiler dependencies and compiles the test sources without running JUnit, and does not depend on any particular test class existing. Co-Authored-By: Claude Sonnet 5.5 --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6025d2a..9f87305 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,9 @@ COPY ./pom.xml ./pom.xml COPY ./src ./src # Resolve dependencies and compile the tests at build time so container start -# does not download or compile anything. The group filter matches no test, so -# surefire and its JUnit provider are resolved while no test runs and the build -# makes no calls to live endpoints. BasicTest is selected because the suite -# classes fail with NoTestsDiscoveredException when a filter excludes all tests. -RUN mvn -B test -Dtest=BasicTest -Dgroups=no-such-tag +# does not download or compile the project's test sources. test-compile runs no +# tests, so the build makes no calls to live endpoints. +RUN mvn -B test-compile ###################### # Configure env vars #