Class: OSGi::InstallBundlesTask

Inherits:
Rake::Task
  • Object
show all
Defined in:
lib/buildr4osgi/osgi/project_extension.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ InstallBundlesTask

:nodoc:



124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/buildr4osgi/osgi/project_extension.rb', line 124

def initialize(*args) #:nodoc:
  super
  enhance do |task|
    puts "Deploy directory: #{OSGi.registry.release_to}/plugins"
    mkpath "#{OSGi.registry.release_to}/plugins"
    project.projects.each do |subp|
      subp.packages.select {|package| package.is_a?(::OSGi::BundlePackaging)}.each do |package|
        puts "Deploying #{subp.artifact(package)} to #{OSGi.registry.release_to}"
        cp(subp.artifact(package).to_s, "#{OSGi.registry.release_to}/plugins") 
      end
    end
  end
end

Instance Attribute Details

#projectObject

Returns the value of attribute project.



123
124
125
# File 'lib/buildr4osgi/osgi/project_extension.rb', line 123

def project
  @project
end