Module: Kernel

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

Constant Summary collapse

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

Instance Method Summary collapse

Instance Method Details

#require_deps(f) ⇒ Object



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

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