0

I'm trying to create an OSGi wrapper for the newest version of jTDS. I'm trying to add the wrapping process to the existing jTDS build process (Ant-based). I've downloaded the latest bnd.jar and added the following to the jTDS build.xml:

<taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="bnd.jar"/>
<bndwrap trace="true" definitions="${basedir}/bnd" output="${build}/${ant.project.name}-${version}.osgi.jar">
    <fileset dir="${build}" includes="*.jar"/>
</bndwrap>

I've also got a very simple bnd definition defined:

version=1.2.6
Export-Package: net.sourceforge.jtds*;version=${version}
Bundle-Version: ${version}
Bundle-Name: net.sourceforge.jtds

When I execute the dist task in Ant, it should be creating a JAR with the proper OSGi manifest. It IS creating another JAR, but the manifest is identical to the original.

If I execute the same wrap directly against the bnd JAR:

java -jar bnd.jar wrap -p bnd\jtds-1.2.6.bnd -o build\jtds-1.2.6.osgi.jar build\jtds-1.2.6.jar

I get the correct OSGi manifest.

What is going wrong during the Ant build?

Jeff
  • 3,669
  • 1
  • 23
  • 33

1 Answers1

0

It seems to be a problem with the latest version of bnd, found here. The Ant WrapTask was retooled some and just doesn't seem to work (maybe it's just misconfigured; documentation hasn't kept up with code).

I dropped in version 1.50.0 instead and everything worked as expected both through the bnd.jar and through Ant.

Jeff
  • 3,669
  • 1
  • 23
  • 33