lib/buildr4osgi/osgi/packaging_sources.rb in buildr4osgi-0.9.2 vs lib/buildr4osgi/osgi/packaging_sources.rb in buildr4osgi-0.9.3
- old
+ new
@@ -13,12 +13,16 @@
# License for the specific language governing permissions and limitations under
# the License.
module OSGi
+ # FIXME this code should not be here, it should not be under OSGi directly.
# generate an Eclipse-SourceBundle manifest from the manifest of a runtime plugin
# Assumes that there are no jars inside the runtime plugin.
def self.create_source_bundle_manifest(pluginManifest)
+ if pluginManifest.is_a?(::Buildr::Packaging::Java::Manifest)
+ pluginManifest = pluginManifest.main
+ end
#remove the properties after the sym-name such as ';singleton=true'
bundleSymName = pluginManifest["Bundle-SymbolicName"].split(';').first
bundleVersion = pluginManifest["Bundle-Version"]
sourcesManifest = ::Buildr::Packaging::Java::Manifest.new(nil)
sourcesManifest.main["Bundle-ManifestVersion"] = "2"