Class: JBundler::Configurator

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Configurator

Returns a new instance of Configurator.



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

def initialize( config )
  @config = config
end

Instance Attribute Details

#bootstrapObject

Returns the value of attribute bootstrap.



5
6
7
# File 'lib/jbundler/configurator.rb', line 5

def bootstrap
  @bootstrap
end

#compileObject

Returns the value of attribute compile.



5
6
7
# File 'lib/jbundler/configurator.rb', line 5

def compile
  @compile
end

#groupsObject

Returns the value of attribute groups.



5
6
7
# File 'lib/jbundler/configurator.rb', line 5

def groups
  @groups
end

#verboseObject

Returns the value of attribute verbose.



5
6
7
# File 'lib/jbundler/configurator.rb', line 5

def verbose
  @verbose
end

#work_dirObject

Returns the value of attribute work_dir.



5
6
7
# File 'lib/jbundler/configurator.rb', line 5

def work_dir
  @work_dir
end

Instance Method Details

#configure(maven) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/jbundler/configurator.rb', line 11

def configure( maven )
  maven.property( 'jbundler.basedir', @config.basedir )
  maven.property( 'jbundler.jarfile', @config.jarfile )
  maven.property( 'jbundler.gemfile', @config.gemfile )
  maven.property( 'jbundler.workdir', work_dir )
  maven.property( 'jbundler.groups', @groups )
  maven.property( 'jbundler.bootstrap', @bootstrap )
  maven.property( 'maven.repo.local', @config.local_repository ) if @config.local_repository
  maven.options[ '-s' ] = @config.settings if @config.settings
  maven.options[ '-o' ] = nil if @config.offline
end