From 3d7326c35d1bcd4f111c2e3063b12047f22c9017 Mon Sep 17 00:00:00 2001 From: larsbeck Date: Tue, 16 Jun 2026 14:20:43 +0200 Subject: [PATCH] fix: do not log successful model deploy response as error DeployModelMojo called printErrorInfo() on the success branches of deploy and update, logging the platform's success response body at ERROR level even though deployment succeeded. Limit printErrorInfo() to the genuine failure branch. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../java/ai/timefold/solver/tools/maven/DeployModelMojo.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/service/tools/maven-plugin/src/main/java/ai/timefold/solver/tools/maven/DeployModelMojo.java b/service/tools/maven-plugin/src/main/java/ai/timefold/solver/tools/maven/DeployModelMojo.java index 50ff2641ec1..85b5b92272f 100644 --- a/service/tools/maven-plugin/src/main/java/ai/timefold/solver/tools/maven/DeployModelMojo.java +++ b/service/tools/maven-plugin/src/main/java/ai/timefold/solver/tools/maven/DeployModelMojo.java @@ -132,7 +132,6 @@ public void execute() throws MojoExecutionException { "Model %s (%s) has been successfully deployed into platform %s with registration key %s", modelDescriptor.get("name").asText(), modelDescriptor.get("id").asText(), platformUrl, key)); - printErrorInfo(response); } else if (response.statusCode() >= 409) { if (getPropertyOrParameter(PROP_MODEL_OVERWRITE, overwrite)) { @@ -147,7 +146,6 @@ public void execute() throws MojoExecutionException { "Model %s (%s) has been successfully updated on platform %s with registration key %s", modelDescriptor.get("name").asText(), modelDescriptor.get("id").asText(), platformUrl, key)); - printErrorInfo(response); } else { throw new IllegalStateException( "Model deployment (override) failed with " + response.statusCode() + " status code");