Best approach is to create a new spell (magic plugin). You can do this
by creating a new project containing the following build.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<project name="my-xdoclet-spell" default="install" basedir="."
xmlns:x="antlib:org.apache.avalon.tools">
<x:home/>
<import file="${magic.templates}/standard.xml"/>
<target name="build" depends="standard.build">
<x:declare/>
</target>
</project>
The <x:declare> target will generate a plugin descriptor using
information about the "my-xdoclet-spell" declared in you index.xml file.
The following is an example of a <plugin> declaration in index.xml:
<plugin basedir="somewhere/xdoclet">
<info>
<group>somewhere</group>
<name>my-xdoclet-spell</name>
<type>plugin</type>
</info>
<dependencies>
<include key="hybernate"/>
</dependencies>
<tasks>
<taskdef name="xdoclet" class="org.hybernate.whatever.TaskThing"/>
</tasks>
</plugin>
The important point is to declare the taskdef in the plugin definition
such that it refers to a valid task class in the classpath declared by
the plugin descriptor. With the above I place ... you can use your
plugin task inside a build.xml as follows:
<target name=" xdoclet" depends="prepare">
<x:plugin name="xdoclet"
uri="plugin: somewhere/xdoclet/my-xdoclet-spell "/>
<xdoclet/>
</target>
Cheers, Steve.
> -----Original Message-----
> From: David Leangen [mailto:[EMAIL PROTECTED]
> Sent: 23 September 2004 17:58
> To: [EMAIL PROTECTED]
> Subject: Using XDoclet with Magic
>
>
> I'd like to use XDoclet with my build. Is there already a mechanism
for
> this?
>
> Specifically, I am using the Hibernate task.
>
>
> Has anybody already done this?
>
>
> Thanks!
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]