Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 1 | |
| 2 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <HTML> |
| 4 | |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 5 | <!-- Mirrored Site: felix.apache.org. File: /site/ipojo-ant-task.html. Date: Mon, 13 Oct 2008 06:52:44 GMT --> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 6 | <HEAD> |
| 7 | <TITLE>Apache Felix - iPOJO Ant Task</TITLE> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 8 | <LINK rel="stylesheet" href="media.data/site.css" type="text/css" media="all"> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 9 | <META http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
| 10 | </HEAD> |
| 11 | <BODY> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 12 | <DIV class="title"><DIV class="logo"><A href="index.html"><IMG border="0" alt="Apache Felix" src="media.data/logo.png"></A></DIV><DIV class="header"><A href="http://www.apache.org/"><IMG border="0" alt="Apache" src="media.data/apache.png"></A></DIV></DIV> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 13 | <DIV class="menu"> |
| 14 | <UL> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 15 | <LI><A href="news.html" title="news">news</A></LI> |
| 16 | <LI><A href="license.html" title="license">license</A></LI> |
| 17 | <LI><SPAN class="nobr"><A href="downloads.html" title="Visit page outside Confluence" rel="nofollow">downloads<SUP><IMG class="rendericon" src="../../cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI> |
| 18 | <LI><A href="documentation.html" title="documentation">documentation</A></LI> |
| 19 | <LI><A href="mailinglists.html" title="mailinglists">mailing lists</A></LI> |
| 20 | <LI><A href="contributing.html" title="Contributing">contributing</A></LI> |
| 21 | <LI><SPAN class="nobr"><A href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">asf<SUP><IMG class="rendericon" src="../../cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI> |
| 22 | <LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">sponsorship<SUP><IMG class="rendericon" src="../../cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI> |
| 23 | <LI><SPAN class="nobr"><A href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">sponsors<SUP><IMG class="rendericon" src="../../cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 24 | <!-- ApacheCon Ad --> |
| 25 | <IFRAME src="http://www.apache.org/ads/button.html" style="border-width:0; float: left" frameborder="0" scrolling="no" width="135" height="135"></IFRAME> |
| 26 | <P style="height: 100px"> |
| 27 | <!-- ApacheCon Ad --></LI> |
| 28 | </UL> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 29 | </DIV> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 30 | <DIV class="main"> |
| 31 | <TABLE class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><TBODY><TR> |
| 32 | <TD class="confluenceTd" valign="top" width="80%"> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 33 | |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 34 | <H1><A name="iPOJOAntTask-IPOJOAntTask"></A>IPOJO Ant Task</H1> |
| 35 | |
| 36 | <P>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.</P> |
| 37 | |
| 38 | <H2><A name="iPOJOAntTask-DownloadingtheiPOJOAntTask"></A>Downloading the iPOJO Ant Task</H2> |
| 39 | |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 40 | <P>The iPOJO Ant Task can ben downloaded from <A href="download.html" title="Download">here</A>.</P> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 41 | |
| 42 | <H2><A name="iPOJOAntTask-HowtousetheAntTask"></A>How to use the Ant Task</H2> |
| 43 | |
| 44 | <P>The iPOJO Ant task take an input bundle and a metadata file and create the final (i.e. manipulated) bundle.<BR> |
| 45 | To use the task declare a target in your build.xml as:</P> |
| 46 | <DIV class="panel"><DIV class="panelContent"> |
| 47 | <P><target name="main"><BR> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 48 | <FONT color="red"><!-- Change the path to point on the iPOJO Ant task jar--></FONT><BR> |
| 49 | <taskdef name="ipojo"<BR> |
| 50 | classname="org.apache.felix.ipojo.task.IPojoTask"<BR> |
| 51 | <FONT color="red">classpath="org.apache.felix.ipojo.ant-0.8.1.jar"</FONT>/></P> |
| 52 | |
| 53 | <P> <ipojo<BR> |
| 54 | input="foo.jar"<BR> |
| 55 | metadata = "meta.xml"<BR> |
| 56 | /><BR> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 57 | </target></P> |
| 58 | </DIV></DIV> |
| 59 | <P>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.</P> |
| 60 | |
| 61 | <H2><A name="iPOJOAntTask-AntTaskArguments"></A>Ant Task Arguments</H2> |
| 62 | |
| 63 | <P>The iPOJO Ant Task as three different arguments:</P> |
| 64 | <UL> |
| 65 | <LI>Input: describes the input bundle. This argument is mandatory.</LI> |
| 66 | <LI>Output: describes the output bundle. This argument is optional. If not present, the output file will be input file.</LI> |
| 67 | <LI>Metadata: describes the metadata file. This argument is optional. By default, it tries with a metadata.xml file (in the same directory as the build.xml file). If the default file is not present, it tries to use only iPOJO annotations.</LI> |
| 68 | <LI>IgnoreAnnotations: if set to "true", the manipulator skips annotations processing.</LI> |
| 69 | </UL> |
| 70 | |
| 71 | |
| 72 | <H2><A name="iPOJOAntTask-CombiningtheiPOJOAntTaskandBND"></A>Combining the iPOJO Ant Task and BND</H2> |
| 73 | |
| 74 | <P>The 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.</P> |
| 75 | <DIV class="panel"><DIV class="panelContent"> |
| 76 | <P><project default="main" basedir="."><BR> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 77 | <target name="bnd"><BR> |
| 78 | <FONT color="red"><!-- Change to use the latest BND version –</FONT><FONT color="red">></FONT><BR> |
| 79 | <taskdef resource="aQute/bnd/ant/taskdef.properties"<BR> |
| 80 | <FONT color="red">classpath="bnd-0.0.178.jar"</FONT>/><BR> |
| 81 | <bnd<BR> |
| 82 | classpath="src"<BR> |
| 83 | eclipse="true"<BR> |
| 84 | failok="false"<BR> |
| 85 | exceptions="true"<BR> |
| 86 | <FONT color="red">files="foo.bnd"</FONT>/><BR> |
| 87 | </target></P> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 88 | |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 89 | <P> <target name="main" depends="bnd"><BR> |
| 90 | <echo message="Call main"/><BR> |
| 91 | <FONT color="red"><!-- Change the path to point on the iPOJO Ant task jar --></FONT><BR> |
| 92 | <taskdef name="ipojo"<BR> |
| 93 | classname="org.apache.felix.ipojo.task.PojoTask"<BR> |
| 94 | <FONT color="red">classpath="org.apache.felix.ipojo.ant-0.8.1.jar"</FONT> /><BR> |
| 95 | <ipojo<BR> |
| 96 | <FONT color="red">input="foo.jar"</FONT><BR> |
| 97 | metadata = "meta.xml"<BR> |
| 98 | /><BR> |
| 99 | </target><BR> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 100 | </project></P> |
| 101 | </DIV></DIV> |
| 102 | <P>The first target creates the bundle with BND. More details on the BND Ant Task are available here. To combine the BND output and the iPOJO input, the iPOJO input need to be the same as the BND file but with the ".jar" extension. For instance, the BND file is foo.bnd, so the input jar must be foo.jar.<BR> |
| 103 | To be sure that the BND bundle is already created, you can add the "<EM>depends</EM>" clause in the target using the iPOJO task to the target creating the bundle.</P> |
| 104 | |
| 105 | <P>However, it is possible to create only one target doing the two operations as:</P> |
| 106 | <DIV class="panel"><DIV class="panelContent"> |
| 107 | <P><target name="main"><BR> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 108 | <FONT color="red"><!-- Change to use the latest BND version --></FONT><BR> |
| 109 | <taskdef<BR> |
| 110 | resource="aQute/bnd/ant/taskdef.properties"<BR> |
| 111 | <FONT color="red">classpath="bnd-0.0.178.jar"/></FONT></P> |
| 112 | |
| 113 | <P> <FONT color="red"><!-- Change the path to point on the iPOJO Ant task jar --></FONT><BR> |
| 114 | <taskdef name="ipojo"<BR> |
| 115 | classname="org.apache.felix.ipojo.task.IPojoTask"<BR> |
| 116 | <FONT color="red">classpath="org.apache.felix.ipojo.ant-0.8.1.jar"</FONT>/></P> |
| 117 | |
| 118 | <P> <bnd<BR> |
| 119 | classpath="src"<BR> |
| 120 | eclipse="true"<BR> |
| 121 | failok="false"<BR> |
| 122 | exceptions="true"<BR> |
| 123 | files="<FONT color="red">foo.bnd</FONT>"/></P> |
| 124 | |
| 125 | <P> <ipojo<BR> |
| 126 | input="<FONT color="red">foo.jar</FONT>"<BR> |
| 127 | metadata = "meta.xml"/><BR> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 128 | </target></P> |
| 129 | </DIV></DIV> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 130 | |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 131 | <H2><A name="iPOJOAntTask-Conclusion"></A>Conclusion</H2> |
| 132 | |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 133 | <P>Subscribe to the Felix users mailing list by sending a message to <SPAN class="nobr"><A href="mailto:users-subscribe@felix.apache.org" title="Send mail to users-subscribe@felix.apache.org" rel="nofollow">users-subscribe@felix.apache.org<SUP><IMG class="rendericon" src="../../cwiki.apache.org/confluence/images/icons/mail_small.gif" height="12" width="13" align="absmiddle" alt="" border="0"></SUP></A></SPAN>; after subscribing, email questions or feedback to <SPAN class="nobr"><A href="mailto:users@felix.apache.org" title="Send mail to users@felix.apache.org" rel="nofollow">users@felix.apache.org<SUP><IMG class="rendericon" src="../../cwiki.apache.org/confluence/images/icons/mail_small.gif" height="12" width="13" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P></TD> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 134 | <TD class="confluenceTd" valign="top" width="20%"> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 135 | <H6><A name="iPOJOAntTask-Overview"></A><B>Overview</B></H6> |
| 136 | <UL> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 137 | <LI><A href="apache-felix-ipojo.html" title="Apache Felix iPOJO">Home Page</A></LI> |
| 138 | <LI><A href="apache-felix-ipojo-feature-overview.html" title="Apache Felix iPOJO Feature Overview">iPOJO Feature Overview</A></LI> |
| 139 | <LI><A href="download.html" title="Download">Download & Install </A></LI> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 140 | </UL> |
| 141 | |
| 142 | |
| 143 | <H6><A name="iPOJOAntTask-GettingStarted"></A><B>Getting Started</B></H6> |
| 144 | <UL> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 145 | <LI><A href="ipojo-in-10-minutes.html" title="iPOJO in 10 minutes">iPOJO in 10 minutes</A></LI> |
| 146 | <LI><A href="ipojo-hello-word-maven-based-tutorial.html" title="iPOJO Hello Word (Maven-Based) tutorial">iPOJO Hello Word (Maven-Based) tutorial</A></LI> |
| 147 | <LI><A href="ipojo-advanced-tutorial.html" title="iPOJO Advanced Tutorial">iPOJO Advanced Tutorial</A></LI> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 148 | </UL> |
| 149 | |
| 150 | |
| 151 | <H6><A name="iPOJOAntTask-UserGuide"></A><B>User Guide</B></H6> |
| 152 | <UL> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 153 | <LI><A href="describing-components.html" title="Describing components">Describing components (handler list) </A></LI> |
| 154 | <LI><A href="how-to-use-ipojo-annotations.html" title="How to use iPOJO Annotations">How to use iPOJO Annotations</A></LI> |
| 155 | <LI><A href="using-xml-schemas.html" title="Using XML Schemas">Using XML Schemas</A></LI> |
| 156 | <LI><A href="ipojo-advanced-topics.html" title="iPOJO Advanced Topics">Advanced Topics</A></LI> |
| 157 | <LI><A href="ipojo-faq.html" title="iPOJO FAQ">FAQ</A></LI> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 158 | </UL> |
| 159 | |
| 160 | |
| 161 | <H6><A name="iPOJOAntTask-Tools"></A><B>Tools</B></H6> |
| 162 | <UL> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 163 | <LI><A href="ipojo-eclipse-plug-in.html" title="iPOJO Eclipse Plug-in">iPOJO Eclipse Plug-in</A></LI> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 164 | <LI><A href="#" title="iPOJO Ant Task">iPOJO Ant Task</A></LI> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 165 | <LI><A href="ipojo-maven-plug-in.html" title="iPOJO Maven Plug-in">iPOJO Maven Plug-in</A></LI> |
| 166 | <LI><A href="ipojo-concepts-overview.html" title="iPOJO Concepts Overview">iPOJO concepts overview</A></LI> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 167 | </UL> |
| 168 | |
| 169 | |
| 170 | <H6><A name="iPOJOAntTask-DeveloperGuide"></A><B>Developer Guide</B></H6> |
| 171 | <UL> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 172 | <LI>API: <SPAN class="nobr"><A href="http://people.apache.org/~clement/ipojo/api/0.8/" title="Visit page outside Confluence" rel="nofollow">0.8<SUP><IMG class="rendericon" src="../../cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI> |
| 173 | <LI><A href="how-to-write-your-own-handler.html" title="How to write your own handler">How to write your own handler</A></LI> |
| 174 | <LI><A href="how-to-use-ipojo-manipulation-metadata.html" title="How to use iPOJO Manipulation Metadata">How to use iPOJO Manipulation Metadata</A></LI> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 175 | </UL> |
| 176 | |
| 177 | |
| 178 | <H6><A name="iPOJOAntTask-Misc%26Contact"></A><B>Misc & Contact</B></H6> |
| 179 | <UL> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 180 | <LI><A href="apache-felix-ipojo-issuestracker.html" title="apache-felix-ipojo-issuestracker">Issues Tracker</A></LI> |
| 181 | <LI><A href="apache-felix-ipojo-supportedvms.html" title="apache-felix-ipojo-supportedVMs">Supported JVMs</A></LI> |
| 182 | <LI><A href="apache-felix-ipojo-supportedosgi.html" title="apache-felix-ipojo-supportedOSGi">Supported OSGi Implementations</A></LI> |
| 183 | <LI><A href="future-ideas.html" title="Future Ideas">Future Ideas</A></LI> |
| 184 | <LI><A href="contact.html" title="Contact">Contact</A></LI> |
| 185 | <LI><A href="related-works.html" title="Related Works">Related Works</A></LI> |
| 186 | <LI><A href="article-presentations.html" title="Article & Presentations">Article & Presentations</A></LI> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 187 | </UL> |
| 188 | |
| 189 | |
| 190 | <HR> |
| 191 | <DIV class="" align="center"> |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 192 | <P><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/createrssfeed.action?types=blogpost&statuses=created&statuses=modified&spaces=FELIX&labelString=iPOJO&rssType=atom&maxResults=10&timeSpan=5&publicFeed=true&title=iPOJO%20Atom%20Feed" title="Stay tuned!" rel="nofollow"><IMG src="../../cwiki.apache.org/confluence/images/icons/feed-icon-32x32.png" align="absmiddle" border="0"><SUP><IMG class="rendericon" src="../../cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P></DIV></TD></TR></TBODY></TABLE> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 193 | </DIV> |
| 194 | </BODY> |
| 195 | |
Clement Escoffier | 130ca57 | 2008-10-13 07:33:03 +0000 | [diff] [blame] | 196 | <!-- Mirrored Site: felix.apache.org. File: /site/ipojo-ant-task.html. Date: Mon, 13 Oct 2008 06:52:44 GMT --> |
Clement Escoffier | 5025402 | 2008-05-16 20:33:54 +0000 | [diff] [blame] | 197 | </HTML> |