module KPM::Tasks

def install_java_plugin(plugin_key, kb_version='LATEST')

def install_java_plugin(plugin_key, kb_version='LATEST')
  installer = BaseInstaller.new(logger,
                                options[:overrides],
                                options[:ssl_verify])
  if options[:from_source_file].nil?
    response = installer.install_plugin(plugin_key,
                                        kb_version,
                                        options[:group_id],
                                        options[:artifact_id],
                                        options[:packaging],
                                        options[:classifier],
                                        options[:version],
                                        options[:destination],
                                        'java',
                                        options[:force_download],
                                        options[:verify_sha1],
                                        false)
  else
    response = installer.install_plugin_from_fs(plugin_key, options[:from_source_file], nil, options[:version], options[:destination], 'java')
  end
  say "Artifact has been retrieved and can be found at path: #{response[:file_path]}", :green
end