Re: Zeus Ant task
Dirk Ruediger <[email protected]> Wed, 27 Nov 2002 11:08:57 +0100
| Newsgroups | gmane.comp.java.enhydra.zeus |
|---|---|
| Organization | ZGDV Rostock, Germany |
| Message-ID | <[email protected]> |
Hi all!
On Wed, 27 Nov 2002, Dirk Ruediger wrote:
> On Mon, 25 Nov 2002, Jason Bodnar wrote:
>
> > I'm trying to use the Ant task for Zeus that's mentioned in the User Guide.
> > I've added the following to my build.xml file:
> >
> > <taskdef name="zeus" classname="org.enhydra.zeus.util.ZeusTask"/>
So I forgot to point out, that you will need to define the classpath to
search for the class org.enhydra.zeus.util.ZeusTask in your task
definition (see below!).
> >
> > <target name="zeus" depends="init" description="make zeus classes">
> > <zeus destDir="${src}" defaultJavaPackage="com.broadq.qcaststation.config">
> > <constraint type="DTD" constraintFile="config.dtd"
> > collapseSimpleElements="true"/>
> > </zeus>
> > </target>
> >
> > When I run ant I get:
> >
> > BUILD FAILED
> > file:/home/jbodnar/projects/broadq/pcmiddle/java/build.xml:11: taskdef class
> > org.enhydra.zeus.util.ZeusTask cannot be found
> >
> > The class is part of a jar file in /usr/java/j2sdk1.4.0_01/jre/lib/ext.
> >
> > What do I need to do for ant to find this class and define the task?
>
> I defined my zeus-task (having both jars in my project's lib-dir) with
>
> <taskdef name="zeus"
> classname="org.enhydra.zeus.util.ZeusTask">
> <classpath>
> <pathelement path="${build.lib}/zeus.jar" />
> <pathelement path="${build.lib}/dtdparser114.jar" />
> </classpath>
> </taskdef>
> and use it -ant version 1.4.1- like this (all the properties are defined
> somewhere before or as arguments of an antcall-task):
>
> <target name="zeus">
> <zeus sourceDir="${build.xmls}" destDir="${build.sources}">
> <constraint type="${zeus.type}"
> javaPackage="${zeus.package}"
> constraintFile="${zeus.root}.${zeus.type}" />
> </zeus>
> </target>
>
> And it works quite well!
regards, Dirk
--
Dirk Ruediger, Rostock, Germany