Rajbir Saini
unread,Sep 15, 2012, 1:57:00 PM9/15/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bndtool...@googlegroups.com
Hi,
I am trying to wrap a plain jar file to a OSGi bundle using bndwrap task but it is not creating the OSGi headers into the target jar. It looks it simply copies the jar file to the target folder without any modification. I have also tried the the command line and it also just copy the file with a warning. Can you please have a look and see what is wrong with the ant target and command line?
This is the ant target definition.
<target name="osgi-wrap" depends="prepare" description="Wrap non-OSGi jars">
<taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${bnd.lib}"/>
<bndwrap
jars="framework/start/build/lib/ofbiz.jar"
failok="true"
trace="on"
output="${dist.dir}/bundles"
exceptions="true" >
</bndwrap>
<move overwrite="true" todir="${dist.dir}/bundles" >
<fileset dir="${dist.dir}/bundles" includes="*.bar" />
<mapper type="glob" from="*.bar" to="*.jar" />
</move>
</target>
Build Output:
osgi-wrap:
[bndwrap] # check for modified build=1331708346000 file=0, diff=1331708346000
[bndwrap] # Saving jar to /home/xxx/ofbiz/dist/bundles/ofbiz.jar
[bndwrap] null-null 85893
BUILD SUCCESSFUL
Command line
java -jar lib/biz.aQute.bnd-2.0.0.jar wrap framework/start/build/lib/ofbiz.jar
Output:
-----------------
Warnings
000: Using defaults for wrap, which means no export versions
Thanks,
Raj