-
Notifications
You must be signed in to change notification settings - Fork 188
[MDEP-974] strip ansi codes when writing to a file #1564
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
Conversation
|
what I don't understand is why mdep-839-list isn't picking up this issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses issues #1475 and #1344 by implementing ANSI code stripping when writing dependency output to files, replacing the previous commented-out approach of globally disabling color output.
Key Changes
- Strips ANSI escape codes from output when writing to a file instead of disabling colors at the source
- Adds conditional ANSI stripping logic in the artifact list building process
- Changes module output format from " -- module" to " - module"
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojo.java | Removes commented color control code, adds ANSI stripping logic when outputFile is set, and changes module separator format |
| src/it/projects/mdep-839-list/verify.groovy | Adds assertion to verify ANSI codes are removed and module format is present in output file |
| src/it/projects/mdep-839-list/pom.xml | Updates test description from "list-repositories" to "list" |
| pom.xml | Adds jansi 2.4.2 dependency with test scope and configures it as ignored in dependency analyzer |
Comments suppressed due to low confidence (1)
src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojo.java:238
- Changing from " -- module " to " - module " will break multiple existing integration tests that expect the double-dash format. Tests in mdep-571-resolve-java9, mdep-580_display-manifest-automodules, and mdep-839-list all check for " -- module" in their output. If this format change is intentional, all affected tests must be updated; otherwise, revert this change to maintain backward compatibility.
messageBuilder.project(" -- module " + moduleDescriptor.name);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ports modules or not
|
@elharo Please assign appropriate label to PR according to the type of change. |
fixes #1475
fixes #1344
@tiffmaelite