Date: 2004-02-29T00:21:04
   Editor: 218.214.49.176 <>
   Wiki: Ant Wiki
   Page: Proposals/Antlet/Sample
   URL: http://wiki.apache.org/ant/Proposals/Antlet/Sample

   no comment

New Page:

Antlets are designed to be (optionally) downloaded and imported by the 
importantlet task
[http://cvs.sourceforge.net/viewcvs.py/metamorphosis/centipede2/src/java/org/krysalis/centipede2/ant/ImportAntletTask.java?view=markup
 sample code]

= Sample =

{{{
<?xml version="1.0"?>
<project default="dist" basedir="." name="hello-world">
        <description>Helloworld template project.</description>
    <typedef resource="org/apache/ant/antlet/antlib.xml"     />
    <importantlet name="init" href="http://ant.apache.org/antlets"; />
    <target name="dist" >
      <echo message="Build dir is defined in init as ${build.dir}"/>
     </target>
</project>
}}}

This will download and automatically import 
http://ant.apache.org/antlets/init/xbuild.xml  Which looks like

{{{
<?xml version="1.0"?>
<project  basedir="." name="init.antlet">
        <description>Standard Init.</description>
   <property name="build.dir" value="${basedir}/build}" />
   <mkdir dir="${build.dir}"/>


</project>
}}}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to