Bug 36910 - self not defined for task scripts / scriptdef
Summary: self not defined for task scripts / scriptdef
Status: RESOLVED WONTFIX
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.6.5
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2005-10-04 13:59 UTC by egoine_asfbugzilla
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description egoine_asfbugzilla 2005-10-04 13:59:16 UTC
I cannot write a task like:

 <scriptdef name="bla" language="javascript" >
   <attribute name="message"/>
 <![CDATA[
         self.log(attributes.get("message"));
 ]]>
 </scriptdef>

Because self is not defined.

I just checked again and altought there is a fix in the ant CVS tree, it is only
on the main branch and not on the 1.6.X branch so it hasn't yet been part of any
official release:

Main, fix fix as last revision:
http://svn.apache.org/viewcvs.cgi/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDefBase.java?rev=276682&view=log

1.6 branch, lacking the fix:
http://svn.apache.org/viewcvs.cgi/ant/core/branches/ANT_16_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDefBase.java?rev=276209&view=log

So this bug is a request that the fix be merged into the 1.6 branch. (I wonder
if other fixes also got left behind on the main branch.
Comment 1 Peter Reilly 2005-10-04 16:38:28 UTC
Fixes in the head normally are *not* back-ported
to the 1.6 branch