XDoclet 2

Create a maven2 plugin

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.0.5
  • Component/s: Maven2 plugin
  • Labels:
    None
  • Environment:
    Any
  • Number of attachments :
    5

Description

The available xdoclet plugin for maven2 uses xdoclet 1.2.3
It would be great to have an xdoclet2 plugin for maven2, to be able to take advantage of the new features of xdoclet2 for maven2 users.

I've attached a sample implementation + a pom-file for xdoclet-2.0.3
I had this working, but I'had to make some adjustments to poms for dependencies.

  1. maven2-plugin-patch.txt
    01/Jan/06 8:38 AM
    5 kB
    Shash Chatterjee
  2. maven2-xdoclet2-plugin.tar.gz
    14/Nov/05 3:50 PM
    3 kB
    Espen Amble Kolstad
  3. pom.xml
    14/Nov/05 3:50 PM
    6 kB
    Espen Amble Kolstad
  4. xdoclet-plugin-example-pom.xml
    01/Jan/06 8:39 AM
    2 kB
    Shash Chatterjee
  5. xdoclet-plugins-pom.xml
    01/Jan/06 8:39 AM
    11 kB
    Shash Chatterjee

Activity

Hide
Grégory Joseph added a comment -

Hi,

Could you please provide a sample of how to configure your plugin, I'm pretty much lost

Show
Grégory Joseph added a comment - Hi, Could you please provide a sample of how to configure your plugin, I'm pretty much lost
Hide
Grégory Joseph added a comment -

Started to work on this, and deployed a first draft version.
Draft docs available at: http://docs.codehaus.org/display/XDOCLET/Maven2+plugin
please comment

Show
Grégory Joseph added a comment - Started to work on this, and deployed a first draft version. Draft docs available at: http://docs.codehaus.org/display/XDOCLET/Maven2+plugin please comment
Hide
Shash Chatterjee added a comment -

Here's a patch (maven-xdoclet-patch.txt) to optionally add the output directory to the compileSourceRoot. It looks in the configuration for the plugin for a "destdir" param, else uses the default output directory.

The patch also includes a fix to report xdoclet2 plugin exceptions properly, before the patch Maven2/Plexus was wrapping the exceptions in a Plexus-specific exception, which hid the root cause.

I am also attaching a parent POM for xdoclet-plugins, and a example POM that can be used as a template for all the xdoclet2 plugins.

To use:
.....
<configs>
<config>
<plugin>org.xdoclet.plugin.qtags.impl.QTagImplPlugin</plugin>
<params>
<destdir>${basedir}/target/src/main/java</destdir>
</params>
<includes><include>*/.java</include></includes>
<addSourceRoot>true</addSourceRoot>
</config>
<config>
<plugin>org.xdoclet.plugin.qtags.impl.QTagLibraryPlugin</plugin>
<params>
<destdir>${basedir}/target/src/main/java</destdir>
<packagereplace>org.xdoclet.plugin.keel.qtags</packagereplace>
</params>
<includes><include>*/.java</include></includes>
<addSourceRoot>true</addSourceRoot>
</config>
</configs>
....

Show
Shash Chatterjee added a comment - Here's a patch (maven-xdoclet-patch.txt) to optionally add the output directory to the compileSourceRoot. It looks in the configuration for the plugin for a "destdir" param, else uses the default output directory. The patch also includes a fix to report xdoclet2 plugin exceptions properly, before the patch Maven2/Plexus was wrapping the exceptions in a Plexus-specific exception, which hid the root cause. I am also attaching a parent POM for xdoclet-plugins, and a example POM that can be used as a template for all the xdoclet2 plugins. To use: ..... <configs> <config> <plugin>org.xdoclet.plugin.qtags.impl.QTagImplPlugin</plugin> <params> <destdir>${basedir}/target/src/main/java</destdir> </params> <includes><include>*/.java</include></includes> <addSourceRoot>true</addSourceRoot> </config> <config> <plugin>org.xdoclet.plugin.qtags.impl.QTagLibraryPlugin</plugin> <params> <destdir>${basedir}/target/src/main/java</destdir> <packagereplace>org.xdoclet.plugin.keel.qtags</packagereplace> </params> <includes><include>*/.java</include></includes> <addSourceRoot>true</addSourceRoot> </config> </configs> ....
Hide
Espen Amble Kolstad added a comment -

The jelly-dependencies should all be set to 1.0

The current versions doesn't work properly for the HibernateConfigPlugin see
http://jira.codehaus.org/browse/XDP-167

I tried with 1.0 for all jelly-deps, and that solved the problem

Espen

Show
Espen Amble Kolstad added a comment - The jelly-dependencies should all be set to 1.0 The current versions doesn't work properly for the HibernateConfigPlugin see http://jira.codehaus.org/browse/XDP-167 I tried with 1.0 for all jelly-deps, and that solved the problem Espen
Hide
Grégory Joseph added a comment -

Hmm, this can actually be closed.
The plugin works pretty well for basic stuff.
Improvements needed for

  • being able to build plugins-qtags
  • using merge features
Show
Grégory Joseph added a comment - Hmm, this can actually be closed. The plugin works pretty well for basic stuff. Improvements needed for
  • being able to build plugins-qtags
  • using merge features

People

Vote (3)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: