Module: Buildr4OSGi::SDKFeatureEnabler

Defined in:
lib/buildr4osgi/eclipse/feature.rb

Instance Method Summary collapse

Instance Method Details

#create_resolved_pluginsObject



327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# File 'lib/buildr4osgi/eclipse/feature.rb', line 327

def create_resolved_plugins
  resolved_plugins = {}
  unless @plugins.nil? || @plugins.empty?
    plugins.flatten.each do |plugin|
      
      artifact = case 
        when plugin.is_a?(String)
           if plugin.match /.*:.*:.*/ # is it an artifact string representation ?
              Buildr::artifact(plugin)
            else # treat it as a .jar
              file(plugin)
            end
        when plugin.is_a?(Buildr::Project)
          Buildr::artifact(plugin.package(:sources))
        else 
          plugin
        end
      artifact = Buildr::artifact(artifact.to_hash.merge(:classifier => "sources")) if artifact.is_a?(Buildr::Artifact)
      info, as_dir = adapt_plugin(artifact)
      if !info.nil? 
        info[:unjarred] = false #as_dir || (!@unjarred[plugin].nil? && @unjarred[plugin][:unjarred]) never explode a sources bundle.
        resolved_plugins[info] = artifact
      end
    end
  end
  resolved_plugins
end