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=43040>.
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=43040

           Summary: Ant Manual needs to be updated
           Product: Ant
           Version: 1.6.5
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


The task gets instantiated using a no-argument constructor, at parser time. This
means even tasks that are never executed get instantiated.

Above is from ant manual.

I tried a sample based on the above explanation.

  

    <?xml version="1.0" encoding="UTF-8"?>
     
    <project name="compilation" default="hello world">
    <taskdef name="PrintHello" classname="com.gft.customTask.PrintHello"
classpath="./PrintHello.jar"/>
    <taskdef name="PrintHello2" classname="com.gft.customTask.PrintHello2"
classpath="./PrintHello.jar"/>
    <taskdef name="PrintHello3" classname="com.gft.customTask.PrintHello3"
classpath="./PrintHello.jar"/>
     
    <target name="hello world">
    <PrintHello/>
    <echo>Called Class1 PrintHello</echo>
    <PrintHello2/>
    <echo>Called Class2 PrintHello2</echo>
     
    <echo>Called Class3 PrintHello3</echo>
     
    </target> 
    <target name="hello" >
    <PrintHello3/>
    </target>
    </project>



For each taskdef , I have a System.out.println in its constructor. The problem
that I am facing is that the constructor for the task <PrintHello3/> is not
getting called(I thought this should have been called at parser time,even though
its target is never executed).

It seems that This means even tasks that are never executed get instantiated
does not hold true in the above case.

However this works fine in 1.4 suggesting that the feature has been removed in
the latest versions, hence the manual needs to be updated for the same.


Regards,
Joshua

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to