Class: JBundler::Tree

Inherits:
Object
  • Object
show all
Defined in:
lib/jbundler/tree.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Tree

Returns a new instance of Tree.



7
8
9
# File 'lib/jbundler/tree.rb', line 7

def initialize( config )
  @config = Configurator.new( config )
end

Instance Method Details

#show_it(debug = false) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/jbundler/tree.rb', line 11

def show_it( debug = false )
  m = Maven::Ruby::Maven.new
  m.options[ '-f' ] = File.join( File.dirname( __FILE__ ), 'tree_pom.rb' )
  m.options[ '-q' ] = nil unless debug
  m.verbose = debug

  @config.configure( m )

  puts '...'

  m.exec( 'org.apache.maven.plugins:maven-dependency-plugin:2.8:tree' )

  puts File.read( File.join( File.expand_path( @config.work_dir ), 
                             'tree.txt' ) )
end