The installation of buildtemplate occurs once for all the developers on your team. You do not need to install it on everyone's machine. There is two options below...
  1. installing it on a brand new code base
  2. installing it on an existing code base

I don't have any source code yet and am starting a project

  1. Run "java -jar buildtemplate.jar -directory [installdirectory]"
  2. Check [installdirectory] into your SCM
  3. Customize bldfiles/ to your specific project needs
  4. Have all your developers run [installdirectory]/build from any OS after checking out what you checked in and it will build your app
  5. To upgrade in the future, just drop in buildtemplate.jar into the tools directory(there is not need to run java -jar again)
  6. Skip to customization below to add customization

I already have source code. How do I upgrade

This has reportedly taken some people 10 minutes to do!!!
  1. Run "java -jar buildtemplate.jar -directory [basedir]" where basedir is your existing project directory.
  2. Erase the [basedir]/input directory. You do not need this. It is just the default directory structure when starting a brand new project.
  3. Add the property javacode to [basedir]/bldfiles/ Set this to where your java source code is. (ie. A com, org, biz, or net folder is usually here like biz.xsoftware.xxxx)
  4. Add the property lib to [basedir]/bldfiles/ Set this to the directory that contains your third party jars. All jars in this folder and subfolders on down will be put in the classpath to compile your application
  5. Run [basedir]/build from any OS to build your app
  6. To upgrade in the future, just drop a new buildtemplate.jar in and run build again. No need to run java -jar again. It is just a third party library containing your tools.


This buildtemplate currently offers two points of customization out of the box. Complete customization can still be obtained by unzipping the jar and replacing files with your own build.xml file and such. These two hooks are dist.xml and release.xml.

The [basedir]/bldfiles/dist.xml is meant to put together your distribution. All properties from and directories.txt are passed to this file. Use it to create your zip, rpm, etc. that is specific to your target.

The [basedir]/bldfiles/release.xml is meant to release your distribution. Every project wants to release to a different place by posting jars here, zips there, webpages somewhere else and this is the place to do that.