This post continues a discussion from a direct email sent yesterday.  I was
directed to move this discussion to the mailing list.

I asked about opening up the API to allow better programmatic access to
com.sun.tools.apt.Main:

> Have you considered opening up another method on AptUtils which looks
> something like this:
>
>     public static boolean invoke( Log log, AnnotationProcessorFactory apf,
> List args ) throws MojoExecutionException
>
>     or if you are concerned about compile-time dependencies
>
>     public static boolean invoke( Log log, Object apf, List args )
> throws MojoExecutionException
>
>
> The new 'invoke' method would use
> com.sun.tools.apt.Main#process(AnnotationProcessorFactory,String[]).

Portion of committer's initial response:

> I'm curious as to how you're actually using
> apt-maven-plugin in your own plugin, are you just bringing it in as a
> dependency and using AptUtils directly?


My response:
Yeah, I was hoping to call AptUtils directly from my plugin.  I'm working on
an annotation-based plugin which helps eliminate some POM configuration and
synchronization tasks.  For example, it would understand annotations like
@ServiceProvider for creating jar-spec Service Provider entries.  It would
also understand annotations which help configure Bnd tool for creating OSGi
metadata, e.g. @NonPublicApi for setting class exclusion filters.

Anyway, if that method was added, I could hand apt an
AnnotationProcessorFactory which is in context of my mojo.  Would you be
willing to look at some patches I had in mind?

Reply via email to