Class: JBundler::JRubyComplete

Inherits:
PomRunner show all
Defined in:
lib/jbundler/jruby_complete.rb

Instance Method Summary collapse

Methods inherited from PomRunner

#basedir, #clean?, #debug, #exec, #maven, #method_missing, #verbose, #work_dir, #workdir

Constructor Details

#initialize(config, options) ⇒ JRubyComplete

Returns a new instance of JRubyComplete.



6
7
8
9
10
11
12
13
14
15
# File 'lib/jbundler/jruby_complete.rb', line 6

def initialize( config, options )
  super options
  work_dir = File.expand_path( config.work_dir )
  maven.property( 'jbundler.workdir', work_dir )
  maven.property( 'jbundler.basedir', config.basedir )
  maven.property( 'jbundler.jarfile', config.jarfile )
  maven.property( 'jbundler.gemfile', config.gemfile )
  @tree = File.join( work_dir, 'tree.txt' )
  maven.property( 'jbundler.outputFile', @tree )
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class JBundler::PomRunner

Instance Method Details

#packitObject



33
34
35
36
37
38
39
40
41
42
# File 'lib/jbundler/jruby_complete.rb', line 33

def packit
  puts '...'
  exec( :package )

  puts
  puts 'now you can use jruby like this'
  puts
  puts "\tjava -jar jruby_complete_custom.jar"
  puts
end

#pom_fileObject



17
18
19
# File 'lib/jbundler/jruby_complete.rb', line 17

def pom_file
  File.join( File.dirname( __FILE__ ), 'jruby_complete_pom.rb' )
end

#show_versionsObject



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/jbundler/jruby_complete.rb', line 21

def show_versions
  puts '...'

  FileUtils.rm_f( @tree )

  exec( 'dependency:tree' )

  if File.exists?( @tree )
    puts File.read( @tree )
  end
end