Class: Buildr::Eclipse::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/buildr/ide/eclipse.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Options

Returns a new instance of Options.



174
175
176
# File 'lib/buildr/ide/eclipse.rb', line 174

def initialize(project)
  @project = project
end

Instance Attribute Details

#m2_repo_var(*values) ⇒ Object

The classpath variable used to point at the local maven2 repository. Example:

eclipse.options.m2_repo_var = 'M2_REPO'


181
182
183
184
185
186
187
188
# File 'lib/buildr/ide/eclipse.rb', line 181

def m2_repo_var(*values)
  fail "m2_repo_var can only accept one value: #{values}" if values.size > 1
  if values.size > 0
    @m2_repo_var = values[0]
  else
    @m2_repo_var || (@project.parent ? @project.parent.eclipse.options.m2_repo_var : 'M2_REPO')
  end
end