On Fri, Apr 11, 2008 at 10:24 AM, supareno <[EMAIL PROTECTED]> wrote:

> Kathryn Rivard a écrit :
>
> > I'm having bizarre problems getting ant to find the class referenced
> > in a taskdef (specifically with tomcat, if it matters).  The jar shows
> > up in the classpath reported by -diagnostics*, but ant can't find the
> > class during a build unless I explicitly set the classpath in the
> > taskdef tag**, or put it in my CLASSPATH environment variable***.
> > Details below.
> >
> hi katie,
> you could try this:
>
> <path id="tomcat.classpath">
>  <fileset dir="${tomcat.home}/server/lib" includes="catalina-ant.jar" />
> </path>
> <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask">
>  <classpath refid="tomcat.classpath" />
> </taskdef>
>
> or
>
> <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask">
>  <classpath>
>     <path location="${appserver.home}/server/lib/catalina-ant.jar"/>
>  </classpath>
> </taskdef>



Hi supareno,

Those are both great examples of specifying the classpath as part of the
taskdef, which I know works -- but I need a solution that does not require
modifying the build.xml file.  Thanks though!

I just found out half my team has upgraded to ant 1.7, so that's the next
thing I'm going to try.

Still looking,
Katie

Reply via email to