Class: JBundler::Executable
- Inherits:
-
Object
- Object
- JBundler::Executable
- Defined in:
- lib/jbundler/executable.rb
Defined Under Namespace
Classes: Filter
Instance Method Summary collapse
-
#initialize(bootstrap, config, compile, verbose, *groups) ⇒ Executable
constructor
A new instance of Executable.
- #packit ⇒ Object
Constructor Details
#initialize(bootstrap, config, compile, verbose, *groups) ⇒ Executable
Returns a new instance of Executable.
17 18 19 20 21 22 23 24 |
# File 'lib/jbundler/executable.rb', line 17 def initialize( bootstrap, config, compile, verbose, *groups ) raise "file not found: #{bootstrap}" unless File.exists?( bootstrap ) @config = Configurator.new( config ) @config.bootstrap = bootstrap @config.compile = compile @config.verbose = verbose @config.groups = groups.join( ',' ) end |
Instance Method Details
#packit ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/jbundler/executable.rb', line 26 def packit m = Maven::Ruby::Maven.new m.[ '-f' ] = File.join( File.dirname( __FILE__ ), 'executable_pom.rb' ) @config.configure( m ) m.verbose = @config.verbose m.package( '-P', @config.compile ? :compile : :no_compile ) #FileUtils.rm_f( 'dependency-reduced-pom.xml' ) puts puts 'now you can execute your jar like this' puts puts "\tjava -jar #{@config.work_dir}/executable/*.jar" puts end |