Module: Buildr::Bnd
Defined Under Namespace
Classes: BundleTask
Class Method Summary collapse
- .bnd_main(*args) ⇒ Object
-
.remote_repositories ⇒ Object
Repositories containing the requirements.
-
.requires ⇒ Object
The specs for requirements.
Instance Method Summary collapse
Class Method Details
.bnd_main(*args) ⇒ Object
17 18 19 20 |
# File 'lib/buildr_bnd.rb', line 17 def bnd_main(*args) cp = Buildr.artifacts(self.requires).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR) Java::Commands.java 'aQute.bnd.main.bnd', *(args + [{ :classpath => cp }]) end |
.remote_repositories ⇒ Object
Repositories containing the requirements
13 14 15 |
# File 'lib/buildr_bnd.rb', line 13 def remote_repositories ["http://www.aQute.biz/repo"] end |
.requires ⇒ Object
The specs for requirements
8 9 10 |
# File 'lib/buildr_bnd.rb', line 8 def requires ["biz.aQute:bnd:jar:0.0.384"] end |
Instance Method Details
#package_as_bundle(filename) ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/buildr_bnd.rb', line 112 def package_as_bundle(filename) project.task('bnd:print' => [filename]) do |task| Bnd.bnd_main( "print", filename ) end dirname = File.dirname(filename) directory( dirname ) # Add Buildr.application.buildfile so it will rebuild if we change settings task = BundleTask.define_task(filename => [Buildr.application.buildfile, dirname]) task.project = self # the last task is the task considered the packaging task task end |
#package_as_bundle_spec(spec) ⇒ Object
127 128 129 130 |
# File 'lib/buildr_bnd.rb', line 127 def package_as_bundle_spec(spec) # Change the source distribution to .jar extension spec.merge( :type => :jar ) end |