ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <dave.alvar...@cartridgeorder.com>
Subject Re: Execution classpath question for taskdef
Date Wed, 19 Jan 2011 20:26:14 GMT
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?

The output of what I get from running my custom task is below.  Note that the NoClassDefFoundError
is complaining about a class that is in the "/opt/LVCVA/lvcva_tomcat/sandboxes/lvcva-dev-build/common/selenium-server.jar"
jar file, and I have verified that this file exists.

Selenium4:
     [echo] selenium paths ...
     [echo] /opt/LVCVA/lvcva_tomcat/sandboxes/lvcva-dev-build/common/selenium-server.jar
     [echo] /opt/LVCVA/lvcva_tomcat/sandboxes/lvcva-dev-build/common/CmSeleniumUtils.jar
[SeleniumHTMLClient] added test suite.

BUILD FAILED
/opt/LVCVA/lvcva_tomcat/build.xml:746: java.lang.NoClassDefFoundError: com/thoughtworks/selenium/SeleniumException
        at com.criticalmass.util.ant.SeleniumRunner.execute(SeleniumRunner.java:158)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.Main.runBuild(Main.java:801)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: com.thoughtworks.selenium.SeleniumException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 18 more

So my question remains, how do I set the classpath for when my custom task "SeleniumHTMLClient"
is actually executed?  Thanks, - Dave






>  -------Original Message-------
>  From: Michael Ludwig <milu71@gmx.de>
>  To: user@ant.apache.org
>  Subject: Re: Execution classpath question for taskdef
>  Sent: Jan 19 '11 13:54
>  
>  dave.alvarado@cartridgeorder.com schrieb am 19.01.2011 um 13:30 (-0600):
>  
>  > I have discovered that the "classpath" and "claspathref" elements that
>  > are part of the taskdef are not used during run time
>  
>  Are you sure? How did you discover that?
>  
>  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 └─>
>  
>  --
>  Michael Ludwig
>  
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>  For additional commands, e-mail: user-help@ant.apache.org
>  
>  

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


Mime
View raw message