class KPM::BaseInstaller
def install_default_bundles(bundles_dir, specified_version=nil, kb_version=nil, force_download=false, verify_sha1=true)
def install_default_bundles(bundles_dir, specified_version=nil, kb_version=nil, force_download=false, verify_sha1=true) group_id = 'org.kill-bill.billing' artifact_id = 'killbill-platform-osgi-bundles-defaultbundles' packaging = 'tar.gz' classifier = nil version = specified_version if version.nil? || version == LATEST_VERSION info = KPM::KillbillServerArtifact.info(kb_version || LATEST_VERSION, @nexus_config, @nexus_ssl_verify) version = info['killbill-platform'] end version ||= LATEST_VERSION bundles_dir = Pathname.new(bundles_dir || DEFAULT_BUNDLES_DIR).expand_path destination = bundles_dir.join('platform') sha1_file = bundles_dir.join(SHA1_FILENAME) @logger.debug("Installing default bundles: group_id=#{group_id} artifact_id=#{artifact_id} packaging=#{packaging} classifier=#{classifier} version=#{version} destination=#{destination}") info = KPM::BaseArtifact.pull(@logger, group_id, artifact_id, packaging, classifier, version, destination, sha1_file, force_download, verify_sha1, @nexus_config, @nexus_ssl_verify) @trace_logger.add('default_bundles', info.merge({'status'=> (info[:skipped] ? 'UP_TO_DATE': 'INSTALLED'), :group_id => group_id, :artifact_id => artifact_id, :packaging => packaging, :classifier => classifier})) # The special JRuby bundle needs to be called jruby.jar # TODO .first - code smell unless info[:skipped] File.rename Dir.glob("#{destination}/killbill-platform-osgi-bundles-jruby-*.jar").first, destination.join('jruby.jar') end info end