Thanks for this recommendation.  A couple of follow up questions ...

1 If I add the classloader task to my custom task, does that classloader take 
precedence over the classes loaded by ${ANT_HOME}/lib ?
2. How do I add the classloader task to my custom task?  My custom task 
resembles ...

<target name="Selenium4" depends="build-cm-selenium,checkout-selenium-tests">
        <echo message="selenium paths ..." />
        <echo message="${selenium-lib}" />
        <echo message="${selenium.jar.path}" />
        <taskdef name="SeleniumHTMLClient" 
classname="com.criticalmass.util.ant.SeleniumRunner" 
classpath="${selenium-lib}:${selenium.j
ar.path}">                <classpath refid="selenium-classpath-ref" />
        </taskdef>

        <property name="results" 
location="${selenium.base.test.dir}/Results.html" />
        <property name="base.test.dir" 
value="${lvcva.checkout.dir}/${selenium.vegas.test.root}" />

        <SeleniumHTMLClient results="${results}"
                            appendResults="true"
                            verbose="true"
                            showPassedTests="false"
                            excludeHeaderAndFooter="true"
                            multithread="true"
                            emailTo="${selenium.email.to}"
                            emailFrom="${selenium.email.from}"
                            emailSubject="${selenium.email.subject}"
                            emailHost="${selenium.email.host}">

                <Host value="${selenium.windows.host.value}" 
port="${selenium.windows.host.port}">
                        <Browser value="*chrome" />
                        <Browser value="*iehta" />
                </Host>

                <TestSuite baseurl="${selenium.vlv.baseurl}">
                        <fileset 
dir="${base.test.dir}/${selenium.vlv.test.dir}">
                                <include name="**\*.html" />
                        </fileset>
                </TestSuite>
        </SeleniumHTMLClient>

        <concat destfile="${selenium.base.test.dir}/Results2.html">
                <header file="${selenium.base.test.dir}/selenium-header.html" />
                <fileset dir="${selenium.base.test.dir}" 
includes="Results.html">
                </fileset>
                <footer file="${selenium.base.test.dir}/selenium-footer.html" />
        </concat>

        <delete file="${results}"/>
</target>


Thanks, - Dave



>  -------Original Message-------
>  From: Antoine Levy-Lambert <anto...@gmx.de>
>  To: Ant Users List <user@ant.apache.org>
>  Subject: Re: Execution classpath question for taskdef
>  Sent: Jan 19 '11 17:58
>  
>  On 1/19/11 2:54 PM, Michael Ludwig wrote:
>  >
>  > There was another thread today where the same issue arose:
>  >
>  >   Mail task with mail.jar & activation.jar out of lib folder
>  >
>  >   r L 19.01.11 10:31+0100 Patrick Martin    57 Mail task […]
>  >     L 19.01.11 11:19+0100 Patrick Martin    87 ├─>
>  >     F 19.01.11 13:51+0100 Michael Ludwig    75 └─>
>  The classpath attribute or nested element of taskdef works but cannot
>  solve the case of some classes loaded by factories of the JVM (JDBC
>  drivers, mail.jar, activation.jar).
>  These classes have to be either in the ant startup environment. See
>  http://ant.apache.org/manual/running.html#libs
>  
>  Or the classloader task must be used to add the jars to the classloader
>  so that ant classes can access them.
>  
>  As Peter Reilly wrote the URL from which this classloader task can be
>  downloaded is :
>  
>  http://enitsys.sourceforge.net/ant-classloadertask/
>  
>  
>  
>  Regards,
>  
>  Antoine
>  
>  
>  
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
>  For additional commands, e-mail: user-h...@ant.apache.org
>  
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to