> -----Original Message-----
> From: Cameron Taggart [mailto:[EMAIL PROTECTED]
> Sent: 28 October 2004 19:29
> To: Avalon framework users
> Subject: Magic Plugin Portability
>
> Hi Steve & Niclas,
>
> I flagged this email last month, knowing that I would eventually have
> some questions. I have common Ant tasks that I want to use throughout
> various projects.
>
> Eclipse task - Creates a .classpath & .project file for Eclipse with
> all the resources definied in Magic.
> Jetty task - Starts up Jetty with and loads a .war.
> Docbook task - Creates HTML and PDF from our docbook documentation for
> the project.
>
> Those are just a few that we use regularly. I thought they might make
> good plugins, but how would someone else install the plugins?
When you create your plugin you generate a plugin descriptor which get
pocked away in the central cache. The user can load that plugin either
directly in the build file or alternatively, declaring a dependency on
the plugin in the project's index definition.
> Currently, I use the include ability of Ant's build.xml and Maven's
> index.xml. To use Jetty as an example, I have a target_jetty.xml that
> I include in build.xml and a resources_jetty.xml that I include in
> index.xml. It seems to work, but I keep thinking there might be a
> more elegant way.
The most transparent approach is to declare a build listener and have
magic register this automatically. That's what happens with the
meta-plugin. The declaration of the plugin dependency is in the
index.xml and magic auto-installs the plugin listener. The listener
listens for build events which in turn trigger the meta plugin to do its
stuff.
>
> When will Magic be moving over to dpml.net?
It's already done. Metro platform, Magic, and the new Transit
repository management layer are all up and running.
> Will Niclas still be involved in the development?
Is the Pope Catholic?
;-)
> Just curious about the future of Magic,
> as I like it.
Right now we are working on getting Tansit operation under Magic so that
we have the same repository sub-system in both Metro and Magic. If you
take a look at the archives you will find some recent posts about setup
and building of everything.
Cheers, Steve.
> Thanks,
> Cameron
>
>
> On Thu, 23 Sep 2004 19:14:18 +0200, Stephen McConnell
> <[EMAIL PROTECTED]> wrote:
> >
> > 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]
> >
> >
>
> ---------------------------------------------------------------------
> 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]