ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42482] New: - ant and subant improperly passes references to macrodefs and scriptdefs to the child script
Date Tue, 22 May 2007 02:19:16 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42482>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42482

           Summary: ant and subant improperly passes references to macrodefs
                    and scriptdefs to the child script
           Product: Ant
           Version: 1.7.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: sanduatwork@hotmail.com


I have created my own antlib that contains macrodefs and scripdefs. I reference
it using a namespace declaration. It works fine until I invoke my tasks from a
child script called by subant.
Invoking a scriptdef task results in "Script repository not found for ..."
thrown from ScriptDefBase.getScript.
Invoking a macrodef has another sideeffect.
If I have something like:
<macrodef name="mymacro>
<attribute name="basedir" default="${basedir}"/>
....
The default is being evaluated once for the parent script and then is passed
along to the child script.

I went throught the code and I think the problem is that
ComponentHelper.initSubProject passes all the custom typedefs and taskdefs to
the child script.
This works well with regular taskdefs and typedefs because they are essentialy
static, however scriptdefs and macrodefs are not. Well maybe only macrodefs -
the scriptdef issue seems to be just a bug.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message