Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven 4 flavour does not use full terminal #870

Closed
mthmulders opened this issue Jul 25, 2023 · 1 comment
Closed

Maven 4 flavour does not use full terminal #870

mthmulders opened this issue Jul 25, 2023 · 1 comment
Milestone

Comments

@mthmulders
Copy link

One of the many things I like in Maven 4 (alpha) is the longer line width. As an example, see the first few lines of any build:

Apache Maven 4.0.0-alpha-8-SNAPSHOT (36db1e35cac5e8c72bf0c795dd08756e50079e05)
Maven home: /opt/homebrew/Cellar/maven-snapshot/4.0.0-alpha-8-20230719.153755-14/libexec
Java version: 17.0.7, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
Default locale: en_NL, platform encoding: UTF-8
OS name: "mac os x", version: "13.4.1", arch: "aarch64", family: "mac"
[INFO] Scanning for projects...
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]

The equivalent with mvnd however does not leverage the full terminal width:

Apache Maven Daemon (mvnd) 1.0-m7 darwin-aarch64 native client (b2ef5d81997adbcdb72dc8c5603722538fa641fe)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty
Apache Maven 4.0.0-alpha-7 (bf699a388cc04b8e4088226ba09a403b68de6b7b)
Maven home: /Users/maarten/Tools/maven-mvnd-1.0-m7-m40-darwin-aarch64/mvn                                                                                                                                          Java version: 17.0.7, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
Default locale: en_NL, platform encoding: UTF-8
OS name: "mac os x", version: "13.4.1", arch: "aarch64", family: "mac"
[INFO] Processing build on daemon 93e78205
[INFO] Scanning for projects...
[INFO] BuildTimeEventSpy is registered.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]

In both cases, I ran the validate phase and added -V to print the version of Maven (Daemon).

@gnodet
Copy link
Contributor

gnodet commented Jul 31, 2023

Nice catch. I think the reason is that mvnd needs to provide a custom MessageBuilderFactory with an implementation that would do something similar to

private static int getTerminalWidth() {
int terminalWidth;
try {
terminalWidth = Environment.MVND_TERMINAL_WIDTH.asInt();
} catch (Exception e) {
terminalWidth = 80;
}
return terminalWidth;
}

@gnodet gnodet added this to the 1.0-m8 milestone Jul 31, 2023
gnodet added a commit to gnodet/mvnd that referenced this issue Oct 16, 2023
gnodet added a commit to gnodet/mvnd that referenced this issue Oct 16, 2023
gnodet added a commit to gnodet/mvnd that referenced this issue Oct 16, 2023
@gnodet gnodet closed this as completed in 18d0583 Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants