-
Notifications
You must be signed in to change notification settings - Fork 853
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
Test results window does not work with colored Maven output #7441
Comments
the output window is not a fully featured terminal, it doesn't support meta information in the text. If it would be a terminal, you wouldn't have to force color output, it would automatically activate. |
I think we are seeing an issue that is caused by ansi escape sequences in the output of maven. Without having looked deeper into the problem, the integration code basicly parses the output of maven and reacts accordingly. #7113 adjusted the matching pattern to fix one problem. Coloring adds sequences to the output, that are not displayed text, but code colors/behavior. Either the matches need to be adjusted to support ansi escape sequences. Or they need to be stripped out before the existing matchers are processed. |
forcing coloring and then stripping text decorations again while adding more custom coloring will lead to other issues most likely. This sounds also like a bit too much patchwork and might not be something we should sink time into. Maven is smart enough to detect not fully featured terminals and turn coloring off. The forward looking fix would be to switch the output to a proper terminal. This is more work though and windows is missing a good impl atm #3959. btw: the issue goes deeper, mvnd for example really likes fully featured terminals since it outputs log in parallel which rewrites terminal lines. To work within NB it switches to a simple impl which serializes the output again. related: #5552 duplicate: #6210 |
I think you are wrong. The author works around #6210 by forcing maven to output color codes and This works: Normal output: Output with "--color always": So the output window of NetBeans happily parses the escape sequences and outputs them. What I see is this:
All referenced issues may be related, but don't match. #3959 is from my POV totally different, as it just requests to be able to use #5552 just says, that it is not consistent across OutputWindow users and sometimes ansi escape sequences don't work, but my screenshot shows, that it works. My take on that is, that the problem is the sending side, that might detect, that it is not talking to a #6210 is not a duplicate, but asks for color support by default, different problem and using |
I know that the current output can render some decorations, this causes several problems. NB is coloring the output too without anticipating it to be in color already, and none of the output line handlers expect decorated text at the moment. You see that in your output that nothing is filtered, code folding is off and mojo specific handlers will likely also not work. |
Apache NetBeans version
Apache NetBeans 22
What happened
The test results window does not show up automatically when selecting “Test” in a project’s context menu. After opening it via Window → IDE Tools → Test Results, it stays empty even when running the tests again.
Language / Project Type / NetBeans Component
Java Maven Project
How to reproduce
--color always
to Maven Global Execution Options in NetBeans settingsWithout
--color always
:[INFO]
With
--color always
:[INFO]
(with the letters colored blue, or yellow in case of warnings)Tests run: 18, Failures: 0, Errors: 0, Skipped: 0
andBUILD SUCCESS
appear in greenNETBEANS-ExecEvent
entries are visibleDid this work correctly in an earlier version?
No / Don't know
Operating System
Windows 10 64 Bit
JDK
OpenJDK 22
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
Full Maven Global execution options are
--batch-mode --errors --color always --show-version --strict-checksums -Djavax.net.ssl.trustStore=foo.jks -Daether.remoteRepositoryFilter.prefixes=true
Previously reported as #4734
--color always
also breaks other things like links to source code in Javadoc warnings and stack tracesAre you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: