Re: <cgen> Ant task and makepairs attribute

From: Cris Daniluk (cris.danilu..mail.com)
Date: Wed Apr 27 2005 - 09:52:09 EDT

  • Next message: Erik Hatcher: "Re: <cgen> Ant task and makepairs attribute"

    > For now I'm dealing with this by doing this after
    > <cgen>:
    >
    > <delete>
    > <fileset dir="${build.dir}/gen" excludes="**/_*.java"/>
    > </delete>
    >
    > I'm curious what others using <cgen> do when the subclasses need to be
    > modified, and whether modifying <cgen> to be friendlier to this type of
    > situation is of interest or if there is a better way to do what I'm
    > doing.
    >

    Cayenne will not overwrite modified wrapper subclasses. However, we
    place all of our generated code in a separate source folder (seems
    you're doing the same). Since the subclasses were meant to be
    modified, we store them along side the non-generated source code,
    meaning we have to delete the generated subclasses each time we build
    - in fact my ant task looks almost identical to what you described.

    There's really nothing wrong with adding the generated code directly
    to your main source tree, which eliminates the need for the delete
    task. The reason I separate the generated code (aside from
    discouraging modification) is to make it clear that the code does not
    belong in version control.



    This archive was generated by hypermail 2.0.0 : Wed Apr 27 2005 - 09:52:10 EDT