Skip to content

[3.9.x] [MNG-7477] Adapt the maven output to the width of the terminal#737

Closed
gnodet wants to merge 3 commits intoapache:maven-3.9.xfrom
gnodet:MNG-7477
Closed

[3.9.x] [MNG-7477] Adapt the maven output to the width of the terminal#737
gnodet wants to merge 3 commits intoapache:maven-3.9.xfrom
gnodet:MNG-7477

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 12, 2022

PR for testing.
A few things:

  • I had to redefine the getTerminalWidth() method to take into account the fact that the output can be redirected, in which case the previous getTerminalWidth() returns the width of the console using the err stream.
  • the exact behavior when the output is redirected needs to be chosen: the behavior could depend if the output is actually padded or not, or the output could be padded only in the case the output is actually displayed on the console. The behavior with this PR is to consider a default width of 80, thereby using the previous behavior
  • the terminal width can be overridden by using the maven.console.lineLength system property

Copy link
Copy Markdown
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stupid question: Shouldn't that rather be part of shared which does a lot of Jansi handling?

@mthmulders
Copy link
Copy Markdown
Contributor

Shouldn't that rather be part of shared which does a lot of Jansi handling?

I think that's how it's done in the master branch. Unless that solves a different problem than this PR does...?

@gnodet gnodet changed the title [MNG-7477] Adapt the maven output to the width of the terminal [3.9.x] [MNG-7477] Adapt the maven output to the width of the terminal May 12, 2022
@gnodet
Copy link
Copy Markdown
Contributor Author

gnodet commented May 12, 2022

Shouldn't that rather be part of shared which does a lot of Jansi handling?

I think that's how it's done in the master branch. Unless that solves a different problem than this PR does...?

Argh, I did not even checked if that was already done in master :-(

@gnodet gnodet closed this May 12, 2022
@jira-importer
Copy link
Copy Markdown

Resolve #9127

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

Successfully merging this pull request may close these issues.

4 participants