From ffeb2069172aa94c4418d05fd1f29e974ef4499e Mon Sep 17 00:00:00 2001
From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Date: Mon, 29 Jun 2026 02:21:44 -0700
Subject: [PATCH 1/3] fix: write generated service build artifacts to target
instead of sources
Relocate the flatten-maven-plugin output (.flattened-pom.xml) under the
module target/ directory so it no longer litters the source tree of models
and quickstarts. The diagnostic-tools.jar must remain in src/main/jib because
Quarkus container-image-jib only includes files from that fixed directory, so
it is kept out of Git via .gitignore instead. Add .gitignore backstops for all
three generated artifacts.
Fixes #2410
---
.gitignore | 5 +++++
service/facade/service-parent/pom.xml | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/.gitignore b/.gitignore
index 20b99bf4941..834fa4f6f4b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,8 @@ local
# Repository wide ignore mac DS_Store files
.DS_Store
+
+# Generated service build artifacts that must never be committed (issue #2410)
+**/src/main/jib/timefold/diagnostic-tools.jar
+**/.flattened-pom.xml
+**/timefold-model-enhanced-openapi.json
diff --git a/service/facade/service-parent/pom.xml b/service/facade/service-parent/pom.xml
index 6a37d083bc3..b4bf1c85213 100644
--- a/service/facade/service-parent/pom.xml
+++ b/service/facade/service-parent/pom.xml
@@ -302,6 +302,10 @@
true
resolveCiFriendliesOnly
true
+
+ ${project.build.directory}
+ .flattened-pom.xml
@@ -364,6 +368,9 @@
${version.ai.timefold.solver}
jar
true
+
src/main/jib/timefold
diagnostic-tools.jar
From e8321eafca49ff0270d7bad016282c12660e609b Mon Sep 17 00:00:00 2001
From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Date: Mon, 29 Jun 2026 02:25:57 -0700
Subject: [PATCH 2/3] fix: remove stale diagnostic-tools.jar from src/main/jib
on clean
The diagnostic-tools jar must stay under src/main/jib for Quarkus
container-image-jib to include it, so mvn clean (which only wipes target)
would otherwise leave a stale copy behind that a later non-enterprise build
could ship. Configure maven-clean-plugin to delete it on clean.
---
service/facade/service-parent/pom.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/service/facade/service-parent/pom.xml b/service/facade/service-parent/pom.xml
index b4bf1c85213..d25ed8b412d 100644
--- a/service/facade/service-parent/pom.xml
+++ b/service/facade/service-parent/pom.xml
@@ -385,6 +385,24 @@
org.codehaus.mojo
flatten-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-clean-plugin
+
+
+
+ src/main/jib/timefold
+
+ diagnostic-tools.jar
+
+
+
+
+
From 39ce68a6ba8e83238036a6e7c66d0c08cbbf0e57 Mon Sep 17 00:00:00 2001
From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Date: Mon, 29 Jun 2026 02:31:41 -0700
Subject: [PATCH 3/3] fix: also delete stale diagnostic-tools.jar at build
start
Bind maven-clean-plugin to the initialize phase (with excludeDefaultDirectories
so target/ is untouched) so the generated jib jar is removed before every build,
not only on mvn clean. This prevents a stale enterprise jar from being packaged
by a later non-enterprise build that skips the copy and never runs clean.
---
service/facade/service-parent/pom.xml | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/service/facade/service-parent/pom.xml b/service/facade/service-parent/pom.xml
index d25ed8b412d..7624e1b6041 100644
--- a/service/facade/service-parent/pom.xml
+++ b/service/facade/service-parent/pom.xml
@@ -388,8 +388,9 @@
+ relocated to target/. To make sure a stale jar from a previous enterprise build is never
+ shipped by a later build that skips the copy, delete it both on clean and at the start of
+ every build (before the copy execution in generate-resources runs) (issue #2410). -->
org.apache.maven.plugins
maven-clean-plugin
@@ -402,6 +403,27 @@
+
+
+ delete-stale-diagnostic-tools
+ initialize
+
+ clean
+
+
+
+ true
+
+
+ src/main/jib/timefold
+
+ diagnostic-tools.jar
+
+
+
+
+
+