[hibernate-dev] Build and AnnotationProcessors

Steve Ebersole steve at hibernate.org
Wed Apr 17 11:32:43 EDT 2013


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.  Its inputs are very infrequently changing, 
so much so that I don't see needing to generate that stuff often.  The 
Antlr stuff on the other hand changes more frequently.

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].  
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.

WDYT?


[1] https://hibernate.atlassian.net/browse/HHH-8140

[2] Also, I remember IDEA, back then, had difficulty with 
AnnotationProcessors and separating the compilation dir and generation 
dir.  It wrote both to the same dir, which is the javac apt default; 
IDEA just had no option to adjust that.  IDEA 12 does.


More information about the hibernate-dev mailing list