Typically it is unqualified class name + .vm in same package. of course this template shall be on classpath / packed into respective jar
This assotiation is done by velocoty template engine ( found in generama) regards, ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- JTec quality components: http://www.pribluda.de/projects/ --- On Thu, 10/16/08, Richard Hoberman <[EMAIL PROTECTED]> wrote: > From: Richard Hoberman <[EMAIL PROTECTED]> > Subject: [xdoclet-plugins-interest] How is the template associated with the > plugin? > To: xdoclet-plugins-interest@lists.sourceforge.net > Date: Thursday, October 16, 2008, 4:17 PM > Hi > > I'm a complete xdoclet2 newbie. I'm trying to > write a plugin (source > below) to generate data objects using the > InterfaceExtractor plugin as > an example. I'm using 2.0.6 and running the plugin as > an Ant task. I > get the following error: > > org.generama.GeneramaException: Exception occurred when > running Velocity > > I suspect that the problem is that my template is not being > passed to > velocity (since there is nothing in the template that could > break - it > is currently completely static - see below). It is > probably staring me > in the face, but where is the template for a plugin > specified? At the > moment I simply have a template with the same name as my > plugin but with > the .vm extension which is sitting in the same directory as > my plugin class. > > If this isn't the problem, is there a way to get more > information out of > Generama and/or Velocity as to just what the problem is? > > Best regards > > Richard Hoberman > > ---------------------- > The plugin code: > ---------------------- > > package example.xdoclet2.plugin; > > import org.generama.QDoxCapableMetadataProvider; > import org.generama.VelocityTemplateEngine; > import org.generama.WriterMapper; > import org.generama.defaults.JavaGeneratingPlugin; > > public class TestPlugin extends JavaGeneratingPlugin { > > public TestPlugin(VelocityTemplateEngine > templateEngine, > QDoxCapableMetadataProvider > metadataProvider, > WriterMapper writerMapper) > { > > super(templateEngine, metadataProvider, > writerMapper); > > } > > } > > ----------------------------- > The Velocity template > ----------------------------- > > public interface I { > > > } > > ----------------- > The Ant task > ----------------- > > <taskdef name="xdoclet2" > > classname="org.xdoclet.ant.XDocletTask" > > classpathref="classpath.tools.xdoclet2-plugins" > /> > > > <target name="generate-representations" > depends="prepare, > compile-tools"> > > <xdoclet2 verbose="true"> > > <fileset > dir="${src.representations}"> > <include name="**/*.java" > /> > </fileset> > > <component > > classname="org.generama.VelocityTemplateEngine" > /> > > <component > > classname="com.cerbex.tools.xdoclet2.plugin.RepresentationPlugin" > destdir="${gen.representations}" > /> > > </xdoclet2> > > </target> > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > xdoclet-plugins-interest mailing list > xdoclet-plugins-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ xdoclet-plugins-interest mailing list xdoclet-plugins-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest