Bug#1039607: libjansi-java: causes maven to always output escape character

tony mancill tmancill at debian.org
Fri Jan 5 06:22:02 GMT 2024


On Sun, Dec 31, 2023 at 03:27:53PM -0800, tony mancill wrote:
> On Fri, Dec 29, 2023 at 07:23:35AM -0800, tony mancill wrote:
> > On Fri, Dec 29, 2023 at 12:27:07PM +0100, Emmanuel Bourg wrote:
> > > On 28/12/2023 00:48, tony mancill wrote:
> > > 
> > > > - Maven output is colorized by default when invoked during Debian
> > > >    package builds that depend on maven-debian-helper.
> > > 
> > > Good
> > > 
> > > > - Direct `mvn` Maven output is not colorized by default.
> > > 
> > > That's an issue, mvn output should be colorized on a terminal by default,
> > > that's the upstream behaviour.
> 
> My intuition is that it will be better to update the Debian jansi
> package to create the necessary arch-any packages so our version more
> closely resembles upstream, and we are better positioned if/when jansi
> merges into jline, as mentioned here [4].

After giving this some more thought, I don't think we want a jansi
source package that builds arch-any packages.  jansi (already) has a
circular build dependency on itself via maven, but there's no
bootstrapping problem because the packages are currently arch-all.

Since the native library is desired but optional, we could create a
separate source package and add a Recommends dependency to
libjansi-java.  It may even be possible leverage the existing
jansi-native, but I haven't looked into the question of compatibility
yet. 

However, for the short-term, I believe we can achieve the desired
behavior and fix the issue for most use cases by

1. Patching the mvn wrapper script in our maven package to set
jansi.mode=force (and thus colorize output) unless the --batch-mode
option is provided.

2. Moving forward with the current jansi package in experimental.

That restores the desired --batch-mode behavior but maintains
colorized output by default and during Debian package builds.

Would that be acceptable?



More information about the pkg-java-maintainers mailing list