fix(docker): copy the mem0 plugin POM so the Maven reactor can be built

The Dockerfile pre-copies module POMs for layer caching, but the list had
not been updated when mateclaw-plugin-mem0 was added to the root POM's
<modules>. Maven fails while constructing the reactor if a declared module
directory is missing, so `mvn -pl mateclaw-server -am dependency:go-offline`
aborted with "Child module /build/mateclaw-plugin-mem0 does not exist"
before it ever reached dependency resolution — every container build broke.

Copy the missing POM and note that this list must mirror the root POM's
<modules>, even for modules the image never builds. The module only makes
the reactor readable; it stays out of the `-pl mateclaw-server -am` build,
so the image is unchanged in size.

Fixes #566
This commit is contained in:
matevip 2026-07-28 05:46:11 -04:00
parent fcf5f3960b
commit a0f0e85eb6

View File

@ -42,12 +42,19 @@ ARG MAVEN_FLAGS=""
COPY mateclaw-server/settings.xml /root/.m2/settings.xml
# Copy the root parent plus module POMs first for Docker layer caching.
#
# This list MUST mirror <modules> in the root pom.xml, even for modules this
# image never builds. Maven fails while constructing the reactor if a declared
# module directory is missing ("Child module /build/<name> does not exist"),
# so `-pl mateclaw-server -am` aborts before it ever gets to dependency
# resolution. When a module is added to the root POM, add its pom.xml here too.
WORKDIR /build
COPY pom.xml ./pom.xml
COPY mateclaw-plugin-api/pom.xml mateclaw-plugin-api/pom.xml
COPY mateclaw-server/pom.xml mateclaw-server/pom.xml
COPY mateclaw-plugin-sample/pom.xml mateclaw-plugin-sample/pom.xml
COPY mateclaw-plugin-search-sample/pom.xml mateclaw-plugin-search-sample/pom.xml
COPY mateclaw-plugin-mem0/pom.xml mateclaw-plugin-mem0/pom.xml
# Pre-fetch backend dependencies through the reactor so the parent POM,
# dependencyManagement, and internal module versions all resolve consistently.