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

Maven plugins fail with Maven 3.8+ due to Jansi #458

Closed
tomas-langer opened this issue Aug 30, 2021 · 3 comments · Fixed by #592
Closed

Maven plugins fail with Maven 3.8+ due to Jansi #458

tomas-langer opened this issue Aug 30, 2021 · 3 comments · Fixed by #592
Assignees
Labels
bug Something isn't working maven-plugin P1
Milestone

Comments

@tomas-langer
Copy link
Member

https://issues.apache.org/jira/browse/MNG-7223

Maven uses Jansi and upgraded to version 2.x in 3.8.1
As this seems to be part of our classloader, we are creating a conflict with the version used by Maven.
Even in 3.6, maven removes our Jansi dependency when creating classloader.

To work around this, we should not depend on Jansi at all in our Maven plugins, and should use the maven provided logging support.

@tomas-langer tomas-langer added bug Something isn't working maven-plugin labels Aug 30, 2021
@dalexandrov dalexandrov self-assigned this Aug 30, 2021
@barchetta
Copy link
Member

In terms of customer impact this breaks the jlink-image goal and helidon dev. The default build and native-image build seem to work OK.

@romain-grecourt
Copy link
Contributor

romain-grecourt commented Aug 30, 2021

This will need to be back-ported to the 2.x branch. In fact, given the extensive refactoring that occurred in master, it would be easier to work on the fix directly in the 2.x branch.

@barchetta
Copy link
Member

I'm interested if there is a quick fix that would allow the current code to run under Jansi 1.8 and 2.x. The use of AnsiOutputStream seems pretty limited in our code.

@dalexandrov dalexandrov removed their assignment Aug 31, 2021
@barchetta barchetta added the P1 label Sep 1, 2021
@barchetta barchetta added this to the 2.2.2 milestone Sep 1, 2021
romain-grecourt added a commit to romain-grecourt/helidon-build-tools that referenced this issue Dec 23, 2021
Fixes helidon-io#458

Support Jansi 2.x (provided by Maven since 3.8.1)

implement ansi escape stripping manually in style instead of relying on AnsiOutputStream
update AnsiConsoleInstaller.installedConsoleType(); use reflect to invoke AnsiPrintStream.getMode
romain-grecourt added a commit to romain-grecourt/helidon-build-tools that referenced this issue Jan 3, 2022
Fixes helidon-io#458

Support Jansi 2.x (provided by Maven since 3.8.1)

implement ansi escape stripping manually in style instead of relying on AnsiOutputStream
update AnsiConsoleInstaller.installedConsoleType(); use reflect to invoke AnsiPrintStream.getMode
romain-grecourt added a commit that referenced this issue Jan 4, 2022
* Foward port of #460

Fixes #458

Support Jansi 2.x (provided by Maven since 3.8.1)

implement ansi escape stripping manually in style instead of relying on AnsiOutputStream
update AnsiConsoleInstaller.installedConsoleType(); use reflect to invoke AnsiPrintStream.getMode

* fix copyright
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maven-plugin P1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants