ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Southwell" <ni...@yomobile.net>
Subject Loading custom Task in custom TaskContainer
Date Fri, 05 Jul 2002 14:10:09 GMT
Hi,

I'm trying to create a custom TaskContainer to provide resources for a suite
of custom Tasks, but I find that I'm unable to load the custom tasks.

Ant1.5Beta2, j2sdk1.4.0, Win2000.

MyContainer is a copy of sequential
MyContent is a copy of the sample task.

MyContainer works with standard tasks, but custom tasks won't load
MyContent works inside standard TaskContainers.

    <target name="run">
        <taskdef
            name="MyContent"
            classname="com.yomobile.tasks.MyContentTask"
            classpath="classes"/>
        <taskdef
            name="MyContainer"
            classname="com.yomobile.tasks.MyContainerTask"
            classpath="classes"/>

        <echo message="Hello world from outside"/>
        <MyContainer>
            <MyContent/>        <!-- !!Causes a class loader failure -->
            <echo message="Hello world from inside"/>
        </MyContainer>
        <sequential>
            <MyContent/>
            <echo message="Hello world from inside"/>
        </sequential>
        <MyContent/>
    </target>

I've tried adding loaderref to the taskdef's, but that made no difference.
Any ideas for fixes or work-arounds would be appreciated.

Nick Southwell


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