ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: Execution classpath question for taskdef
Date Wed, 19 Jan 2011 23:44:35 GMT
On 1/19/11 3:26 PM, wrote:
> Let me ask this clarification question before answering yours ...
> 1. The taskdef "classpath" attribute is NOT what is used when the taskdef is actually
executed.  Correct?
Wrong, the classpath nested element or attribute is used. I notice you
are using both the classpath attribute and the nested element.

  <taskdef name="SeleniumHTMLClient" classname="com.criticalmass.util.ant.SeleniumRunner"
                <classpath refid="selenium-classpath-ref" />

You should use only one of the nested element or the attribute.

If you use the attribute, the proper path separator for your operating
system should be used.

this ${selenium-lib}:${selenium.jar.path} is only legit on UNIX.

Better is to write ${path.separator} instead of ":"   

Also if "${selenium-lib}" is a directory I am not sure it is going to include all the jars
in this directory

maybe you want to define your path like that

<path id="selenium-classpath-ref">
  <fileset dir="${selenium-lib}">
    <include name="*.jar"/>
  <pathelement location="${selenium.jar.path}"/>

and your taskdef like that :

  <taskdef name="SeleniumHTMLClient" classname="com.criticalmass.util.ant.SeleniumRunner"
                <classpath refid="selenium-classpath-ref" />



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message