Ant : génération d'un bundle OSGI avec bnd

Boris HUISGEN
|
bhuisgen@muse:~/Projects/java/libirc$ cat build.xml
<target name="dist" depends="doc" description="create package">
<!-- JAR package -->
<mkdir dir="${dist.home}/bin/${ant.project.name}" />
<copy todir="${dist.home}/bin/${ant.project.name}">
<fileset dir="${build.home}" />
</copy>
<jar destfile="${dist.home}/${ant.project.name}-${build.version}-bin-${DSTAMP}.jar" basedir="${dist.home}/bin/" />
<!-- OSGI bundle -->
<replaceregexp file="myfile.bnd" match="Bundle-Version: (.*)" replace="Bundle-Version: ${build.version}" byline="true" />
<taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${lib.home}/bnd-2.0.0.jar"/>
<bnd classpath="${build.home}" files="myfile.bnd" output="${dist.home}/${ant.project.name}-${build.version}-bundle-${DSTAMP}.jar" />
</target>
bhuisgen@muse:~/Projects/java/libirc$ cat libirc.bnd
Bundle-Name: IRC Client Framework Bundle
Bundle-SymbolicName: fr.hbis.lib.irc
Bundle-Version: 0.2.0
Private-Package: fr.hbis.lib.irc.*