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

mvnd modifies original output when using quiet flag #513

Closed
peteruhnak opened this issue Nov 3, 2021 · 3 comments
Closed

mvnd modifies original output when using quiet flag #513

peteruhnak opened this issue Nov 3, 2021 · 3 comments

Comments

@peteruhnak
Copy link

I am not sure whether this is intentional or not, but the output is augmented when using the quiet tag.

plain maven:

PS D:\tmp> mvn help:evaluate '-Dexpression=settings.localRepository' -DforceStdout -q
C:\Users\uhnak\.m2\repository

mvnd adds prefix [INFO] [stdout]

PS D:\tmp> C:\Applications\mvnd\bin\mvnd.exe help:evaluate '-Dexpression=settings.localRepository' '-DforceStdout' -q
[INFO] [stdout] C:\Users\uhnak\.m2\repository

Also when the command is invoked from a non-terminal (e.g. launched via Java's Process), then this additional warning is printed to stderr

Nov 03, 2021 4:33:53 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

Though I am not sure whether running mvnd through terminal is a supported use, or whether I should only ever use mvn for that, in which case this issue is moot and can be closed.

As a side-note, if I don't run it in quiet mode (no -q), then the output is the same for maven and mvnd (both without [INFO] [stdout])

plain maven:

PS D:\tmp> mvn help:evaluate '-Dexpression=settings.localRepository' -DforceStdout
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-help-plugin:3.2.0:evaluate (default-cli) @ standalone-pom ---
[INFO] No artifact parameter specified, using 'org.apache.maven:standalone-pom:pom:1' as project.
[INFO]
C:\Users\uhnak\.m2\repository
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.069 s
[INFO] Finished at: 2021-11-03T16:29:34+01:00
[INFO] ------------------------------------------------------------------------

mvnd:

> C:\Applications\mvnd\bin\mvnd.exe help:evaluate '-Dexpression=settings.localRepository' '-DforceStdout'
[INFO] Processing build on daemon 7f40520a
[INFO] Scanning for projects...
[INFO] BuildTimeEventSpy is registered.
[INFO]
[INFO] Using the SmartBuilder implementation with a thread count of 3
[INFO] Task segments : [help:evaluate]
[INFO] Build maximum degree of concurrency is 3
[INFO] Total number of projects is 1
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-help-plugin:3.2.0:evaluate (default-cli) @ standalone-pom ---
[INFO] No artifact parameter specified, using 'org.apache.maven:standalone-pom:pom:1' as project.
[INFO]
C:\Users\uhnak\.m2\repository
[INFO] Segment walltime 0 s, segment projects service time 0 s, effective/maximum degree of concurrency 0.93/3
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.021 s (Wall Clock)
[INFO] Finished at: 2021-11-03T16:29:48+01:00
[INFO] ------------------------------------------------------------------------
@gnodet
Copy link
Contributor

gnodet commented Nov 3, 2021

You can add --raw-streams to the command line to avoid the decorated output.

@gnodet
Copy link
Contributor

gnodet commented Nov 3, 2021

You should be able to get rid of the warning by using -Dorg.jline.terminal.dumb=true

@peteruhnak
Copy link
Author

This solves my issue. Thanks for the quick response!

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

3 participants