Sha256: a20049a6c418fdea41e95d45eedee1e0771809c25bd595324fd9328f10f6f262
Contents?: true
Size: 1.07 KB
Versions: 11
Compression:
Stored size: 1.07 KB
Contents
require 'maven/ruby/maven' require 'fileutils' module JBundler class Executable class Filter def initialize(a) @a = a end def method_missing(m, *args, &b) args[ 0 ].sub!(/^.* - /, '' ) @a.send(m,*args, &b) end end 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 def packit m = Maven::Ruby::Maven.new m.options[ '-f' ] = File.join( File.dirname( __FILE__ ), 'executable_pom.rb' ) @config.configure( m ) m.verbose = @config.verbose m.package( '-P', @config.compile ? :compile : :no_compile ) puts puts 'now you can execute your jar like this' puts puts "\tjava -jar #{File.basename( File.expand_path( '.' ) )}_exec.jar" puts end end end
Version data entries
11 entries across 11 versions & 1 rubygems