Shash, First, maybe check this page out : http://docs.codehaus.org/display/XDOCLET/Maven2+plugin
Mind that the links might be broken, and I haven't checked myself if this actually works yet - I should do so and get it working if it's not in the coming week, though, since I'll need it at work. > I just read some discussion about cheking in the m2 xdoclet2 plugin, and > also saw the initial rev had been checked in recently. Is the plugin > buildable and usable without building all of Xdoclet2 (i.e. are the required > POMs/dependencies/snaphsots available on a public repo somewhere)? Even > better, would it be possible to get a SNAPSHOT of the maven2-xdoclet2-plugin > from somewhere? It should be, yes. > I have written a couple of Xdoclet2 plugins, which I would like to invoke > from/using the maven2-xdoclet2-plugin. I deduced from the Config class that > a plugin name is provided as part of the plugin configuration in the POM. > That means each user of my plugins would have to add additional dependencies > (for my Xdoclet2 plugin classes) in each of their POMs, which I'd rather > avoid. That's true but 1) they won't have to declare any of the depencies on and of xdoclet itself, which was the case with maven1 or ant. 2) these dependencies on your xdoclet-plugins will be declared in the pom/plugins/plugin/dependencies section, so they won't be an actual dependency of your user's poms. What you'll want to do is probably to create a parent pom which your users can "extend", where the plugin and your xdoclet-plugins will be declared. Unfortunately, this doesn't fully work with m2 yet. > I am wondering if I should create a Maven2 plugin, which would > declare dependencies on the maven2-xdoclet2-plugin, and where my plugin's > Mojo would simply extend XdocletMojo, and in the execute() method simply do > a super.execute(). Would that work, and is that the recommended way to use > the maven2-xdoclet2-plugin? You *could* do that, but that seems far fetched to me. You probably wouldn't need to extend the mojo class itself anyways, but rather just declare dependencies to your xd-plugins, but creating a maven-plugin for that, or just a parent pom probably comes down to the same thing. Don't hesitate to comment more, express feature requests, or, of course, provide patches ;) HTH, greg
