From 97fb0fc3e038eda3b2f9ff21e6ee126090930ef5 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Thu, 6 Feb 2025 15:30:03 -0600 Subject: [PATCH 1/2] jar_installer no longer exists Deprecated some time ago in favor of jars/installer. --- specs/dependency_spec.rb | 2 +- specs/jar_installer_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/dependency_spec.rb b/specs/dependency_spec.rb index 4b34190..2d477d1 100644 --- a/specs/dependency_spec.rb +++ b/specs/dependency_spec.rb @@ -2,7 +2,7 @@ require File.expand_path('setup', File.dirname(__FILE__)) -require 'jar_installer' +require 'jars/installer' # rubocop:disable Layout/LineLength describe Jars::Installer::Dependency do diff --git a/specs/jar_installer_spec.rb b/specs/jar_installer_spec.rb index c9e97e8..d18b1ae 100644 --- a/specs/jar_installer_spec.rb +++ b/specs/jar_installer_spec.rb @@ -2,7 +2,7 @@ require File.expand_path('setup', File.dirname(__FILE__)) -require 'jar_installer' +require 'jars/installer' require 'fileutils' require 'rubygems/specification' From f95d32cc984970c2f03514a29ca48370e89851c2 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Thu, 6 Feb 2025 15:20:29 -0600 Subject: [PATCH 2/2] Strip off ANSI colored maven output from deps lines This extra output got included in the filename and breaks installation of jars on platforms where the output gets included. This includes at least Linux, but I have been unable to reproduce on MacOS so far. This is a stopgap until I can figure out why this output is happening and fully disable it. The regexp matching in this method could also be improved to avoid breaking on future format changes. Fixes jruby/jar-dependencies#92. See also jruby/jruby#8606. --- lib/jars/installer.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/jars/installer.rb b/lib/jars/installer.rb index 92d78a0..dd6c2d0 100644 --- a/lib/jars/installer.rb +++ b/lib/jars/installer.rb @@ -40,6 +40,10 @@ def initialize(line) setup_type(line) line.strip! + + # strip off trailing module output (jruby/jar-dependencies#92) + line.sub!(/\u001B.*$/, EMPTY) + @coord = line.sub(/:[^:]+:([A-Z]:\\)?[^:]+$/, EMPTY) first, second = @coord.split(/:#{type}:/) group_id, artifact_id = first.split(':')