ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [VOTE] target-less build files
Date Thu, 18 Jul 2002 08:52:51 GMT
On Thu, 18 Jul 2002, Stephane Bailliez <stephane.bailliez@haht.com>
wrote:

> I don't understand as to me what you want is like putting some java
> code anywhere in a class but outside the methods.

This is possible for all versions of Ant, the code is <property> and
<taskdef> and since 1.5 <typedef>.

A few months ago we agreed to stretch this concept to all tasks, so
that we no longer have to rely on magic names.

See <http://marc.theaimsgroup.com/?t=100347272700004&r=1&w=2>.

Try this in Ant 1.5

<project default="a">
  <taskdef name="property"
           classname="org.apache.tools.ant.taskdefs.Echo" />
  <property>Hello world</property>
  <target name="a" />
</project>

It is going to work.

If you disagree with allowing all tasks outside of targets, I'll have
to revert a bit more of code, I guess.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message