#!/usr/bin/env ruby if ARGV[0] == 'help' # ensure we use the right version gem 'ruby-maven', '>=3.1.0' require 'jbundler/cli' JBundler::Cli.start else if ARGV == [] || ARGV.all?{ |a| a.match( /^-/ ) } ARGV.unshift 'install' end if ARGV[0] == 'console' # ensure we use the right version gem 'ruby-maven', '>=3.1.0' require 'irb' require 'jbundler' require 'jbundler/lazy' include JBundler::Lazy ARGV.shift require 'jbundler' if defined? JBUNDLER_CLASSPATH warn 'Jarfile dependencies loaded' else warn 'Could not locate a Jarfile' end IRB.start else if ['lock_down', 'install', 'update', 'show'].member?( ARGV[0] ) is_lock_down = ARGV.delete( 'lock_down' ) is_vendor = ARGV.delete( '--vendor' ) is_debug = ARGV.delete( '--debug' ) ARGV.delete( '--skip-vendor' ) ARGV.delete( '--skip-debug' ) ARGV.delete( '--skip-verbose' ) load Gem.bin_path('bundler', 'bundle') ARGV.insert( 0, 'lock_down' ) if is_lock_down ARGV.insert( 1, '--debug' ) if is_debug ARGV.insert( 1, '--vendor' ) if is_vendor end # ensure we use the right version gem 'ruby-maven', '>=3.1.0' require 'jbundler/cli' JBundler::Cli.start end end