|
Page Edited :
FELIX :
iPOJO Ant Task
iPOJO Ant Task has been edited by Clement Escoffier (Aug 14, 2007). Content:IPOJO Ant Task allows automating the iPOJO manipulation process. This page explains how to use the iPOJO Ant Task and how to combine them with the BND Tasks. Downloading the iPOJO Ant TaskThe iPOJO Ant Task is available here How to use the Ant TaskThe iPOJO Ant task take an input bundle and a metadata file and create the final (i.e. manipulated) bundle. <target name="main"> <taskdef name="ipojo" classpath="org.apache.felix.ipojo.ant-0.7.3-SNAPSHOT.jar" classname="org.apache.felix.ipojo.task.IPojoTask"/> <ipojo input="foo.jar" metadata = "meta.xml" /> </target> First, define the new task. Then simply use it. The input argument describe the input bundle (must exists) and the metadata argument describes the metadata file (must exist too). The input bundle must be a well-formed bundle.
Combining the iPOJO Ant Task and BNDThe iPOJO Ant Task requires an input bundle. BND is a tools simplifying bundle creation. So, it is possible to combine the two tools to create your bundle automatically. The following build.xml shows you an example of combination. <project default="main" basedir="."> <target name="bnd"> <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="bnd-0.0.178.jar"/> <bnd classpath="src" eclipse="true" failok="false" exceptions="true" files="foo.bnd"/> </target> <target name="main" depends="bnd"> <echo message="Call main"/> <taskdef name="ipojo" classpath="org.apache.felix.ipojo.ant-0.7.3-SNAPSHOT.jar" classname="org.apache.felix.ipojo.task.PojoTask"/> <ipojo input="foo.jar" metadata = "meta.xml" /> </target> </project> The first target creates the bundle with BND. More details on the BND Ant Task are available here However, it is possible to create only one target doing the two operations as: <target name="main"> <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="bnd-0.0.178.jar"/> <taskdef name="ipojo" classpath="org.apache.felix.ipojo.ant-0.7.3-SNAPSHOT.jar" classname="org.apache.felix.ipojo.task.IPojoTask"/> <bnd classpath="src" eclipse="true" failok="false" exceptions="true" files="foo.bnd"/> <ipojo input="foo.jar" metadata = "meta.xml"/> </target> |
Unsubscribe or edit your notifications preferences
