Although I like the refactoring solution, I think it only covers a subset of the customizations possible.
I wonder if running JCasGen could be arranged to not update the target if there's no change in the source - either literally, or via time-stamps (like "make" does). -Marshall On 1/23/2013 12:40 PM, Richard Eckart de Castilho wrote: > Hi, > > getting the jcasgen-maven-plugin back on the radar reminds me of an issue > that has been bugging me for a while and is the reason why I couldn't > currently imagine using such a plugin: > > It is a feature of the JCas design that JCas wrappers can be customized, in > particularly methods can be added. The JCasGen preserves such customizations, > but it does add timestamp information to the JCas wrappers. This makes it > awkward to run jcasgen as part of the build with customized classes and to > keep those classes in SVN - it's just dirty every time. > > A low-cost solution would be to allow disabling time-stamps in JCas wrappers, > just like it is possible for JavaDoc and was recently suggested to save > SVN-space. > > Another more complex solution could be to refactor the JCas system so that > the JCasGen generates base classes (purely generated) and customizable > classes that inherit from these base classes. The latter would go to SVN > while the former would not, e.g. Token_Base and Token. Inheritance would be > between the base-classes mainly (e.g. Token_Base extends Annotation_Base). > > Are there any opinions or alternatives? > > Cheers, > > -- Richard >
