[hibernate-dev] Build and AnnotationProcessors
Sanne Grinovero
sanne at hibernate.org
Wed Apr 17 12:30:38 EDT 2013
AFAIK the reason we originally had a separate phase for annotation
processors was to workaround the following javac bug:
http://bugs.sun.com/view_bug.do?bug_id=6512707
Apparently the problem wouldn't trigger when running the annotation
processor in a separate phase.
Seems resolved now, still that would mean "some part" of potential
contributors won't be able to build it out of the box.
On command line users.. I'd agree with Hardy that we likely all prefer
building from the command line rather than from the IDE, but I don't
expect that to be the majority of users.
Sanne
On 17 April 2013 17:08, Hardy Ferentschik <hardy at hibernate.org> wrote:
>
> On 17 Jan 2013, at 5:32 PM, Steve Ebersole <steve at hibernate.org> wrote:
>
>> As discussed a little in HHH-8140[1] and on the earlier Eclipse thread,
>> I'd like to look at simplifying the build a bit around making IDE setup
>> easier. One thing that came to mind was looking at source generation.
>> Today we have source generation occur for:
>> * Antlr
>> * JAXB
>> * JPA static metamodel gen
>> * Logging
>>
>> The first 2 rely on specific tools while the other 2 are generated via
>> AnnotationProcessors.
>>
>> For the first 2, there is really not much to discuss aside from possibly
>> to consider adding those outputs to Git. I'd actually be open to
>> considering that for JAXB.
>
> Personally I would not check them in. In my world generated classes don't
> belong into the repository.
>
>> But really it is the AnnotationProcessors I wanted to talk about.
>> Currently we apply the AnnotationProcessors in separate javac task
>> configurations. I cannot remember all the reasons we decided to do it
>> this way originally. But I know that one was wanting to be able to keep
>> the output of each (the generated sources) in dedicated directories[2].
>
> This reminds me of not so distant discussion on jboss-dev ;-)
> I still believe it is nice to have a different output directory for each annotation
> processor and I also like the idea of keeping things separate in the build.
> IMO it is completely valid to run the processors separately from the main javac call.
>
> I know this creates problems in the IDE setup, but the limiting factor in this case
> is the IDE.
>
>> But we could also just lump all the APT output into one single, separate
>> directory (target/generated-src/apt/main, target/generated-src/apt/test,
>> e.g.). What this would gain us is the ability for the IDE to run APT as
>> part of normal javac. It would be one less thing to set up when setting
>> up the IDE project.
>
> Since I drive the build most of the time from the command line I don't care
> that the IDE is not doing the APT processing. For me a nicely organised
> build outweighs simpler IDE setup.
>
> --Hardy
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list