In a Maven sense I'm pretty sure they run in compile phase, though there is
also a Maven plugin I've found to run annotation processors directly, so we
could take either approach.
On Thu, Jul 7, 2011 at 10:08 AM, Lincoln Baxter, III <
lincolnbaxter(a)gmail.com> wrote:
Forgive me for asking something I could easily google, but where do
annotation processors fit into the development lifecycle? I admit I've never
used one (that I know of.) It would probably help if I did before giving too
much feedback ;)
~Lincoln
On Thu, Jul 7, 2011 at 9:12 AM, Ken Finnigan <ken(a)kenfinnigan.me> wrote:
> Ok, part way through writing this email I realized it probably makes some
> sense to break it down a bit more.
>
> Now I'm thinking we need an AnnotationProcessor interface with methods
> like:
>
> String getClassName()
> String getOptions()
> String getSourceDirectory()
> String getOutputDirectory()
> List<Dependency> getDependencies()
>
>
> Then the AnnotationProcessorFacet methods would be:
>
> addAnnotationProcessor(AnnotationProcessor processor)
> removeAnnotationProcessor(AnnotationProcessor processor)
> List<AnnotationProcessor> getAnnotationProcessors()
> processAnnotations()
> processAnnotation(AnnotationProcessor processor)
>
> That's some real thinking on the fly so any other thoughts/enhancements
> are most welcome!
>
> Ken
>
>
>
> On Wed, Jul 6, 2011 at 5:04 PM, Lincoln Baxter, III <
> lincolnbaxter(a)gmail.com> wrote:
>
>> Hmm,
>>
>> Good questions. I think #2 would probably be the easiest, but we could
>> offer #1 as an alternative for those who don't want to use the maven build
>> plugin.
>>
>> I think #3 would probably be the most robust for future use. What kinds
>> of methods are you thinking of including for the facet?
>>
>> ~Lincoln
>>
>>
>> On Sun, Jul 3, 2011 at 3:41 PM, Ken Finnigan <ken(a)kenfinnigan.me> wrote:
>>
>>> Hey Lincoln,
>>>
>>> Have been working on adding JPA model generation to the persistence
>>> plugin over the last few days and have been mulling over the best way to
>>> implement it and wanted to get your thoughts.
>>>
>>> I see that there are a few possibilities:
>>>
>>> 1) Call the NativeMethodExec utility to call javac for running
>>> annotation processing only.
>>> 2) Add an annotation processing profile to the pom as part of the
>>> install of the plugin (if they select they want model gen), and then
>>> performing the model gen would execute the maven to process and generate
>>> annotations
>>> 3) An extension of 2 would be to make an AnnotationProcessorFacet, and
>>> then do 2 as a Maven implementation of that facet.
>>>
>>> After thinking about it today I think 3 seems the most flexible, but
>>> wanted to get your thoughts.
>>>
>>> Thanks
>>> Ken
>>>
>>
>>
>>
>> --
>> Lincoln Baxter, III
>>
http://ocpsoft.com
>>
http://scrumshark.com
>> "Keep it Simple"
>>
>
>
--
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"