On Mar 21, 2007, at 12:17 AM, Brett Porter wrote:
I was using 2.2 of m-p-p which appears to be using qdox-1.6.1. I also tried using 2.3-SNAPSHOT (whatever is up there in the m2- snapshot-repo) and it looked like it was using qdox-1.6.1 as well. Both behave the same way.

That should be the one that works, so its unrelated to the previous problems.

:-(


Its starting to look like I'm going to need to craft a custom parser to parse out javadoc tags from *.groovy sources to generate the plugin descriptor... :-|


Have you looked at how the ant plugins and beanshell plugins do it?

Yup, when I originally crafted by first maven-plugin-tools-groovy support months ago I looked at how beanshell did it, and then I created something similar using regex.

The problem that I found with how that works, is that it was not very good at get javadocs from super classes. I often use a base class with plugin annotations for common configuration amongst goals, and I am trying to find a better way to handle this.

I've not looked at the beanshell bits lately, not sure they have changed that much though, but its worth another look I suppose. The crux of the problem is base classes (be they groovy or java classes which are extended, and how to get a reference to their source code to scan for their javadoc annotations).

The other option is to follow the jruby way and force folks to extend from a GroovyMojo class and then add some magical methods and fields to inject the plugin metadata that way. Only problem with this is that I can't figure a good way to handle all of the different annotations for fields. That and by forcing the GroovyMojo to be the base class... er well you know... can't extend anything else (like some other, maybe java impl base class).

On that note, the lack of runtime metadata is kinda sucky since its not possible to extend from a class in an external module and pick up its annotations to be used when generating the current modules plugin descriptor. This could be fixed I guess by using something like commons-attributes... though that is still Javadoc based, so even if Maven did use that I'd still have to craft a custom parser to handle the Groovy syntax (which qDox can't really handle well... at least not the last time I tried, something about it needing those ';' to parse correctly).

Still no smoking gun for how to generate the plugin descriptor for Groovy-based mojos :-(

--jason

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

Reply via email to