The ANT task allows Bundlor to be run from inside any ANT based build system
Define a bundlor
namespace
<project
<attribute>name</attribute>=<value>"bundlor-sample-ant"</value>
<attribute>xmlns:bundlor</attribute>=<value>"antlib:com.springsource.bundlor.ant"</value>>
Import the bundlor
task into your build
<target
<attribute>name</attribute>=<value>"bundlor.init"</value>> <taskdef
<attribute>resource</attribute>=<value>"com/springsource/bundlor/ant/antlib.xml"</value> <attribute>uri</attribute>=<value>"antlib:com.springsource.bundlor.ant"</value>> <classpath
<attribute>id</attribute>=<value>"bundlor.classpath"</value>> <fileset
<attribute>dir</attribute>=<value>"${bundlor.home}/dist"</value>/> <fileset
<attribute>dir</attribute>=<value>"${bundlor.home}/lib"</value>/> </classpath
> </taskdef
> </target
>
This example uses a very simplistic method for building the bundlor
task classpath.
It is possible to use a dependency manager such as Ivy to better manage the classpath of Bundlor.
Use the bundlor
task. See Section 4.2, “Apache ANT Usage” for details about the
parameters of the task.
<bundlor:bundlor
<attribute>inputPath</attribute>=<value>"${basedir}/target/classes"</value>
<attribute>outputPath</attribute>=<value>"${basedir}/target/classes"</value>
<attribute>bundleVersion</attribute>=<value>"1.0.2.BUILD-${timestamp}"</value>
<attribute>manifestTemplatePath</attribute>=<value>"${basedir}/template.mf"</value>/>