I am using the latest gradle (1.0-rc3) and I am having trouble with the osgi build picking up the spring dm files. In my maven project, the maven-bundle-plugin will use the spring files to populate the Import-Package by default. (I believe bnd does this by default, but not sure) However, I can’t seem to get the same thing working with the gradle osgi plugin. Any ideas? I must be doing something wrong I’m sure.
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'osgi'
dependencies {
compile(project(':accumulo.myproj'))
}
jar {
manifest { // the manifest of the default jar is of type OsgiManifest
instruction 'Import-Package', '*'
}
}
Does something stick out as to why the osgi plugin might not be picking up the packages in the spring files? I have the spring files located in src/main/resources/META-INF/spring/
Hmm no luck. So to make things much easier, I started a new osgi project to test. I ran the maven build with the typical maven-bundle-plugin set up, and it picked up the classes properly to import from the spring-dm files. However, when I ran the gradle script, the Manifest came out different. Here is the gradle script:
I think I’m going to try bnd directly and see if that picks up the spring-dm files. (It probably isn’t a gradle problem if the osgi plugin just delegates to bnd)