Getting a spell to work...

David Leangen dleangen at canada.com
Fri Dec 3 04:45:03 EST 2004


Please see comments inline...

> > Here is the project declaration in my index.xml file for the spell:
> >
> >   <project basedir=".">
> >     <info>
> >       <group>spells</group>
> >       <name>hibernate-xdoclet-spell</name>
> >       <type>plugin</type>
> >     </info>
> >     <dependencies>
> >       <include key="commons-collections"/>
> >       <include key="commons-logging"/>
> >       ...bla bla bla...
> >     </dependencies>
> >   </project>
>
>
> OK - first item.  The above <tasks> element is not part of a <project>
> description.


Done


> > Here is the project declaration that is using the above spell:
> >
> >   <project basedir="./impl">
> >     <info>
> >       <group>group/project</group>
> >       <name>group-project-impl</name>
> >       <version>SNAPSHOT</version>
> >     </info>
> >     <dependencies>
> >       <include key="hibernate-xdoclet-spell"/>
> >       <include key="ant"/>
> >       ...bla bla bla...
> >     </dependencies>
> >   </project>
>
>
> For now - drop the <plugins> element because the plugin you have created
> is not a project listener or antlib.


Done


> > In the build file using the spell, I have this:
> >
> >     <transit:plugin
> uri="artifact:meta:spells/hibernate-xdoclet-spell">
> >       <task name="xdoclet-hibernate"
> > class="xdoclet.modules.hibernate.HibernateDocletTask"/>
> >     </transit:plugin>
> >     <xdoclet-hibernate/>
>
> This looks fine - except I would suggest not using a "." as part of the
> task name as is seems that ant may be getting itself confussed (at least
> that my take based on the error message below).


Done


Now, the error is this:

  Can't create a hibernate element under xdoclet-hibernate.
  Make sure the jar file containing the corresponding subtask
  class is on the classpath specified in the <taskdef> that
  defined {2}.


I'll wait to see what you have to say before I try the more drastic approach
that Niclas suggested.


Thanks!!
Dave





More information about the support-dpml mailing list