classgen/ant questions

From: Mike Kienenberger (mkienen..laska.net)
Date: Thu May 12 2005 - 11:04:57 EDT

  • Next message: Mike Kienenberger: "Moved check for internal_embedded_datasource into org.objectstyle.cayenne.conf.ConnectionProperties"

    (I've cc'd Erik as I'm not sure if he's on the cayenne-devel list, and he
    said he was willing to be a resource on ant-related questions.)

    First off, build-regression.xml seems to be dysfunctional now. I'm looking
    into it.

    In the process, I noticed that I needed to copy the three hsqldb-connection
    setup targets from build-test.xml to build-regression.xml. These targets
    initialize properties and set up classpaths.

    Question #1: Is there any way to share these targets so that we're not
    maintaining duplicate ant code?

    While writing tests for the new classgen stuff , I noticed that some of the
    generated test classes have licensing info at the top, and some do not.
    This seems like a useful function to provide -- the ability to specify a
    licensing string (or some other constant header info) or file to be included
    at the top of the generated file.

    Question #2: Is there an ant element that can produce a string, either from
    a file or a literal value in the ant.xml? If not, I'd say going with a file
    is probably the best solution.

    Third, I'm considering providing a "version", "compiler", "templater", or
    "target" attribute for class generation along the lines of the "compiler"
    javac task. "1.1" would be how things are done now (single "classgen").
    "1.2" would be how I want to redesign things. Any comments or preferences?
     The default for "version" would be 1.1 for now.

    Also, how about the ability to specify a template fragment for inclusion?
    The primary use case for people other than myself for custom templates
    appears to be adding additional convenience methods (like primary key
    support). Rather than having to maintain the entire template, it would
    probably be easier to just allow an includable fragment that could be
    inserted at the bottom of the existing template.

    Feel free to just point me to the docs for the ant stuff :)

    -Mike



    This archive was generated by hypermail 2.0.0 : Thu May 12 2005 - 11:03:17 EDT