ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Chalko <n...@chalko.com>
Subject Sample antlet was: Proposal: Ant AntLet(s) : Subproject or New Feature
Date Tue, 04 Nov 2003 07:44:48 GMT
Here is what I think antlets might look like.  I have experimented with 
the code and it works
see 
http://nagoya.apache.org/wiki/apachewiki.cgi?AntProjectPages/AntletSample
------------------------------------------------------------------------

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




  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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message