Getting a spell to work...

Stephen McConnell mcconnell at dpml.net
Fri Dec 3 04:53:54 EST 2004



> -----Original Message-----
> From: support-dpml-bounces at lists.ibiblio.org [mailto:support-dpml-
> bounces at lists.ibiblio.org] On Behalf Of David Leangen
> Sent: 03 December 2004 10:45
> To: DPML Support
> Subject: RE: Getting a spell to work...
> 
> 
> 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}.

This is an ant error - and I'm guessing that something in the
HibernateDocletTask is invoking a method to construct an implicit nested
<hibernate> element - and whatever that element contains - it's probably
referencing a class that is not included in the plugin descriptor.

If you turn on -v you should get some additional information about what
is happening - and I bet that transit has loaded the plugin but that a
stack trace will show an error originating in HibernateDocletTask.

But I'm guessing.

:-)

Cheers, Steve.



> 
> I'll wait to see what you have to say before I try the more drastic
> approach
> that Niclas suggested.
> 
> 
> Thanks!!
> Dave
> 
> 
> _______________________________________________
> support-dpml mailing list
> support-dpml at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/support-dpml




More information about the support-dpml mailing list