MartinKanters commented on a change in pull request #472:
URL: https://github.com/apache/maven/pull/472#discussion_r633294353
##########
File path:
maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
##########
@@ -53,9 +54,15 @@
{
private final Logger logger;
- private static final int LINE_LENGTH = 72;
+ private static final int MAX_LOG_PREFIX_SIZE = 8; // "[ERROR] "
+ private static final int PROJECT_STATUS_SUFFIX_SIZE = 20; // "SUCCESS [
0.000 s]"
+ private static final int MIN_TERMINAL_WIDTH = 60;
+ private static final int MAX_TERMINAL_WIDTH = 130;
+ private static final int TERMINAL_WIDTH =
+ Math.min( MAX_TERMINAL_WIDTH, Math.max(
MessageUtils.getTerminalWidth(), MIN_TERMINAL_WIDTH ) );
Review comment:
Ah, I didn't realize that tools would create new `MavenSession`'s while
reusing the classloaders, thanks for explaining!
I assume the terminal width would have to be publicly available on the
session, in order for `mvnd` to create new sessions with the same width. For
Eclipse, I assume that they would have to set the width to their internal
terminal/logger window.
I'm just not sure whether `MavenSession` is the right class for this,
because afaik it's currently cli-unaware. Perhaps there is a better place, but
I don't know that by heart.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]