ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rubun Tang <rt...@algorithmics.com>
Subject RE: strange behavior in script task
Date Fri, 25 Jan 2002 22:30:07 GMT
I got it.

In the <script> task, when adding new task, it has to be added to a target
that is currently running. For example,

<target name="foo">
...

foo.addTask(f);
</target>

will work when "ant foo" is called.

<target name="main" depends="foo"/>
<target name="foo">
	<script>
		...
		foo.addTask(f);
	</script>
</target>

will also work when doing "ant main" because "main" is currently used.
However,

<target name="main" depends="foo"/>
<target name="foo">
	<script>
		...
		bar.addTask(f);
	</script>
</target>

This won't work, because "bar" is not existed in the build sequence.

I apologize if this looks all too obvious. :-)


Rubun


-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Friday, January 25, 2002 5:07 PM
To: Ant Users List
Subject: Re: strange behavior in script task


--- Peter Mularien <pmularien@deploy.com> wrote:
> I'm looking at your script and seeing that it's adding tasks to task
> 'main'

I think you mean: target 'main'

> and not the task you're executing directly.
              ^^^^ [ditto]

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message