Skip to content
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

No Maven output color in netbeans consoles #6210

Open
albilu opened this issue Jul 17, 2023 · 16 comments
Open

No Maven output color in netbeans consoles #6210

albilu opened this issue Jul 17, 2023 · 16 comments
Labels
Contribution welcome An issue or feature not currently being worked on, but a contribution would be welcomed! kind:feature A feature request Maven [ci] enable "build tools" tests

Comments

@albilu
Copy link
Contributor

albilu commented Jul 17, 2023

Apache NetBeans version

Apache NetBeans 18

What happened

Unlike all other main IDES Netbeans is unable to print Maven logs with color.

Netbeans:
image

IntelliJ IDEA:
image

How to reproduce

Run a Maven project in Netbeans.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows/Linux

JDK

Any

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

Related issues:
fusesource/jansi#87
https://peter.quantr.hk/2018/12/solved-the-root-cause-why-netbeans-cant-print-colored-text-using-latest-maven/#page-content

Are you willing to submit a pull request?

No

@albilu albilu added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Jul 17, 2023
@Chris2011
Copy link
Contributor

Afaik there is also red for warnings which seems incorrect for me. Or maybe it was ant. But afaik red should be errornous stuff and maybe yellow warnings, etc.

@neilcsmith-net
Copy link
Member

The workaround is given in the Jansi issue you linked, and also the trade off that introduces (eg. other aspects of output parsing no longer work).

Moving this to a feature request.

@neilcsmith-net neilcsmith-net added Maven [ci] enable "build tools" tests kind:feature A feature request and removed kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Jul 17, 2023
@mbien mbien added the Contribution welcome An issue or feature not currently being worked on, but a contribution would be welcomed! label Jul 17, 2023
@mbien
Copy link
Member

mbien commented Jul 17, 2023

I am not planning to implement this, adding Contribution welcome An issue or feature not currently being worked on, but a contribution would be welcomed! label.

@asbachb
Copy link
Collaborator

asbachb commented Jul 18, 2023

I wonder if it would be useful to have an alternative to the current output panel. For mvnd the output is not optimal as well. When you launch it from the embedded terminal it looks quite good but lacks features like folding (which I actually never used).
Maybe we could introduce an option to execute maven on the terminal?

@Chris2011
Copy link
Contributor

Then we can also have an alternative output panel for git, ant, npm, etc... so I would like to let them as it is, because we already have more than just maven.

@mbien
Copy link
Member

mbien commented Jul 18, 2023

the folding is just a UI gimmick. The reason it is there is because NB has to compute the context for links in many situations. If you doing that already you may as well add the folding which is a low hanging fruit once you parse the output.

mvnd integration is fairly rudimentary. Partially because the project itself hasn't stabilized yet. I can't use it in many projects still since it often causes other issues.

@neilcsmith-net
Copy link
Member

@Chris2011 well, we could look at an option to run any external process in the terminal rather than the output window - ie. ant and npm, but not git (while using jgit).

@Chris2011
Copy link
Contributor

@neilcsmith-net but then we need real implementation of native terminals also for Windows users w/o using cygwin or anything else. And this is another rabbithole. IMHO.

@neilcsmith-net
Copy link
Member

@Chris2011 of course, and for macOS on Arm for that matter. Having a (non-default) option isn't that much of a rabbithole, if someone wanted to work on it.

@asbachb
Copy link
Collaborator

asbachb commented Jul 20, 2023

I wonder if it's an option to ship with a java terminal emulator like https://github.com/JetBrains/jediterm

@Chris2011
Copy link
Contributor

I wonder if it's an option to ship with a java terminal emulator like https://github.com/JetBrains/jediterm

Ui that looks interesting :D. Maybe will have a look later. Another project......

@neilcsmith-net
Copy link
Member

The interesting part of that might be https://github.com/JetBrains/pty4j

@moquinr
Copy link

moquinr commented Sep 13, 2023

@neilcsmith-net but then we need real implementation of native terminals also for Windows users w/o using cygwin or anything else. And this is another rabbithole. IMHO.

Why can't it use a wsl 2 terminal if it's enabled, like Docker Desktop does... then you have a full linux shell available... not sure if the new Windows Terminal support is a possibility...

@Chris2011
Copy link
Contributor

It is somehow hardcoded that if windows it searches for pty smth like that and if this is not installed like cygwin, you got an info. WSL is not working like pty it is another implementation. I dunno how hard it will be for WSL but if we can reuse some other tools like pty4j or jediterm or whatever, that could be good.

@Chris2011
Copy link
Contributor

We don't need to reinvent the wheel again, luckily. But someone needs to start on it.

@rrangelo
Copy link

Hi all!

I recommend use: JLine. It's FOSS and is used by Apache Maven.

I was looking info about Pty4J and I asked to AI create a comparison table. I share them. I hope it can be help you.

image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution welcome An issue or feature not currently being worked on, but a contribution would be welcomed! kind:feature A feature request Maven [ci] enable "build tools" tests
Projects
None yet
Development

No branches or pull requests

7 participants