This is not easily parsed by machines (or even humans). Some version numbers are on the same line, others are on a separate line.
There's extraneous and unneeded info.
And there's no way to influence the appearance of the output. For example, the ps command as the -w flag to explicitly set wide text output mode.
Also, have you tried faking the terminal width with
$ COLUMNS=99999 mavin …
(some tools, including ps(1) will consult this in a pipeline, and it's allowed me to fudge some otherwise yucky output)
One other hack up my sleeve that might (but won't likely) work is to use
$ stty cols 99999 ; mavin …
which *might* also lie sufficiently to mavin.
That said, mavin just might be a dork and refuse to respect tty dimensions and force a presumed 80-column hard-coded limit.
@xilerk Good catch! This command did the trick:
$ mvn -D versions.outputLineWidth=${COLUMNS} versions:display-dependency-updates
Of course, ${COLUMS} could be set to some arbitrary huge value to help better ensure single line per dependency.
Thanks a bunch for the suggestion! :-)
@doofus_canadensis it's less about how verbose it can be, and more about how the crucial bits of data are split across multiple lines of output.
I'm mainly checking a large project for outdated dependencies via mvn versions:display-dependency-updates.
There's hundreds of dependencies in this project, so sifting through the results one-by-one by hand would be prohibitively painful.
And it's looking like trying to automate this will be even more painful due to how crappy quality the output is.
@lattera You can generate a XML report if you need to process the result in an automated fashion if you use dependency-updates-report instead:
mvn -DdependencyUpdatesReportFormats=xml versions:dependency-updates-report
That will create target/dependency-updates-report.xml
For more details see: https://www.mojohaus.org/versions/versions-maven-plugin/dependency-updates-report-mojo.html