views:

47

answers:

2

We do our build-management with Ant, we have to build scripts, one to create a dispatchment for our customer, with hash informations, the sourcecode, installation-guide etc., the other build-file lies in the created artefact, and is the build for the customer which creates the war file from the sourcecode.

for the build-file which creates the war file, i take the ant default build.xml, but how would you name the other file?

+1  A: 

To give a good answer, you need to give more information.

Is the build file been generated? Uniquely for each customer? Is it called from the global build file automatically, or by humans? Do they have to be called in a specific order?

If the "other" build files reside in different (sub-)directories, you can just name them build.xml. That would be the default for ant and is easily recognized. Otherwise I would give them a postfix according to the project or artifact that is generated. So, for example, if the artifact is aaa.jar you can name the build file build-aaa.xml. If they have to be called in a specific order you can add a number to the name (e.g. build-10-aaa.xml) so that it is easy to sort and iterate over a list of build files.

akr
+1  A: 

Here is a decision matrix:

  • If you want to run an ant build from the command line in generated directory, then stick with the default build.xml. This way whoever runs the build will not have to struggle with ant command line switches for non-standard ant script file.

  • If the other ant script is going to be called by some other script or excessive environment has to be set in order to run the build, then it's probably better to give a custom name to that script. I would indicate in the file name that it's an ant script.

Alexander Pogrebnyak