renatoathaydes / osgi-run

Osgi-Run - A Gradle plugin to make the development of modular applications using OSGi completely painless
Apache License 2.0
54 stars 13 forks source link

Cannot override manifest headers #25

Closed pun-ky closed 8 years ago

pun-ky commented 8 years ago

I am using your plugin to build my bundles but when I try to override manifest header, then incorrect value is being generated:


jar {
    manifest {
        instruction 'Bundle-Name', project.description
        instruction 'Bundle-SymbolicName', 'adm'
        instruction 'Private-Package', "com.mypackage.adm.api.*;version=${project.version}"
    }
}

MANIFEST.mf

Bundle-SymbolicName: com.mypackage.adm,adm

expected:

Bundle-SymbolicName: adm
renatoathaydes commented 8 years ago

Hm... I don't think this is related to osgi-run, but to the osgi plugin. Please check with them how to fix this as I can't change this, osgi-run does not create your manifest... osgi does, using bnd behind the scenes.

renatoathaydes commented 8 years ago

By the way, don't explicitly declare Private-Package.... you should only declare Exported-Package, the osgi plugin will generate Private-Package for you. Also, don't declare versions as that's also calculated, usually at least.

renatoathaydes commented 8 years ago

Closing as this is not a bug in osgi-run.

pun-ky commented 8 years ago

yes you were right.

the correct way to override name or symbolic name is:

jar {
    manifest {
        name project.description
        symbolicName 'adm'
}

regards!