Hello (one last time on this subject I hope!),

Following Neil's advice, I've managed to find a satisfactory solution to my
original question (and the other ones I raised along the way).

This was my original <bnd> definition:

<bnd failok="false" exceptions="false" eclipse="false"
 files="${bnd-tmp}/bundle/${bundle-prefix}.${bundle-symbolic-name}.bnd"
 classpath="${bnd-tmp}/compile"
output="${bnd-out}/${bundle-prefix}.${bundle-symbolic-name}_${customer.project.version.api}.jar"/>

...and this is the adjusted one:

 <bnd failok="false" exceptions="false" eclipse="false"
 files="${bnd-tmp}/bundle/${bundle-prefix}.${bundle-symbolic-name}.bnd"

output="${bnd-out}/${bundle-prefix}.${bundle-symbolic-name}_${customer.project.version.api}.jar">
<classpath>
 <pathelement path="${bnd-tmp}/compile"/>
<fileset refid="sdk.api.path"/>
 <fileset refid="app.api.path"/>
<fileset refid="osgi.libraries"/>
 </classpath>
 </bnd>

In short, I copied over the filesets used in the < javac > task (excluding
the Bundle-Classpath) and converted the classpath attribute into a nested
classpath structure with < pathelement > (fileset doesn't work, bnd tries
to open each ".class" as a ".jar"...).

With no "Import-Header" in the ".bnd" file (I removed it), this outputs for
an example bundle:

Import-Package: fr.reflexe.viewshell.api.http;version="[0.7,1)",org.osgi
 .framework;version="[1.5,2)"

...which is exactly what I was hoping to achieve.

Thanks again to all.
Christopher

Reply via email to