On Thu, Jan 04, 2024 at 10:22:02PM -0800, tony mancill wrote: > 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.
I am preparing an upload of maven to experimental (version 3.8.7-2~exp1) that implements the changes described above. I will push the packaging changes to the debian/experimental branch in the Salsa repo. The patch for mvn can be found here: https://salsa.debian.org/java-team/maven/-/blob/4501966b3678135deacca45bc1a918380f6dac47/debian/patches/03_jansi_behavior.patch When used in conjunction with the jansi package in experimental, the behavior is: **output is colorized** mvn **output is non-colorized** mvn -B mvn --batch-mode The patched mvn script also checks for MAVEN_JANSI_PROPERTY in the environment, which allows users to override the behavior if desired. I don't expect this to be needed very often, but it may be useful if we modify the behavior of jansi in the future, and I wanted there to be an escape valve if the patched behavior is problematic for some unforeseen use case. The invocations below demonstrate the behavior of Debian's jansi that led to the patch in 2.4.0-2, i.e., that without the native jansi libraries or -Djansi.mode=force, the default TTY detection fails and results in non-colorized output. MAVEN_JANSI_PROPERTY="" mvn MAVEN_JANSI_PROPERTY= mvn For completeness: MAVEN_JANSI_PROPERTY="-Djansi.mode=default" mvn --> non-colorized MAVEN_JANSI_PROPERTY="-Djansi.mode=strip" mvn --> non-colorized MAVEN_JANSI_PROPERTY="-Djansi.mode=force" mvn --> colorized With these changes, we shouldn't need the patched maven-debian-helper I proposed previously, since the output of Maven invoked during builds will be colorized. I believe this will address the issues reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039607 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059147 Feedback welcome. We can coordinate here before any migrations from experimental to unstable. Thanks, tony
signature.asc
Description: PGP signature