ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <dave.alvar...@cartridgeorder.com>
Subject Execution classpath question for taskdef
Date Wed, 19 Jan 2011 19:30:35 GMT
Hi,

I'm using Ant 1.8.  I have created a custom task, but I need to include a jar file in the
classpath when this task is exected.  How do I include such a jar file?  I'm using Ant 1.8.
 Here is the definition of the task ...

<target name="Selenium4" depends="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.jar.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>

I have discovered that the "classpath" and "claspathref" elements that are part of the taskdef
are not used during run time, so I am grateful for anyone to tell me how to include classes
when the task is actually executed. - Dave

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


Mime
View raw message