3 Replies Latest reply on Oct 25, 2004 12:40 PM by mlavergn

    RFC on source replacements at compile time in cvs head

      In brief, I need to switch the xdoclet tag for "auto-increment" to false from true when building Nukes for Oracle. I'm thinking the best way is to use an Ant filter/replace to achieve this with a token like @autoincrement@ and incorporating the filter into the build file for each module. The replacement value would be specfied in the local.properties file for each database target. For mysql, the value would be true, for oracle it would be false. I'm looking for comments, feedback, or suggestions. Thanks!

        • 1. Re: RFC on source replacements at compile time in cvs head

          it seems fine

          • 2. Re: RFC on source replacements at compile time in cvs head

            Ok, here's what I've done:

            - Added the boolean prop "nukes.pk-auto-increment" for each database conf in:

            /build/etc/*

            - Added the prop "build.gen.src" to set the filter copy destination directory in:

            /tools/etc/buildfragents/defaults.ent

            - Added the target "_default:filter-sources" to perform the Ant filter pass in:

            /tools/etc/buildfragents/targets.ent

            - Modified the per module build.xml "generate-classes" target to add a dependency on "_default:filter-sources"

            - Modified the ejbdoclet fileset tag in the per module build.xml to use the filtered ${build.gen.src} sources instead of ${source.java}

            I'm not sure if / where we document this, and I've put comments in the affected files where appropriate, but this is a good description of the process.

            • 3. Re: RFC on source replacements at compile time in cvs head

              Slight change here, I used a property instead of a filter token. I also dropped the filter-sources target but I replaced it with a regex-sources to address a limitation with EJBQL and CLOB comparisons.