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

[examples] generated-sources/MANIFEST.MF in one line (but is OK inside .jar bundle) #35

Closed paulvi closed 8 years ago

paulvi commented 8 years ago

generated-sources/MANIFEST.MF in build-with-subprojects has only

Manifest-Version: 1.0

This is possibly issue of org.dm.bundle project or snippets below needs to be changed

afterEvaluate { project ->
    project.jar.doLast {
        project.jar.manifest.writeTo( project.file( 'generated-sources/MANIFEST.MF' ) )
    }
}

vs

jar {
}.doLast {
    // copy manifest to location where the IDE can use it to let us know when we breach OSGi restrictions!
    jar.manifest.writeTo( project.file( 'generated-sources/MANIFEST.MF' ) )
}
renatoathaydes commented 8 years ago

Ah, right... I noticed this was broken but forgot to update. Submit a PR if you have time.

paulvi commented 8 years ago

I still don't know how to do so

renatoathaydes commented 8 years ago

I can't make this work. It works fine with the osgi plugin but not with the new plugin. I use project.jar.manifest to get the Manifest file. I guess the new plugin does not correctly set that, unfortunately. Feel free to complain about it with the other plugin. As this is not a feature of osgi-run, I am closing this issue.

Notice that osgi-run does have this:

runOsgi {
    copyManifestTo file( 'generated-sources/MANIFEST.MF' )
}

But this only works if you apply the osgi-run plugin to the project (and I didn't want to apply it to the sub-projects, that's why I did not use this).