ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Salgado <salgado...@04web.com>
Subject Re: java task NoClassDefFoundError
Date Fri, 16 Jan 2004 23:04:32 GMT

            <classpath>
                <path refid="project.class.path"/>
                <pathelement location="${dir.build}" />
                <pathelement location="${dir.metadata}" />
            </classpath>

  Worked perfectly.

  Thank you Dominique,

Pedro Salgado

On 16/01/2004 22:46, "Dominique Devienne" <DDevienne@lgc.com> wrote:

>> From: Pedro Salgado [mailto:salgado.pc@04web.com]
>>>>                 <fileset dir="${dir.metadata}">
>>>>                     <include name="**/struts-*.xml"/>
>>>>                 </fileset>
>>> 
>>> XML files are of no use in the classpath usually...
>> 
>>   I know but I need them because I am using StrutsTestCase. It needs the
>> struts config files on the classpath to test the Struts actions. :)
> 
> Yes, but... You seem to be a bit confused on how classpath works...
> Most likely StrutsTestCase wants to load these XML files as resources,
> And thus you need to have the directory that contains them in the classpath,
> Not the files themselves. Which directory to put on the classpath?
> It depends... In your case, it might be ${dir.metadata}.
> 
>>             <classpath>
>>                 <fileset
>> dir="${dir.build}/com/pg/portonline/junit/actions">
>>                     <include name="**/*.class"/>
>>                 </fileset>
>>             </classpath>
> 
> This is again not a valid classpath entry...
> I'm just guessing, but you probably need to add a
> 
>                 <pathelement location="${dir.build}" />
> 
> to your classpath in addition to all JARs your class depends on.
> 
> Does anybody have a good suggestion on good documentation on
> classpath setting and what it is exactly? --DD
> 
> ---------------------------------------------------------------------
> 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