cstamas commented on code in PR #2311:
URL: https://github.com/apache/maven/pull/2311#discussion_r2094613265


##########
impl/maven-executor/src/main/java/org/apache/maven/cling/executor/internal/ToolboxTool.java:
##########
@@ -142,7 +142,7 @@ private String validateOutput(boolean shave, 
ByteArrayOutputStream stdout, ByteA
         }
         // sanity checks: stderr has any OR result is empty string (no method 
should emit empty string)
         if (stderr.size() > 0 || result.trim().isEmpty()) {
-            throw new ExecutorException(
+            System.err.println(

Review Comment:
   We cannot throw, as this code (whole `maven-executor`) purpose is to execute 
Maven (embedded in JVM, or forked as in forked child process) _real Maven mvn 
command_ in IT-like scenarios (this very code is used in Maven ITs). This 
codebase supports Maven 3 and Maven 4 transparently. The goal of PR is to 
"prepare it for Java 24".
   
   All existing Maven versions released so far (including Maven 4 rc releases) 
**emit warning on Java 24**, and there is nothing to be done here (the MNG-8399 
and/or alike). Hence, to make this code work on Java 24 AND be able to use 
current releases (ie. 3.9.9 or 4-rc-3), it cannot throw anymore, as err logging 
is part of "normal operation" on those Maven versions on Java 24. Or in other 
words, if we'd throw here (as before), we would not be able to run Maven 3.9.9 
and 4-rc-3 and older Maven versions using Java 24, only "fixed" Maven 3.9.10 
and upcoming 4-rc-4, and that would narrow the capabilities of this module too 
much.
   
   The point of this PR is to prepare codebase be able to run on Java 24 as is, 
and this throw was one of the obstacles preventing it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to