Hi Greg,

Can you try setting the value for the property xdoclet.qtags.namespace?

<property name="xdoclet.qtags.namespace" value="command"/> 

Also, we dont need to inject VelocityTemplateEngine and JellyTemplateEngine with pico explicitly through build file since generama registers those classes with pico by default when it starts up.

<!--
            <component
                classname="org.generama.VelocityTemplateEngine"
            />

            <component
                classname="org.generama.JellyTemplateEngine"
            />
-->

If you are using maven, I have uploaded the maven sub project here.

http://docs.codehaus.org/download/attachments/34430/plugin-command.zip
you have to unzip it under the same folder as other plugins

In your case,

xdoclet.home/src

regards,
karthik


On Thu, 22 Dec 2005 Greg Adams wrote :
>I'm trying to follow along the "Steps for writing Custom plugins"
>semi-tutorial on the Coffee Break Introduction page, accessible here:
>http://xdoclet.codehaus.org/Steps+for+writing+Custom+plugins
>I'm using the xdoclet 2 ant task. Undet the heading, "How to let XDoclet
>know of the custom tags", I get the following error, with the following
>files, while running ant.
>######################################################################
>############################################
>Tag class
>######################################################################
>############################################
>package org.xdoclet.plugin.commands.qtags;
>
>import com.thoughtworks.qdox.model.DocletTag;
>
>/**
>  * This is a custom tag
>  *
>  * @qtags.location class
>  * @qtags.once
>  */
>public interface CommandClassTag extends DocletTag {
>    /**
>      * @qtags.required
>      */
>    String getName_();
>
>    /**
>      * @qtags.default true
>      */
>    String isGenerate();
>}
>######################################################################
>############################################
>build.xml
>######################################################################
>############################################
><project name="Xdoclet2 Custom Tag Tutorial">
>    <property name="xdoclet.home" value="C:/opt/xdoclet-plugins-1.0.3" />
>    <property name="xdoclet.lib.dir" value="${xdoclet.home}/lib" />
>    <property name="xdoclet.plugins.dir" value="${xdoclet.home}/plugins" />
>
>    <path id="xdoclet.task.classpath">
>        <!-- xdoclet2 runtime dependencies -->
>        <fileset dir="${xdoclet.lib.dir}">
>            <include name="**/*.jar" />
>        </fileset>
>        <pathelement
>location="${xdoclet.plugins.dir}/xdoclet-plugin-qtags-1.0.3.jar" />
>    </path>
>
>    <taskdef name="xdoclet" classname="org.xdoclet.ant.XDocletTask"
>classpathref="xdoclet.task.classpath" />
>
>    <target name="run">
>        <mkdir dir="xdoclet-gen/src" />
>        <xdoclet>
>            <fileset dir="src">
>                <include name="**/*.java"/>
>            </fileset>
>            <component
>                classname="org.generama.VelocityTemplateEngine"
>            />
>
>            <component
>                classname="org.generama.JellyTemplateEngine"
>            />
>
>            <component
>                classname="org.xdoclet.plugin.qtags.impl.QTagImplPlugin"
>                destdir="xdoclet-gen/src"
>            />
>
>            <component
>                classname="org.xdoclet.plugin.qtags.impl.QTagLibraryPlugin"
>                destdir="xdoclet-gen/src"
>
>packagereplace="org.xdoclet.plugin.${xdoclet.qtags.namespace}.qtags"
>            />
>        </xdoclet>
>    </target>
></project>
>######################################################################
>############################################
>output of  'ant run'
>######################################################################
>############################################
>Buildfile: C:\devel\tempwork\XDoclet2CustomTagTutorial\build.xml
>run:
>  [xdoclet] Running org.xdoclet.plugin.qtags.impl.QTagImplPlugin
>  [xdoclet] Running org.xdoclet.plugin.qtags.impl.QTagLibraryPlugin
>
>BUILD FAILED
>C:\devel\tempwork\XDoclet2CustomTagTutorial\build.xml:18:
>java.lang.IllegalArgumentException: Illegal group reference
>
>Total time: 4 seconds
>
>
>
>any ideas here?
>
>Greg Adams



Reply via email to