class Jars::MavenSettings
def setup_interpolated_settings(http, https)
def setup_interpolated_settings(http, https) proxy = raw_proxy_settings_xml(http, https).gsub("\n", LINE_SEPARATOR) if settings.nil? raw = "<settings>#{LINE_SEPARATOR}#{proxy}</settings>" else raw = File.read(settings) if raw.include?('<proxy>') Jars.warn("can not interpolated proxy info for #{settings}") return else raw.sub!('<settings>', "<settings>#{LINE_SEPARATOR}#{proxy}") end end tempfile = java.io.File.create_temp_file('settings', '.xml') tempfile.delete_on_exit File.write(tempfile.path, raw) tempfile.path end