Module: Kernel

Defined in:
lib/ontomde-java/frontend/command.rb

Constant Summary collapse

DEPS =
['ontomde-uml2-jpdl', 'ontomde-java/struts', 'ontomde-uml2-ejb2', 'ontomde-uml2-jdo', 'ontomde-java/jpa', 'ontomde-uml2/kb', 'ontomde-java/kbjava','ontomde-uml2-flex','ontomde-core/inspector', 'ontomde-java/crank']

Instance Method Summary collapse

Instance Method Details

#require_deps(f) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/ontomde-java/frontend/command.rb', line 29

def require_deps(f)
  # make sure DEPS lists every libs
  if !DEPS.include?(f)
    raise Exception.new("Internal error: require '#{f}' not declared in DEPS}")
  end
  
  begin 
    require f
  rescue Exception => e  
    puts "*"*47
    puts "** READ THIS ** "*3
    puts "** An error occured while loading module #{f}"
    puts "** This is most likely because this module is not installed on this system."
    puts "** Please use the following command for installing #{f} module :"
    puts "$ set HTTP_PROXY=http://yourProxy:yourPort"
    puts "$ gem install #{f}"
    puts "*"*47
    raise e
  end
end