I will never become a fan of maven.

Hey maven, just tell me where your local repository is. Oh no problem

% mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout

And the wonderful output is:

[INFO] [stdout] /home/harald/.m2/repository

And I am sure [INFO] [stdout] are not part of what I actually wanted to know. In fact it couldn't be more useless in the output.๐Ÿคฆโ€โ™€๏ธ ๐Ÿ™‚โ€โ†”๏ธ

And for added insult, running this burns 5 CPU seconds. This is abysmal.

#maven #java #bloatware

A helpful answer on SO starts with these hints:

ยซ
Maven uses standard slf4j logging, wrapped in a plexus container. https://maven.apache.org/maven-logging.html
You should be able to configure the slf4j bindings to provide different output formats as detailed here http://logback.qos.ch/manual/layouts.html#log4jXMLLayout
ยป

I am sure one step is to sacrifice some animal in a bloody ceremony. Couldn't be easier.

(Sorry for the rant, I develop Java sine the 90' but some of its eco-system is just as bad as JavaScript's).

https://stackoverflow.com/a/29225033/2954288

Maven 3.1.x logging โ€“ Maven

@HaraldKi just add --raw-streams to the command line. Supported by mvn4 (seems you use) and recent 3.9.x versions (as noop)

@cstamas Nice, at least for the occasional use.

For a script run very often I need to "cache" the result, as 1.6s wall time and 5s CPU burn is a bummer.