Fopdevs,

I am in the process of giving alt.design an Ant build environment, based on the HEAD environment, with a number of significnt changes.

The basic build principles that I will implement include:

* No code generation or modification for normal builds.
* All generated code and data maintained in CVS.

This is primarily to ease the introduction to the code for newcomers, but also to rationalise the basic working environment for development. I will create a parallel src/codegen environment under src for the repository. E.g. src/codegen/java. This will be easily usable in IDEs, by adding the directory to the source path.

Code generation will always be a separate step, on the principle that changes to generated code are infrequent. This violates another principle - always build from the actual source of the files - but I have always considered on-the-fly xsl code generation (and ant copy-filtering) to be an abomination and a barrier to understanding.

Once the code generation step is separated, normal builds can monitor the state of the generated code by a) checking creation dates of generated files and their sources and b) performing cvs diffs against the repository. For a normal build, I would simply check timestamps, while for a distribution build I would enforce a repository check.

In the normal case, inconsistencies in the generated code would halt the build. A property could be defined to override this from the command line or from build-local.properties.

This implies a separate target for codegen, and I would include one for codegen+cvscommit.

* Enforcing tag checkout for distribution builds

Some time ago I modified Version.java to take its version information from the $Name$ keyword containing the Tag value. $Name$ is only set in a file which is checked out using a specific tag, so in most cases in the development environment, it will simply look like "$Name: $". In those cases, Version.java provides a default value.

I have just extended Version to include a main which prints property setting strings to stdout. The properties vary depending on whether a real Tag value is available. The eventual aim is to have a distribution build optionally detect the fact that no Tag is set, and to the perform a complete checkout of the source with a given Tag, then perform a sub-build of the distribution in that directory, guaranteeing that the distribution is reproducible from the Tag. Note that the generated file are also tagged, so there is no need to re-generate here, but a cvs diff check would be prudent.

I'll post as I get pieces of this working, so that if any of it sounds interesting for HEAD, curious parties can look at the results in alt.design.

Peter
--
Peter B. West  http://www.powerup.com.au/~pbwest/resume.html


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]



Reply via email to