Class: Manifest
Instance Attribute Summary collapse
-
#cp ⇒ Object
Returns the value of attribute cp.
-
#main_class ⇒ Object
Returns the value of attribute main_class.
Attributes inherited from JavaTask
Instance Method Summary collapse
Methods inherited from JavaTask
Instance Attribute Details
#cp ⇒ Object
Returns the value of attribute cp.
2 3 4 |
# File 'lib/jake/manifest.rb', line 2 def cp @cp end |
#main_class ⇒ Object
Returns the value of attribute main_class.
2 3 4 |
# File 'lib/jake/manifest.rb', line 2 def main_class @main_class end |
Instance Method Details
#execute {|_self| ... } ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/jake/manifest.rb', line 4 def execute &block yield self in_path @base_dir do FileUtils.mkdir 'META-INF' unless File.exists? 'META-INF' @cp = Dir.glob(@cp) File.open(File.join('META-INF', 'MANIFEST.MF'), 'w') do |f| f.puts 'Manifest-Version: 1.0' f.puts 'Class-Path: ' + @cp.join(" \n ").to_s f.puts 'Main-Class: ' + @main_class end nil end end |