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 5652] New: - subtasks not initialized in Taskdef
Date Wed, 02 Jan 2002 09:32:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5652>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5652

subtasks not initialized in Taskdef

           Summary: subtasks not initialized in Taskdef
           Product: Ant
           Version: 1.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: vojta@idoox.com


I have this build.xml fragment (p = parallel, s = sequential):

    <p>
      <p>
        <echo>P3 start</echo>
      </p>
      <s>
        <echo>P3 start</echo>
        <sleep seconds="2"/>
        <echo>P3 done</echo>
      </s>
    </p>

If <p> and <s> is defined in default.properties
(p=org.apache.tools.ant.taskdefs.MyParallel) it works fine. But if I define it
in <taskdef> (
    <taskdef name="p" 
             classname="org.apache.tools.ant.taskdefs.MyParallel"
             />)
build process fails:

java.lang.NullPointerException
        at org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:148)
        at
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:127)
        at
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:137)
        at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:88)
        at org.apache.tools.ant.Task.perform(Task.java:216)
        at org.apache.tools.ant.Target.execute(Target.java:164)
        at org.apache.tools.ant.Target.performTasks(Target.java:182)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)


Debug log:
...
 +Target: test
   +Task: taskdef
   +Task: taskdef
Build sequence for target `test' is [test]
Complete build sequence is [test]

test:
Class org.apache.tools.ant.taskdefs.MySequential loaded from parent loader
 +User task: s     org.apache.tools.ant.taskdefs.MySequential
Class org.apache.tools.ant.taskdefs.MyParallel loaded from parent loader
 +User task: p     org.apache.tools.ant.taskdefs.MyParallel
   +Task: p
   +Task: p

BUILD FAILED

java.lang.NullPointerException
        at org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:148)
....

--
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