Class: Buildr::Bnd::BundleTask
- Inherits:
-
Rake::FileTask
- Object
- Rake::FileTask
- Buildr::Bnd::BundleTask
- Defined in:
- lib/buildr/bnd/bundle_task.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
Returns the value of attribute project.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #classpath_element(dependencies) ⇒ Object
- #to_params ⇒ Object
Instance Attribute Details
#project ⇒ Object
Returns the value of attribute project.
4 5 6 |
# File 'lib/buildr/bnd/bundle_task.rb', line 4 def project @project end |
Instance Method Details
#[](key) ⇒ Object
6 7 8 |
# File 'lib/buildr/bnd/bundle_task.rb', line 6 def [](key) @params[key] end |
#[]=(key, value) ⇒ Object
10 11 12 |
# File 'lib/buildr/bnd/bundle_task.rb', line 10 def []=(key, value) @params[key] = value end |
#classpath_element(dependencies) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/buildr/bnd/bundle_task.rb', line 14 def classpath_element(dependencies) artifacts = self.class.to_artifacts([dependencies]) self.prerequisites << artifacts artifacts.each do |dependency| @classpath << dependency.to_s end end |
#to_params ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/buildr/bnd/bundle_task.rb', line 22 def to_params params = project.manifest.merge(@params).reject { |k, v| v.nil? } params["-classpath"] ||= @classpath.collect(&:to_s).join(", ") params['Bundle-SymbolicName'] ||= [project.group, project.name.gsub(':', '.')].join('.') params['Bundle-Name'] ||= project.comment || project.name params['Bundle-Description'] ||= project.comment params['Bundle-Version'] ||= project.version params['Import-Package'] ||= '*' params['Export-Package'] ||= '*' params end |