> James CE Johnson wrote:
>
>> <ejbdoclet ... lots of attributes >
>>    ... lots of common stuff like <session/>
>>    <jboss subtask />
>> </ejbdoclet>
>>
>> Then in weblogic:ejbdoclet you would have this:
>>
>> <ejbdoclet ... lots of attributes >
>>    ... lots of common stuff like <session/>
>>    <weblogic subtask />
>> </ejbdoclet>
>>
>> How do we avoid duplicating all of the common stuff (ejbdoclet
>> attributes and subtasks) in an easy to maintain way?
>
> You create custom tags, either using jelly:define, or by writing your
> code as Plain Old Java Objects (in contrast to Ant tasks) and wrapping
> them into Jelly Taglibs. Maven core and multiple plugins use this
> approach.
>

I'm having trouble implementing this approach.

I've created a new xdoclet plugin and in that I've created a custom tag
thusly:

  <define:taglib uri="xdoclet">
    <define:tag name="ejbdoclet">

      <taskdef name="ejbdoclet"
               classname="xdoclet.modules.ejb.EjbDocletTask">
        <classpath refid="maven.dependency.classpath"/>
      </taskdef>

      <ejbdoclet destdir="${maven.xdoclet.ejbdoclet.dest}"
                 excludedtags="${maven.xdoclet.ejbdoclet.excludedtags}"
                 ejbspec="${maven.xdoclet.ejbdoclet.ejbspec}"
                 >

          ... common ejbdoclet stuff ...

          .... include body of tag ...

      </ejbdoclet>

    </define:tag>
  </define:taglib>


Then I have a goal like this:

  <goal name="foo">
    <xdoclet:ejbdoclet>
      <jboss
             destdir="${maven.xdoclet.ejbdoclet.dddest}"
             version="3.0"
             xmlencoding="UTF-8"
             />
    </xdoclet:ejbdoclet>
  </goal>

The <jboss> tag is ignored. I've tried using <define:invokeBody/> but
that's not working and it isn't really the right thing to do anyway.

Can anybody suggest a solution?

Thanks,
James


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to