apache / apache/maven-mvnd

Interactive progress should go to stderr, not stdout

Open
#355 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
3.5k
Forks
250
Avg merge
16h 22m
Merged PRs (30d)
36

Description

I need to get a list of dependencies for my project:
```bash
mvnd dependency:tree > out
```
This ran super fast, because `mvnd` is awesome, but it didn't show me the progress while running, and worse, the progress with all of the terminal escape codes was included in the output file from stdout. Also, the log output in the file was colored.

The behavior I expect is for `mvnd` to use stderr for progress, but only if stderr is a TTY, and that the log output to stdout is only colored if stdout is a TTY. This would match the behavior of the normal `mvn` command, except it would be fast and show the nice interactive progress:
```bash
mvn dependency:tree > out
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the mvnd command entry point and trace how interactive progress and log output are written when running dependency:tree. Compare the behavior with the normal mvn command; done means progress uses stderr only for a TTY, stdout is colored only for a TTY, and redirected output contains no terminal escape codes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.